Zamieszczone przez
;
string trade_arr [50] [6];
// ----------------------------------------------- -------------------
//| funkcja inicjalizacji eksperta |
// ----------------------------------------------- -------------------
int init ()
{
//----
//----
return (0);
}
// ----------------------------------------------- -------------------
//| funkcja startu eksperta |
// ----------------------------------------------- -------------------
int start ()
{
int trade_nr;
int total = OrdersTotal ();
bool trade_exist = false;
for (int pos = 0; poslt; total; pos )
{
if (OrderSelect (pos, SELECT_BY_POS) == true)
{
int trade_ticket = OrderTicket ();
dla (int c = 0; clt; = 49; c )
{
int trade_arr_int = StrToInteger (trade_arr [c] [0]);
if (trade_ticket == trade_arr_int)
{
Alert (istnieje handel);
trade_exist = true;
}
if (trade_arr [c] [0] == 0)
{int next_nr = c;
Alert (następny c, następny_nr);
}
if (trade_exist == false)
{
Alert (nowy handel);
trade_arr [next_nr] [0] = OrderTicket ();
trade_arr [next_nr] [1] = OrderStopLoss ();
trade_arr [next_nr] [2] = OrderTakeProfit ();
trade_arr [next_nr] [3] = OrderSymbol ();
trade_arr [next_nr] [4] = OrderOpenPrice ();
}
trade_exist = false;
}
}
return (0);
}
// ----------------------------------------------- -------------------