- www.mql5.com
Yes, but ... "The symbol/period change leads to the re-initialization of the Expert Advisor attached to a chart."
Then describe in detail what issues you are having. We can't help if you don't tell us what they are.
Also, when providing sample code, please make sure that it compiles or that at least a proper structure is presented. Otherwise we don't know if the problem is the lack of properly structured code or something else.
Peter Kaiza #: Please help
Help you with what? You haven't stated a problem.
"but having issues" is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. (2004)
When asking about code
Be precise and informative about your problem
void OnTick()
{
if ( fmod(TimeLocal(),10)>5)
{
move_to_a_different_TF_1();
}
else
{
move_to_a_different_TF_2();
}
}
void move_to_a_different_TF_1()
{
ChartSetSymbolPeriod(0, NULL, PERIOD_H1);
}
void move_to_a_different_TF_2()
{
ChartSetSymbolPeriod(0, NULL, PERIOD_M1);
}
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use