EQGGG:
In Mt4 (MQL4) the H2 timeframe does not exist! In MQL5 it exists.
Hi, could somebody tell me why I cannot compile an Mt4 EA with an M45 period while I can compile it with an H2 period? M45 chart was created offline with period converter and still it doesnt work. So I can it compile for H2??
Thanks!
well that's strange in MQL4 my H2 timeframe compile but not my M45 timeframe...
Show the code.
PERIOD_H2 is a valid constant of a non-standard timeframe.
PERIOD_M45 is not.
Please see the list here
Chart Timeframes - Chart Constants - Standard Constants, Enumerations and Structures - MQL4 Reference
- docs.mql4.com
Chart Timeframes - Chart Constants - Standard Constants, Enumerations and Structures - MQL4 Reference
Well thanks a lot honest_knave that explains the non-compiling of the EA... so no way to compile M45 in MQL4 right?
EQGGG:
Well thanks a lot honest_knave that explains the non-compiling of the EA... so for non-standard timeframe I can solely compile using constants right?
Well thanks a lot honest_knave that explains the non-compiling of the EA... so for non-standard timeframe I can solely compile using constants right?
You have the option to use #define statement e.g.
#define PERIOD_M45 45
Great thanks for the help!!
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
Hi, could somebody tell me why I cannot compile an Mt4 EA with an M45 period while I can compile it with an H2 period? M45 chart was created offline with period converter and still it doesnt work. So I can it compile for H2??
Thanks!