public class MetatraderTrade extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MetatraderTrade.ActionType
Action type enum
|
| Modifier and Type | Field and Description |
|---|---|
MetatraderTrade.ActionType |
actionType
Action type
|
String |
clientId
Client-assigned id or
null. |
String |
closeByPositionId
Identifier of an opposite position used for closing by order ORDER_TYPE_CLOSE_BY, or
null |
String |
comment
Order comment or
null. |
Long |
magic
Magic number (expert adviser id) or
null |
Double |
openPrice
Order limit or stop price or
null |
String |
orderId
Order id or
null, must be specified for order modification commands |
String |
positionId
Position id or
null, must be specified for position modification commands |
Double |
stopLimitPrice
The Limit order price for the StopLimit order, or
null |
Double |
stopLoss
Stop loss price or
null |
StopOptions.StopUnits |
stopLossUnits
Stop loss units, or
null. |
String |
symbol
Symbol to trade or
null |
Double |
takeProfit
Take profit price or
null |
StopOptions.StopUnits |
takeProfitUnits
Take profit units, or
null. |
Double |
volume
Order volume or
null |
| Constructor and Description |
|---|
MetatraderTrade() |
public MetatraderTrade.ActionType actionType
public String symbol
nullpublic Double volume
nullpublic Double openPrice
nullpublic Double stopLoss
nullpublic StopOptions.StopUnits stopLossUnits
null. Default is ABSOLUTE_PRICEpublic Double takeProfit
nullpublic StopOptions.StopUnits takeProfitUnits
null. Default is ABSOLUTE_PRICEpublic String orderId
null, must be specified for order modification commandspublic String positionId
null, must be specified for position modification commandspublic String closeByPositionId
nullpublic Double stopLimitPrice
nullpublic String comment
null. 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/public String clientId
null. 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/public Long magic
nullCopyright © 2023. All rights reserved.