Stop EA if there is loss??

 

Hi all,

I want to stop the execution of EA if there are 3 loss trades in a row. Can anyone help me regarding this.

Thnx..

Cosan

 
Check the Trade History, look for the last 3 trades having a -ve profit, set a bool Trade = false; when your EA tries to place a trade check Trade, if true then place the trade if false return(0);
 
Cosan:
I want to stop the execution of EA if there are 3 loss trades in a row. Can anyone help me regarding this.

Order History sort by closing date - MQL4 forum (final code)

Way to get the current streak - MQL4 forum (usage for your question)

Reason: