Class MetatraderOrder
- java.lang.Object
-
- cloud.metaapi.sdk.clients.meta_api.models.MetatraderOrder
-
public class MetatraderOrder extends Object
MetaTrader order
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetatraderOrder.FillingModeOrder filling mode.static classMetatraderOrder.OrderReasonOrder opening reason.static classMetatraderOrder.OrderStateOrder state.static classMetatraderOrder.OrderTypeOrder type.
-
Field Summary
Fields Modifier and Type Field Description StringclientIdClient-assigned id ornull.StringcommentOrder comment ornull.doublecurrentPriceCurrent pricedoublecurrentVolumeOrder remaining quantity, i.e. requested quantity - filled quantityIsoTimedoneTimeTime order was executed or canceled at ornull.IsoTimeexpirationTimeOptional order expiration time ornullExpirationOptions.ExpirationTypeexpirationTypeOrder expiration typeMetatraderOrder.FillingModefillingModeOrder filling modeStringidOrder id (ticket number)intmagicOrder magic number, identifies the EA which created the orderDoubleopenPriceOrder open price (market price for market orders, limit price for limit orders or stop price for stop orders) ornullStringoriginalCommentOrder original comment ornull(present if possible to restore original comment from history)StringplatformPlatform id (mt4 or mt5)StringpositionIdOrder position id ornull.MetatraderOrder.OrderReasonreasonOrder opening reasonMetatraderOrder.OrderStatestateOrder stateDoublestopLossOrder stop loss price ornullStringsymbolOrder symbolDoubletakeProfitOrder take profit price ornullIsoTimetimeTime order was created atMetatraderOrder.OrderTypetypeOrder typeBooleanupdatePendingOptional flag indicating that order client id and original comment was not identified yet and will be updated in a future synchronization packet, ornulldoublevolumeOrder requested quantity
-
Constructor Summary
Constructors Constructor Description MetatraderOrder()
-
-
-
Field Detail
-
id
public String id
Order id (ticket number)
-
type
public MetatraderOrder.OrderType type
Order type
-
state
public MetatraderOrder.OrderState state
Order state
-
magic
public int magic
Order magic number, identifies the EA which created the order
-
time
public IsoTime time
Time order was created at
-
doneTime
public IsoTime doneTime
Time order was executed or canceled at ornull. Will be specified for completed orders only
-
symbol
public String symbol
Order symbol
-
openPrice
public Double openPrice
Order open price (market price for market orders, limit price for limit orders or stop price for stop orders) ornull
-
currentPrice
public double currentPrice
Current price
-
stopLoss
public Double stopLoss
Order stop loss price ornull
-
takeProfit
public Double takeProfit
Order take profit price ornull
-
volume
public double volume
Order requested quantity
-
currentVolume
public double currentVolume
Order remaining quantity, i.e. requested quantity - filled quantity
-
positionId
public String positionId
Order position id ornull. Present only if the order has a position attached to it
-
comment
public String comment
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/
-
originalComment
public String originalComment
Order original comment ornull(present if possible to restore original comment from history)
-
clientId
public String clientId
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/
-
platform
public String platform
Platform id (mt4 or mt5)
-
updatePending
public Boolean updatePending
Optional flag indicating that order client id and original comment was not identified yet and will be updated in a future synchronization packet, ornull
-
reason
public MetatraderOrder.OrderReason reason
Order opening reason
-
fillingMode
public MetatraderOrder.FillingMode fillingMode
Order filling mode
-
expirationType
public ExpirationOptions.ExpirationType expirationType
Order expiration type
-
expirationTime
public IsoTime expirationTime
Optional order expiration time ornull
-
-