Thanks for sharing.
My understanding is that Indicator initiated via iCustom does not listen to any event. It just runs OnInit once and OnCalculate every time before the buffer access.
That would seem to be the case - thanks for confirming my suspicions
if you put a print() in OnTimer it is not executed when the indicator is called via iCustom so the OnTimer event does not work when you use iCustom.
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'm not sure if this is already documented, but I thought I'd share my findings from experimenting with iCustom and OnTimer.
Basically, it doesn't work.
Consider the following simple code:
If you now call this with a simple iCustom:
It will return 1 every time i.e. the OnTimer event of TestIndicator is not firing.
If you add the TestValue++ into the OnCalculate event, the returned iCustom value steadily increases.