Can you please point me
how to stop EA from trading if the last trade is loss, I want to code this as other EA as the EA i had was compiled EX4.
Extra notes / IDEAS : I had only 1 EA running .
either stop EA from trading or close MT4.
or we can write EA to check the last trade every 5 min, if loss then stop EA or close mt4 .
Will this be possible ?
Thanks for Help!!
Sample code i have :
if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic)
//for buy order
if(OrderType()==OP_BUY && OrderClosePrice()>=OrderTakeProfit()) last="profit";
if(OrderType()==OP_BUY && OrderClosePrice()<=OrderStopLoss()) last="loss";