EA ends not to be triggered by MT4 tick anymore

 

This is my 1st post. I browsed for the subject on the Forum but I couldn't find any clue regarding my issue.

I've developed an EA which is delivering fairly well, however I'm facing this issue which I cannot address. Here's the flow:

1. I launch the EA which runs just ok, opening and closing orders and positions, and so on.

2. Later, usually hours or days later, it happens that even if the MT4 is correctly connected (thus refreshing data) the tick doesn't trigger the EA anymore. When this happens, the EA cannot execute any more operation on the account.

3. I then need to re-start the MT4 to have the EA "unfreeze".

This is happening on various accounts, both Demo and Real, and even with different brokers.

Any help on your part will be greatly appreciated.

Thanks in advance

 
nicotognetti:

This is my 1st post. I browsed for the subject on the Forum but I couldn't find any clue regarding my issue.

I've developed an EA which is delivering fairly well, however I'm facing this issue which I cannot address. Here's the flow:

1. I launch the EA which runs just ok, opening and closing orders and positions, and so on.

2. Later, usually hours or days later, it happens that even if the MT4 is correctly connected (thus refreshing data) the tick doesn't trigger the EA anymore. When this happens, the EA cannot execute any more operation on the account.

3. I then need to re-start the MT4 to have the EA "unfreeze".

This is happening on various accounts, both Demo and Real, and even with different brokers. 

I can't see your code so I can't give you an answer.  I can make a guess if that helps ?  you have an infinite loop . . .   while or for

How have you confirmed that start() isn't being called for each new tick ?  what did you do to confirm,  not assume,  that this is the case ?

 
  1. add print statements in start() at beginning and at exit.
  2. look at journal for divide by zero error
Reason: