- Please edit your (original) post and use the CODE
button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - Check that the TF isn't already M5.
- Perhaps, don't call it in OnInit.
- Why are you preventing the Human from seeing/trading other TFs?
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
Hey,
I have an issue using the function ChartSetSymbolPeriod()
Before my EA starts I want the chart to have a certain period (value of ENUM_TIMEFRAMES).
So I use the ChartSetSymbolPeriod() in the OnInit() function of the EA.
When applying the EA to a chart in a MetaTrader account that is in demo mode it works like expected.
But when I klick on the debug button in the editor the chart Period is not modified.
The function returns false but the error code is 0, which does not make sense to me.
My code is:
Thank you for your help!