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.
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
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.