How to Pause Oncalculate function

 

I want to pause calculation in OnCalculate so all drawings on chart freezes until i enable calculation again

How to do that?

 
You need to manage rates_total, prev_calculated and the return value from OnCalculate inside your code.

To do so you could use OnTimer event handler.

Search the forum on "how to do your lookbacks properly".