Hi all,
I need some assistance with this code below:
ordertick = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, 0, 0, NULL, MagicNumber, 0, Blue);
if (ordertick > 1){
if (OrderSelect(ordertick, SELECT_BY_TICKET))OrderModify(Order Ticket(),OrderOpenPrice(),0,0,0,Red );
else Print("OrderModify() ticket=",ordertick," failed with error code ",GetLastError());
}
else Print("OrderSend ticket=",ordertick," failed with error code ",GetLastError());
The codes are correct but it seems that when i try to execute the script it says Error code 136. I believe it has something to do with NormalizeDouble.
Can anyone help with that code and where to insert this code ?
Thank you
Keiran
I need some assistance with this code below:
ordertick = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, 0, 0, NULL, MagicNumber, 0, Blue);
if (ordertick > 1){
if (OrderSelect(ordertick, SELECT_BY_TICKET))OrderModify(Order Ticket(),OrderOpenPrice(),0,0,0,Red );
else Print("OrderModify() ticket=",ordertick," failed with error code ",GetLastError());
}
else Print("OrderSend ticket=",ordertick," failed with error code ",GetLastError());
The codes are correct but it seems that when i try to execute the script it says Error code 136. I believe it has something to do with NormalizeDouble.
Can anyone help with that code and where to insert this code ?
Thank you
Keiran