NexusFi: Find Your Edge


Home Menu

 





percentage


Discussion in ThinkOrSwim

Updated
    1. trending_up 1,369 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
Alcamo
san pedro ca. USA
 
Posts: 11 since May 2019
Thanks Given: 3
Thanks Received: 4

can anyone help me write a script in thinkorswim that calculates the% change between yesterday close and any bars high .
Assuming yesterday close was 180 and i click on the 6:00AM bar with the high of 183. then the % displayed would be 1.666%. I work on 30 minute bars and I do some premarket trading.
Thank You


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
Sundays Verdict: Lebanon Locked at 99.85% as Iran June 7 …
Prediction Markets & Event Contracts
Friday Update: Markets Now Pricing Fed Rate HIKES as Sta …
Traders Hideout
Thanks Mike. Godspeed.
The Elite Circle
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
 kjhosken 
Seattle, WA/USA
 
Experience: Intermediate
Platform: TOS, TS
Trading: Forex, crude
Posts: 96 since Sep 2016
Thanks Given: 7
Thanks Received: 35

See if this meets your needs:

 
Code
declare lower;
def prevclose = close(period= aggregationperiod.day)[1];
plot perchange = (close - prevclose) / prevclose * 100;


Alcamo View Post
can anyone help me write a script in thinkorswim that calculates the% change between yesterday close and any bars high .
Assuming yesterday close was 180 and i click on the 6:00AM bar with the high of 183. then the % displayed would be 1.666%. I work on 30 minute bars and I do some premarket trading.
Thank You


Follow me on X Reply With Quote
Thanked by:
  #3 (permalink)
Alcamo
san pedro ca. USA
 
Posts: 11 since May 2019
Thanks Given: 3
Thanks Received: 4


Thank you so much for the script. It works perfectly.
Anthony Vallone


Reply With Quote




Last Updated on August 16, 2019


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts