NexusFi: Find Your Edge


Home Menu

 





ATR Ratio indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Mesa with 4 posts (2 thanks)
    2. looks_two marpol with 3 posts (3 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 remarka with 1 posts (0 thanks)
    1. trending_up 1,746 views
    2. thumb_up 5 thanks given
    3. group 3 followers
    1. forum 7 posts
    2. attach_file 4 attachments




 
Search this Thread

ATR Ratio indicator

  #1 (permalink)
 Mesa 
Mesa, Arizona
 
Experience: None
Platform: NinjaTrader
Trading: ES at the moment
Posts: 15 since May 2016
Thanks Given: 12
Thanks Received: 9

I am looking for an indicator that will give me the ratio of the ATR on two different time periods. For example, the ratio of the 5 period ATR to the 40 period ATR.

I just started using NT8 and was looking for a way to insert this ATR ratio number into the market analyzer so that I could use it to spot volatility compression in different markets. I'd have it change the color of the cell whenever the ratio of the shorter period ATR to the longer period ATR was less than .5 ((ATR(5)/ATR(40))<.5) or something like that.

It's really easy to insert the ATR number into the market analyzer, and I can insert it for multiple periods. Currently I have the short period ATR and the long period ATR side by side in the market analyzer, and I just do the math at a glance (see attached screenshot).

I'm not sure if I have to learn coding to build this myself, or if something like it already exists, or if there is a way of creating it that is easier than coding it. I'm hoping the community here can point me in the right direction

Thanks!

Attached Thumbnails
Click image for larger version

Name:	Market Analyzer.jpg
Views:	193
Size:	78.9 KB
ID:	231901  
Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
Quant vue
Trading Reviews and Vendors
Could it be that currency futures are way easier to trade?
Currencies
How to apply profiles
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #3 (permalink)
 marpol 
San Francisco, CA
 
Experience: Advanced
Platform: IB-TWS, Ninja, Wave59, R
Broker: IB, IQFeed
Trading: ZB
Posts: 37 since Sep 2013
Thanks Given: 0
Thanks Received: 26


I wrote a simple ATR Ratio indicator for you. You can put it in your Market Analyser as an indicator and add conditions to change the colors. It is pretty simple so feel free to use/change the code.

This indicator basicly just divides the "Short Period ATR" by the "Long Period ATR" so atrS/atrL.

Let me know if you have any questions.

Attached Files
Elite Membership required to download: ATRRatio.zip
Reply With Quote
Thanked by:
  #4 (permalink)
 Mesa 
Mesa, Arizona
 
Experience: None
Platform: NinjaTrader
Trading: ES at the moment
Posts: 15 since May 2016
Thanks Given: 12
Thanks Received: 9

Thank you Marpol!!!

It looks great on a chart. For some reason it only outputs "0" as the value when I view it in the Market Analyzer (see attachment). Am I doing something wrong?

Thank you again I'm looking forward to using this to help me focus my trading efforts on markets that are more likely to move!

Attached Thumbnails
Click image for larger version

Name:	Market Analyzer2.jpg
Views:	203
Size:	84.6 KB
ID:	231987  
Started this thread Reply With Quote
  #5 (permalink)
 marpol 
San Francisco, CA
 
Experience: Advanced
Platform: IB-TWS, Ninja, Wave59, R
Broker: IB, IQFeed
Trading: ZB
Posts: 37 since Sep 2013
Thanks Given: 0
Thanks Received: 26

no problem at all......I just put it on my market Analyzer and it seems to be working for me ok. the only think I noticed on yours is it shows (5, 40) instead of (40,5)...did you set the short period to 40 and long period to 5?
Also what data period are you using (can not see in your pic). I just used 1 min data and it seems to be working, but need to know what yours is set at to troubleshoot.

Attached Thumbnails
Click image for larger version

Name:	Capture1.PNG
Views:	187
Size:	9.6 KB
ID:	231992  
Reply With Quote
Thanked by:
  #6 (permalink)
 Mesa 
Mesa, Arizona
 
Experience: None
Platform: NinjaTrader
Trading: ES at the moment
Posts: 15 since May 2016
Thanks Given: 12
Thanks Received: 9


marpol View Post
no problem at all......I just put it on my market Analyzer and it seems to be working for me ok. the only think I noticed on yours is it shows (5, 40) instead of (40,5)...did you set the short period to 40 and long period to 5?
Also what data period are you using (can not see in your pic). I just used 1 min data and it seems to be working, but need to know what yours is set at to troubleshoot.

I adjusted the periods and set it to 1 minute data and it works great I was trying to use it with 1 day data, and it doesn't work for that data period, and I'm not sure why. I just changed the look back period from 2 days to 40 days, but it didn't make a difference from what I could tell.

Thank you again

Started this thread Reply With Quote
  #7 (permalink)
 marpol 
San Francisco, CA
 
Experience: Advanced
Platform: IB-TWS, Ninja, Wave59, R
Broker: IB, IQFeed
Trading: ZB
Posts: 37 since Sep 2013
Thanks Given: 0
Thanks Received: 26

It does not work if there is not enough data for it to calculate with. If you are going to use daily period then you will need to load more data (normally more then you need...and i think you have to included weekends). It works if you load 100 days (with a 5,40 setting).

Glad it works for you.....let me know if there are any other issues with it...

Reply With Quote
Thanked by:
  #8 (permalink)
 Mesa 
Mesa, Arizona
 
Experience: None
Platform: NinjaTrader
Trading: ES at the moment
Posts: 15 since May 2016
Thanks Given: 12
Thanks Received: 9


marpol View Post
It does not work if there is not enough data for it to calculate with. If you are going to use daily period then you will need to load more data (normally more then you need...and i think you have to included weekends). It works if you load 100 days (with a 5,40 setting).

Glad it works for you.....let me know if there are any other issues with it...

That is fantastic! Thank you for both creating it for me and showing me how to use it




Started this thread Reply With Quote




Last Updated on April 12, 2017


© 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