NexusFi: Find Your Edge


Home Menu

 





Volatility Script for TOS


Discussion in ThinkOrSwim

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




 
Search this Thread

Volatility Script for TOS

  #1 (permalink)
TradingForALiving
Miami Florida US
 
Posts: 16 since Oct 2015
Thanks Given: 6
Thanks Received: 1

Could someone please help me write the following script:

I would like to take the closing price and divide it by the 20 bar Average True Range and the result should be less than 30.

For example I tried close/ ATR(20) < 30 but that obviously is wrong.

Thanks

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
ZombieSqueeze
Platforms and Indicators
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #2 (permalink)
 g137 
New Haven
 
Experience: None
Posts: 5 since Mar 2019
Thanks Given: 2
Thanks Received: 5

the close is a single point, where as the ATR is the average ranges... two points... try dividing the 20 ATR by the 1 ATR since the 1 ATR should just be the ATR of the current bar

Reply With Quote
  #3 (permalink)
TradingForALiving
Miami Florida US
 
Posts: 16 since Oct 2015
Thanks Given: 6
Thanks Received: 1


Thanks for your reply but that wouldn't work. I need to take into account the price of the stock,
For example a 10 dollar stock that has a 20 bar ATR of 5 is much more volatile than a 100 dollar stock
with the same 20 bar ATR of 5. I'd like to do scan that would allow me to find such volatile stocks.

So the formula would be "Close divided by the 20 bar ATR < 30" but that is not the correct script. If someone knows
how to write the above formula so that I can do a scan it would be greatly appreciated.

Reply With Quote
  #4 (permalink)
VanDriver
Jackson, MS
 
Posts: 34 since Dec 2015
Thanks Given: 1
Thanks Received: 5

We can better help if you describe what you’re trying to do. G137 told you why the close cannot be used in the formula you referenced. You seem to be looking for an ATR % scan, which you will compare the current range to the average. If you are looking for an ATR weighted position size then see the article in the included link

https://leighdrogen.com/position-sizing-is-everything-c6076ee7f44

Reply With Quote




Last Updated on September 28, 2020


© 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