I imagine it must be because it doesn't get out a loop for some reason. So I put this code in every loop, so that the EA finishes forcefully if it's on a loop for more than 14 minutes:
And the line
in the beginning of every function. If kill_ea is true, start will always return 0 in the beginning.
What's possibly wrong with the EA to get 100% CPU usage?
Inserted Code
if ( isHigherThan(TimeCurrent() - last_time_sr, 840) )
{
kill_ea = true;
Alert(Symbol()," finish");
return;
} And the line
Inserted Code
datetime last_time_sr = TimeCurrent();
in the beginning of every function. If kill_ea is true, start will always return 0 in the beginning.
What's possibly wrong with the EA to get 100% CPU usage?