Click or drag to resize

MT5APIOrderSend 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 Order OrderSend(
	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

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)
 

Return Value

Order
See Also