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: 4.6.1.4
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.FillOrKill,
	TradeType tradeType = TradeType.Transfer,
	double stoplimit = 0
)

Parameters

symbol
Type: SystemString
Symbol
lots
Type: SystemDouble
Lots
price
Type: SystemDouble
Price
type
Type: mtapi.mt5OrderType
Order type
sl (Optional)
Type: SystemDouble
Stop Loss
tp (Optional)
Type: SystemDouble
Take Profit
deviation (Optional)
Type: SystemUInt64
Max deviation from specified price also known as Slppage
comment (Optional)
Type: SystemString
String comment
expertID (Optional)
Type: SystemInt64
Also known as magic number
fillPolicy (Optional)
Type: mtapi.mt5FillPolicy
Fill policy depends on symbol settings on broker
tradeType (Optional)
Type: mtapi.mt5TradeType
Allows to specify execution type
stoplimit (Optional)
Type: SystemDouble
StopLimit price

Return Value

Type: Order
See Also