You will need a separate instance of OnTImer() on each of the charts,or you have to continuously cycle through all chart ID's which can get more complex to manage.
But I didn't understood why the Timer function is not working. I am calling the same indicator and the indicator itself has the Event Timer which has to get executed, am I not right, sir?
Please explain this to me. If possible can you give a demo code that would help a lot.
You have to attach the same indicator to multiple charts each running their own timer event.
Meaning the indicator that you add has to have it's own timer function.
If I am adding the indicator to a chart within that indicator itself, then I guess the Timer function is already there. Check my code. If that is the scenario then the timer should get executed, am I right sir?
If I am adding the indicator to a chart within that indicator itself, then I guess the Timer function is already there. Check my code. If that is the scenario then the timer should get executed, am I right sir?
You did not attach the indicators to a chart, but you rather executed iCustom() command. Only OnInit() and OnCalculate() are triggered. Some commands (e.g. graphic ones) are ignored within iCustom() as well.
You did not attach the indicators to a chart, but you rather executed iCustom() command. Only OnInit() and OnCalculate() are triggered. Some commands (e.g. graphic ones) are ignored within iCustom() as well.
Sir, only if the OnInit() is triggered then I have Event Timer included inside the OnInit(), then why it is not happening?
The OnInit() and
EventSetMillisecondTimer(100);
Is only for the current chart, not for the charts that you are calling via iCustom.
We know nothing about the existence of any timer in
"Real Time Testing\\Trade_Real_Test"
Since you are not showing any of the code involved.
You say you call the indicator inside of itself this would cause an endless loop of opening charts and calling indicators within indicator.
That part is not clear, as are many.
If you call iCustom or any other indicator there is no need to open a chart or add the indicator, all you need is the handle to copy data directly.The OnInit() and
Is only for the current chart, not for the charts that you are calling via iCustom.
We know nothing about the existence of any timer in
Since you are not showing any of the code involved.
You say you call the indicator inside of itself this would cause an endless loop of opening charts and calling indicators within indicator.
That part is not clear, as are many.
If you call iCustom or any other indicator there is no need to open a chart or add the indicator, all you need is the handle to copy data directly.Sir I have shared the code above. Is that not the code you were expecting? What else should I say? I am just experimenting with the function of MQL5. Hence the above code is what I tried. Above code means what I have mentioned in the question of mine.
Sir, only if the OnInit() is triggered then I have Event Timer included inside the OnInit(), then why it is not happening?
Probably because "Only OnInit() and OnCalculate() are triggered." and " Some commands are ignored within iCustom()..."
If I translate it for you, no OnTimer(), OnChartEvent(), OnTester() are ever invoked within iCustom().
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am trying to call the indicator inside itself with different parameter and Chart symbols. See what I did:
I see when I apply the indicator on the chart, the other charts start getting appeared on screen with the indicator applied on it. But I could not see the output of the OnTimer(). I only see the output of the timer for the symbol on which is was primarily applied and no output for the rest charts which I drew using the program. I could not understand what is the reason for it. Please help me in running the Timer function for the rest charts too.