NexusFi: Find Your Edge


Home Menu

 





Volatility Script for TOS


Discussion in ThinkOrSwim

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




 
Search this Thread
  #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?
Strike Pause Holds, Oil Erases Monday Spike -- May CPI W …
Traders Hideout
Election Sunday Resolves: Peru Heads to Runoff at 42pct, …
Prediction Markets & Event Contracts
CME Cuts Precious Metals Margins Up to 21% Starting Toda …
Commodities
Post-Summit Market Verdict: ES -1%, NQ -1.5%, 10-Year Yi …
Traders Hideout
Rubios Good News Within Hours and the 30-Day Math: Why H …
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)
 g137 
New Haven
 
Experience: None
Posts: 6 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


© 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