Simple Question

 

I am a beginner. Please tell me if I have this code to create a buy stop order

BuyTicket = OrderSend(Symbol(),OP_BUYSTOP,LotSize,BuyPrice,UseSlippage,BuyStopLoss,BuyTakeProfit,"Buy Stop Order",MagicNumber,0,Green);

Will "BuyTicket" be assigned a number immediately or only when the Buy transaction is activated?

IOW will it only be assigned "true" or "false" (1; -1?) immediately and only later when the Buy transaction is activated given a proper number that can be read on MT4 terminal?

If this was a OP_BUY order will it be different?

 

OrderSend return an int not a bool . . . . so it returns a number not true/false https://docs.mql4.com/trading/OrderSend

If the OrderSend is successful a ticket number will be assigned immediately . . . when the transaction is activated the trade type will change from OP_BUYSTOP to OP_BUY

 
RaptorUK:

OrderSend return an int not a bool . . . . so it returns a number not true/false https://docs.mql4.com/trading/OrderSend

If the OrderSend is successful a ticket number will be assigned immediately . . . when the transaction is activated the trade type will change from OP_BUYSTOP to OP_BUY

Thanks a lot RaptorUK! It clears up things for me!