Using iCustom after every tick

 

Sorry for the beginner question, but I'm programming my first EA :)

Is there a way to calculate indicator values after every tick? For example, a new tick comes in and my EA immediately calls iCustom (which uses the sample Moving Average indicator) to calculate the new average.

 
lin-unix:

Sorry for the beginner question, but I'm programming my first EA :)

Is there a way to calculate indicator values after every tick? For example, a new tick comes in and my EA immediately calls iCustom (which uses the sample Moving Average indicator) to calculate the new average.

Read https://book.mql4.com/programm/special about the the special function start(). Everything contained in that function is executed with every new tick comeing in.

"In Expert Advisors the special function start() is called (and executed) immediately after a new tick comes"

 
start() is called for indicators first, then for all idle EAs. That is why indicators can not sleep.