24h-worker :
I tested the new programming construction
CopyOpen("EURUSD",PERIOD_H1,0,5, XY); // 5 bars from 0 - 4
XY[0] // this is the oldest bar - the fourth bar
In MQL4 the [0] was the newest. In my test it was the oldest.
Will that enumeration be changed or is that the finall status ?
Had the same problem. I believe it was Stringo from MetaQuotes that advised what to do. To implement 1 = 1 bar back, 2 = 2 bars back and so on just call ArraySetAsSeries(XY,true);
ArraySetAsSeries(XY,true);
CopyOpen("EURUSD",PERIOD_H1,0,5, XY); // 5 bars from 0 - 4
Hope it works.
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
I tested the new programming construction
CopyOpen("EURUSD",PERIOD_H1,0,5, XY); // 5 bars from 0 - 4
XY[0] // this is the oldest bar - the fourth bar
In MQL4 the [0] was the newest. In my test it was the oldest.
Will that enumeration be changed or is that the finall status ?