double openprice0H1=iOpen(Symbol(),PERIOD_H1,0);
Please try and report back.
It works, Thank you.
Edit,
double openprice0H1=iOpen(Symbol(),PERIOD_H1,0);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
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
Open price of the current H1 open is returning an incorrect value of 2.0000000013102e-05.
Seems to happen on 1 symbol only, but displays the correct price on the chart.
Am I doing something wrong, broker problem or a bug?