NexusFi: Find Your Edge


Home Menu

 





percentage


Discussion in ThinkOrSwim

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




 
Search this Thread

percentage

  #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?
Deepmoney LLM
Elite Quantitative GenAI/LLM
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
  #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 Twitter 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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts