Code: Select all
bool LookForTradeClosure(int ticket)
{
...
if (OrderType() == OP_BUY)
{
...
if (CloseTrade && trend == down) CloseThisTrade = true;
}//if (OrderType() == OP_BUY)
if (OrderType() == OP_SELL)
{
...
if (CloseTrade && trend == up) CloseThisTrade = true;
...
}//if (OrderType() == OP_SELL)
...
}//End bool LookForTradeClosure()thanks