Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
so then, how does one modify a stoploss on such an order?
You select an order based usually on magic number, symbol and type and then you do the necessary modifications
Does the Magic Number of a Pending Order stay the same when it is opened?
Can you maybe give me an example of OrderModify using the Magic Number?
Thanx
Can you maybe give me an example of OrderModify using the Magic Number? Thanx
Try something like this :
{
if (!OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES)) continue;
if (OrderSymbol() != Symbol()) continue;
if (OrderMagicNumber()!= MagicNumber) continue;
if (OrderType() == OP_BUY)
{
// code for buy order modification
}
if (OrderType() == OP_SELL)
{
// code for sell order modification
}
}