I am getting incorrect ATR data which results in wrong strategy behavior.
I am using following code to add daily instrument while my strategy runs on 1 min:
protected override void Initialize() {
Add(PeriodType.Day, 1);
}
protected override void OnBarUpdate() {
Print(Instrument.FullName + " " + Time[0].ToString() + " DAILY MAX: " + CurrentDayOHL().CurrentHigh[0] + " ATR: " + ATR(BarsArray[1],5)[0] + " ORDERSIZE: " + actualOrderAmount);
}
but If I look at the graph on daily I see that ATR(YM 09-14(Daily),5) is 91,51
Any idea where the problem might be?
Thanks.

Comment