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,897 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?
Fabrication or Framework? Irans Denied MOU Explains the …
Prediction Markets & Event Contracts
BofA Projects $1.1 Trillion in Sports Event Contracts -- …
Prediction Markets & Event Contracts
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
US Treasury Weighs Direct Oil Futures Market Interventio …
Commodities
Zytrade: Devin Brady, CEO - Ask Me Anything (AMA)
Brokers
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 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