Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
On MT5: Unless the chart is that specific pair/TF, you must Synchronize the terminal Data from the Server.
Timeseries
and Indicators Access / Data Access - Reference on
algorithmic/automated trading language for MetaTrader 5
Synchronize Server Data
with Terminal Data - Symbols - General - MQL5 programming forum
On MT4: Unless the current chart is that specific pair/TF referenced, you must handle 4066/4073 errors before accessing prices.
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
On MT5: Unless the chart is that specific pair/TF, you must Synchronize the terminal Data from the Server.
Timeseries
and Indicators Access / Data Access - Reference on
algorithmic/automated trading language for MetaTrader 5
Synchronize Server Data
with Terminal Data - Symbols - General - MQL5 programming forum
Ah, of course. Now that you mention it, I realize this is what is missing.
Thank you.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Here's a test script that depicts this odd behavior.
The documentation says:
If you need to return value corresponding to the current uncompleted bar, you can use the first form of call specifying start_pos=0 and count=1.
Note: when I pull the volume for the first completed bar, i.e. START_POS = 1, the values look more reasonable.
Any thoughts?