NexusFi: Find Your Edge


Home Menu

 





duplicate ATR from 30 min chart to 15 min chart


Discussion in Platforms and Indicators

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




 
Search this Thread
  #1 (permalink)
 shzhning 
Madison, NJ
 
Experience: Intermediate
Platform: CQG/TOS
Broker: Optimus/CQG
Trading: ZN/TN/ES/NQ
Posts: 134 since Jun 2010
Thanks Given: 65
Thanks Received: 112

Hi, this is a generic question about ATR on thinkorswim, but the idea should be applicable to any platform.

The idea is duplicate my ATR value from a 30 min chart to 15 min chart.

The script for a 45 period ATR on 30 min chart is : Average(TrueRange(high, close, low), 45)

On my 15 min chart, I changed 45 to 90, and everything else is the same: Average(TrueRange(high, close, low), 90);

Since 15 min chart has double the bar count of 30 min chart, I thought the revised script would give me the exact reading from the 30 min chart, but it does not.

Anyone has any clue what's not right?


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Wood Mackenzie Drops $200 Oil Forecast -- Airspace Expir …
Prediction Markets & Event Contracts
May 26 Deadline Dies at 7.5% as US Strikes Iran During C …
Prediction Markets & Event Contracts
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
April Jobs Beat Flips Fed Hike Odds Past 52% for First T …
Traders Hideout
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
6 thanks
Darmok and Jalad at Tanagra
1 thanks
  #3 (permalink)
 shzhning 
Madison, NJ
 
Experience: Intermediate
Platform: CQG/TOS
Broker: Optimus/CQG
Trading: ZN/TN/ES/NQ
Posts: 134 since Jun 2010
Thanks Given: 65
Thanks Received: 112


I managed to put together something like this, in case anyone need it. And it works

def agg1 = AggregationPeriod.FIFTEEN_MIN;
def agg2 = AggregationPeriod.THIRTY_MIN;

def ATR1 = Average(TrueRange(high(period = agg1), close(period = agg1), low(period = agg1)), 45);
def ATR2 = Average(TrueRange(high(period = agg2), close(period = agg2), low(period = agg2)), 45);

Little hidden gem that TOS allows a secondary aggregation period in their script language


Started this thread Reply With Quote




Last Updated on July 22, 2016


© 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