Class TradeOptions
- java.lang.Object
-
- cloud.metaapi.sdk.clients.meta_api.models.TradeOptions
-
- Direct Known Subclasses:
MarketTradeOptions,PendingTradeOptions
public class TradeOptions extends Object
Common trade options
-
-
Field Summary
Fields Modifier and Type Field Description StringclientIdOptional client-assigned id ornull.StringcommentOptional order comment ornull.List<MetatraderSymbolSpecification.FillingMode>fillingModesOptional allowed filling modes in the order of priority ornull.IntegermagicMagic (expert id) number ornull.IntegerslippageOptional slippage in points ornull.
-
Constructor Summary
Constructors Constructor Description TradeOptions()
-
-
-
Field Detail
-
comment
public String comment
Optional order comment ornull. The sum of the line lengths of the comment and the clientId must be less than or equal to 26. For more information see https://metaapi.cloud/docs/client/clientIdUsage/
-
clientId
public String clientId
Optional client-assigned id ornull. The id value can be assigned when submitting a trade and will be present on position, history orders and history deals related to the trade. You can use this field to bind your trades to objects in your application and then track trade progress. The sum of the line lengths of the comment and the clientId must be less than or equal to 26. For more information see https://metaapi.cloud/docs/client/clientIdUsage/
-
magic
public Integer magic
Magic (expert id) number ornull. If not set default value specified in account entity will be used.
-
slippage
public Integer slippage
Optional slippage in points ornull. Should be greater or equal to zero. If not set, default value specified in account entity will be used. Slippage is ignored if execution mode set to SYMBOL_TRADE_EXECUTION_MARKET in symbol specification
-
fillingModes
public List<MetatraderSymbolSpecification.FillingMode> fillingModes
Optional allowed filling modes in the order of priority ornull. Default is to allow all filling modes and prefer ORDER_FILLING_FOK over ORDER_FILLING_IOC. See https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties#enum_order_type_filling for extra explanation. Note that filling modes can be specified for market orders only, i.e. createMarketBuyOrder, createMarketSellOrder, closePositionPartially, closePosition, closePositionBySymbol
-
-