MLQ4: Event handling in called Indicator (iCustom())

 

Hi,


if I call an indicator in my EA Tick_by_Tick using iCustom(), what Indicator-events will be triggered Tick_by_Tick, in other words, will the indicator On_Init Event fire every time when I call from the EA, or will the Indicator do the On_Init once and subsequently execute only the On_Calculate (Tick) events?? Is there any "sort of synch"  between the EA On_Init() and the Indi On_Init() resp. On_Tick <-> On_Calculate ??


Thanks 4 Help

hk

 

I am not 100% sure, but it looks to me that if you call iCustom() without setting indicator parameters, it will not be reinitialized.

Simplest way to determine is to print something into log file from the indicator OnInit(). Then you will see when it was called.

 
lve0200:

Hi,


if I call an indicator in my EA Tick_by_Tick using iCustom(), what Indicator-events will be triggered Tick_by_Tick, in other words, will the indicator On_Init Event fire every time when I call from the EA, or will the Indicator do the On_Init once and subsequently execute only the On_Calculate (Tick) events?? Is there any "sort of synch"  between the EA On_Init() and the Indi On_Init() resp. On_Tick <-> On_Calculate ??


Thanks 4 Help

hk

OnInit() is only called 1 time.

OnCalculate() on each tick, once time.

Reason: