Cleanest way to do this

 
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?