//+-------------------------------------------------------------------------------------+
//| Открытие длинных позиций |
//+-------------------------------------------------------------------------------------+
bool OpenBuy(int sign)
{
int ticket = -1;
string myNote = "Сов баянул";
ticket = OrderSend(Symbol(), OP_BUY, 0.1, Ask, i_slippage, 0, 0, myNote,
i_myMagic + sign, 0, Blue);
return (ticket > 0 &&
OrderSelect(ticket, SELECT_BY_TICKET));
}
//+-------------------------------------------------------------------------------------+
//| Открытие коротких позиций |
//+-------------------------------------------------------------------------------------+
bool OpenSell(int sign)
{
int ticket = -1;
string myNote = "Сов шортанул";
ticket = OrderSend(Symbol(), OP_BUY, 0.1, Bid, i_slippage, 0, 0, myNote,
i_myMagic + sign, 0, Red);
return (ticket > 0 &&
OrderSelect(ticket, SELECT_BY_TICKET));
}