What is the purpose of this fillSize ?
It might cause the chart shift you"re experiencing.
(Just guessing without further detail testing)
int idxLoop = mIdxCB + fillSize; // Bar Shift for Index[0]
Soewono Effendi #:
What is the purpose of this fillSize ?
What is the purpose of this fillSize ?
It might cause the chart shift you"re experiencing.
(Just guessing with further detail testing)
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.
my guess is, that variable caused your bar shift.
Good luck
@Soewono Effendi Thanks for you time man :)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.