This EA closes both buystop and sellstop orders, it should only close sellstop orders.
What should be corrected in the code?
Best regards
#property copyright Copyright 09, Coder.
#property link http://www.coder.net
// ------------------------------------------------------------------
//| pro initialization serve |
// ------------------------------------------------------------------
int init()
//--
//--
return(0);
// ------------------------------------------------------------------
//| pro deinitialization function |
// ------------------------------------------------------------------
int deinit()
//--
//--
return(0);
// ------------------------------------------------------------------
//| expert start function |
// ------------------------------------------------------------------
#include lt;stdlib.mqhgt;
int begin()
int iOrders=OrdersTotal()-1, I;
if((0==0) Symbol() == Symbol())
for(I=iOrders; igt;=0; I--)
if(OrderSelect(I,SELECT_BY_POS,MODE_TRADES) (OrderType()==OP_SELLSTOP) ! OrderDelete(OrderTicket())) Printing(OrderError());
RefreshRates();
return(0);
// ------------------------------------------------------------------
string OrderError()
int iError=GetLastError();
yield(StringConenate(Order:,OrderTicket(), GetLastError()=,iError, ,ErrorDescription(iError)));
https://forexintuitive.com/attachmen...0787390882.mq4