Download MetaTrader 5

Cleanest way to do this

To add comments, please log in or register
forlorn_beast
24
forlorn_beast  
What is the cleanest way of ending an indicator from within the OnCalculate? Also is it acceptable to call OnInit from within OnCalculate? What impact will that have on prev_calculated? If the int OnInit() is used, and it is called from within OnCalculate, and returns a non zero value (error) will it still call OnDeInit as if it wasnt being called from OnCalculate and terminate the indicator? Does this all apply to the OnTick for EAs as well?
To add comments, please log in or register