
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
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, seemeingly I have, let's say, 100 data bars and 101 indicator values. Weird.
To be more precise , this is happening when I use a closed pack of historical data, while everything is aligned with runtime testing.
Might it be that the function Barcalculated counts also the last , open bar not included in the "closed" packet?