Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 722
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
Returned value if no bar was found at the specified time. Whenexact=false iBarShift returns index of the nearest bar with open time less than specified (time_open<time). If such a bar is not found (no history before the specified time), the function will return -1.
But we have history, it is a fact. Everything happens at the newest (0-th bar by time series).
Is the timeseries ready when you address it?
Can she not be ready?
Could she be unprepared?
It looks like this
There is an error in the tester:
Why?
I write like this:
There is an error in the tester:
Why?
Because there is no bar with index 30000 on the chart and in the terminal
Because there is no 30000 bar on the chart and in the terminal
so how do i test it then?
the EA, when it starts, has to process 30,000 previous minutes.
I am testing an EA for 2018.
At launch, it should go through all of the previous month's minutes (this turns out to be the last month of 2017),
and use them to calculate dispersion coefficient.
There are as many as 30,000 minutes.
Can you take the next ones? Can the EA "look into the future"?
I need to calculate the variance, so I don't care whether the subsequent ones or the previous ones.
can the EA "see into the future"?
cannot.
use iBars() to see the available history
HH: If I am not mistaken, in the tester, when you start the Expert Advisor is available 1000 bars, then with the generation of new data the number of bars will increase. The tester models the history of all the TFs to which it is addressed, ie, if you ran the test on H1 and during the test accessed the data in TF M1, then when you start you will be available for 1000 bars on H1 and therefore 60 * 1000 = 60,000 bars M1
you need to read articles like this oneat https://www.mql5.com/ru/articles/1511