Help please, why 2 bars shift when send bar[index] to indicator class !!!
int idxLoop = mIdxCB + fillSize; // Bar Shift for Index[0]
What is the purpose of this fillSize ?
Thanks for reply @Soewono Effendi
The purpose is to collect previous 5 bars data as some candle pattern can take into account three+ bars (e.g. Three White Soldiers).
mIdxCB is current bar on which pattern is searched. OHLC[fillSize] = OHLC[6] static array where OHLC[1] have data for mIdxCB.
Hope this clarify matter and help you for further detail testing.
Regards.
@Soewono Effendi Thanks for you time man :)
Dear Fellow
I am having challenge to figure out why there is 2 bar shift when I send bar[index] to Indicator class.
Even after two days for debugging I have failed to find the reason for it. The code and screen shot is attached for ready reference herewith.
You will also notice that Hammer/Shooting Star values are plotted 2 bars away from actual bar position. (marked on the screen shot)
I have also noticed one thing, if I LogPrint for current bar i.e. index[0] it returns index of MaxBars on the Chart!!!
Indicator Code
Indicator Class Code
Thanks in advance and regards.