Click or drag to resize

MT5APIOrderSendAsync Method

Send order and don't wait execution. Use OnOrderProgress event to get result.

Namespace: mtapi.mt5
Assembly: mt5api (in mt5api.dll) Version: 5.3677.1.2
Syntax
public void OrderSendAsync(
	int requestId,
	string symbol,
	double lots,
	double price,
	OrderType type,
	double sl = 0,
	double tp = 0,
	ulong deviation = 0,
	string comment = null,
	long expertID = 0,
	FillPolicy fillPolicy = FillPolicy.Any,
	TradeType tradeType = TradeType.Transfer,
	double stoplimit = 0,
	Expiration expiration = null,
	long closeByTicket = 0,
	PlacedType placedType = PlacedType.Manually
)

Parameters

requestId  Int32
Uniq temporary ID that can be used before ticket would be assigned. You can use GetRequestID()
symbol  String
Symbol
lots  Double
Lots
price  Double
Price
type  OrderType
Order type
sl  Double  (Optional)
Stop Loss
tp  Double  (Optional)
Take Profit
deviation  UInt64  (Optional)
Max deviation from specified price also known as Slppage
comment  String  (Optional)
String comment
expertID  Int64  (Optional)
Also known as magic number
fillPolicy  FillPolicy  (Optional)
Fill policy depends on symbol settings on broker
tradeType  TradeType  (Optional)
Allows to specify execution type
stoplimit  Double  (Optional)
StopLimit price
expiration  Expiration  (Optional)
 
closeByTicket  Int64  (Optional)
 
placedType  PlacedType  (Optional)
 
See Also