Download MetaTrader 5
To add comments, please log in or register
Do you want to learn MQL5? 300 articles will help you!
Vivek Vyas
203
Vivek Vyas 2015.02.19 20:01 
void BuyOrderModifyFlex60()
{
    for (int i=OrdersTotal()-1; i >= 0; i--)
    if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
    {
        if (OrderType() == OP_BUY && OrderSymbol() == Symbol() && OrderMagicNumber() == 1)
        {
            double SL = NormalizeDouble(iCustom(NULL, NULL, "superdupertrend",22,0,15,6,0), NDigits);
            double TP = NormalizeDouble(iCustom(NULL, NULL, "superdupertrend",22,0,15,0,0), NDigits);
            bool ret = OrderModify(OrderTicket(), OrderOpenPrice(), SL, TP, 0, White);
            if (ret == false)
            Print("OrderModify() error - ", ErrorDescription(GetLastError()));
        }
    }
    
}



int deinit()
{
    if (false) ObjectsDeleteAll();
    
   
}

ERROR LOG IS '\end_of_program' - unbalanced left parenthesis

ERROR LINE MARKED YELLOW PLEASE KINDLY ADVICE HAVE COME HERE AFTER GOOGLING TOPIC AND ALL RESEARCH WORK.


whroeder1
13597
whroeder1 2015.02.19 20:25  
Error is always above the indicated line.
Vivek Vyas
203
Vivek Vyas 2015.02.20 16:24  
Thanks WHRooeder !!cheers !!it was really helpful !!
/
To add comments, please log in or register