Forum

iCustom applied price: new bar value modify the previous one?

Hi, while developing a non banal custom indicator I met a strange behaviour which I cannot grasp fully. The indicator is intended not to be calculated for the open bar. In other words, it is supposed to calculate position J only when position J+1 appears (= bar J completed) Below you can find the

Indicator longer than the data series?

Hi, I am a newbie with MQL5 and I am just familiarizing with the fundamentals. I am debugging on historical datat (not runtime). I do not understand why the function Barcalculated applied to a simple SMA returns 1 element more than the function Bars applied to the source time series. In other words