In TOS I am using ATR(5 day, simple). Investigating it seems that the OHLC values I get in TOS are different than the ones in Ninja.
This is for /ES. Issue looks to be related to session template.
In the indicator I also want the session Open and Close values.
I can not see how to reference two different session templates from within an indicator/strategy.
Alternatively I can program a new ATR indicator, but I need to extract the overnight High and Low for use in the ATR calc paired with the Session Close.
When I use
if ( (Bars.BarsSinceSession == 0 ) && (Time[0].ToString("ddd") != "Sun" ) )
{
Print("");
Print(Time[0] + " " + Time[0].ToString("ddd"));
Print("Open: " + Open[0]);
Print("PrvDayClose: " + Bars.GetDayBar(1).Close);
Print("PrvDayHigh: " + Bars.GetDayBar(1).High);
Print("PrvDayLow: " + Bars.GetDayBar(1).Low);
}
I am able to capture the Session Open, and PrvDayClose correctly with the code above.
The Prv Day High and Low though are the regular session High and Low and I want the overnight H/L if they are larger/smaller respectively.
I tried Add("ES 09-16", PeriodType.Day, 1); // Add Day Bars for ATR calc
But ATR on this also does not match TOS. Can I pass a 24h session template to the alternate time period?
Any thoughts or suggestions?
Comment