kieranf:
There is no H8 or H12 timeframes with MT4. Only with offline charts.
I have written an EA in MQL4 which returns some information about the previous bar with the following lines:
This works fine there is no problem.
However if I change this code to use PERIOD_H8 (as below), when executing the last line of code I receive a zero divide error:
The same thing happens if I use PERIOD_H12 -
Does anybody know why this is? Is it a broker specific issue or something issue with using these particular timeframes?
Thanks!
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 have written an EA in MQL4 which returns some information about the previous bar with the following lines:
This works fine there is no problem.
However if I change this code to use PERIOD_H8 (as below), when executing the last line of code I receive a zero divide error:
The same thing happens if I use PERIOD_H12 -
Does anybody know why this is? Is it a broker specific issue or something issue with using these particular timeframes?