1 Załącznik (y) Ten EA zamyka zarówno zamówienia buystop, jak i sellstop, powinien zamykać tylko zlecenia sellstop.

Co należy poprawić w kodzie?


Z poważaniem



#property copyright Copyright 09, Coder.
#property link http://www.coder.net

// ----------------------------------------------- -------------------
//| funkcja inicjalizacji eksperta |
// ----------------------------------------------- -------------------
int init ()
{
//----

//----
return (0);
}
// ----------------------------------------------- -------------------
//| funkcja dezinicjalizacji eksperta |
// ----------------------------------------------- -------------------
int deinit ()
{
//----

//----
return (0);
}
// ----------------------------------------------- -------------------
//| funkcja startu eksperta |
// ----------------------------------------------- -------------------
#include lt; stdlib.mqhgt;

int start ()
{
int iOrders = OrdersTotal () - 1, i;
if ((0 == 0) Symbol () == Symbol ())
{
dla (i = iOrders; igt; = 0; i--)
{
if (OrderSelect (i, SELECT_BY_POS, MODE_TRADES) (OrderType () == OP_SELLSTOP)! OrderDelete (OrderTicket ())) Print (OrderError ());
}
RefreshRates ();
}
return (0);
}
// ----------------------------------------------- -------------------

ciąg OrderError ()
{
int iError = GetLastError ();
return (StringConenate (Order:, OrderTicket (), GetLastError () =, iError,, ErrorDescription (iError)));
}

https://www.forex-instant.com/attach...0787390882.mq4