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,441 views
    2. thumb_up 0 thanks given
    3. group 0 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

duplicate ATR from 30 min chart to 15 min chart

  #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?
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
Exit Strategy
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
GFIs1 1 DAX trade per day journal
22 thanks
NexusFi site changelog and issues/problem reporting
22 thanks
The Program
20 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


© 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