EA Freezes

 

Sometime EA Freezes and there is no error. My EA runs on OnTimer

I keep printing TimeLocal() on timer on comment but it also freezes

How can i find the reason of Deinit or freeze?

all works fine when I restart EA

 

You can comment out certain sections and test if it still freezes, then step by step bring it back until it freezes again so that you can narrow down which part is causing it.

In essence, you find the problem by analysing the code and following its logic until you find the cause.

 
Fernando Carreiro #:

You can comment out certain sections and test if it still freezes, then step by step bring it back until it freezes again so that you can narrow down which part is causing it.

In essence, you find the problem by analysing the code and following its logic until you find the cause.

I understand your point but this is not happening to only EA. Its happening to all the chart tabs which are open.

So it freezes whole chart tabs which are open along with the ea.

 
Arpit T #:I understand your point but this is not happening to only EA. Its happening to all the chart tabs which are open. So it freezes whole chart tabs which are open along with the ea.
Then it is probably an Indicator that you are calling that is causing the problem, because all charts and all indicators for a symbol run on a single thread. If any indicator freezes then all indicators and charts for that symbol freezes.
Reason: