Download MetaTrader 5
To add comments, please log in or register
Do you keep a blog? Place a link to MQL5.community there and make money!
lve0200
60
lve0200 2015.05.17 14:09 

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

Drazen Penic
2537
Drazen Penic 2015.05.17 14:59  

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.

Alain Verleyen
Moderator
30635
Alain Verleyen 2015.05.17 15:19  
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.

/
To add comments, please log in or register