Keith Watford:
Tanks
- Farhad1: I want to create a function that takes the string and returns the enum, but this function gives the following error. how can i convert string to enum?
Simplify your code. Stop using strings. Use the enumeration and you are done. input ENUM_TIMEFRAMES timeframe = PERIOD_D1; No function needed, no conversion needed.
-
See also Chartperiod() or period() value greater than 1 hour quite divergent from minute values. Incl. request table enhancement (mql5 documentation) - General - MQL5 programming forum #1 and #6 2020.08.28

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 want to create a function that takes the string and returns the enum, but this function gives the following error. how can i convert string to enum?
error: begining bracket expected