I want to get value of CCI from second timeframe. But calculated values is invalid.
What I do:
1. Add(PeriodType.Minute, 15); // in Initialize()
2. In OnBarUpdate() call Print(Time[0] + " " + CCI(BarsArray[1], 21)[0]) that theoretically should return the current CCI value on M15 time-frame. But values differ radically. The actual value is greater +175, but the function returns -145.
What am I doing wrong?
Base timeframe is M1. Print calling when BarsInProgress==0, i.e I handle only the closure of the main bars timeframe ( in Initialize() added CalculateOnBarClose = true ).
Thanks.
Comment