Interface: Position
Broker.Position
Describes a single position.
Hierarchy
-
↳
Position
Properties
askPrice
Optional
askPrice: number
Best ask price provided by the broker
Inherited from
avgPrice
avgPrice: number
The weighted average price of all positions for a symbol. The library uses this value to draw a position line on the chart and to calculate profit and loss values.
Inherited from
bidPrice
Optional
bidPrice: number
Best bid price provided by the broker
Inherited from
contractExpirationDate
Optional
contractExpirationDate: ContractExpirationDate
Contract expiration date, for futures instruments
Inherited from
PositionBase.contractExpirationDate
currency
Optional
currency: string
Instrument currency displayed in the Account Manager
Inherited from
exitLevels
Optional
exitLevels: ExitLevel[]
Exit levels associated with the position. Used when BrokerConfigFlags.supportMultipleExitLevels is enabled.
Inherited from
extra
Optional
extra: ExtraData
Inherited from
guaranteedStop
Optional
guaranteedStop: number
Guaranteed stop loss price. Available when Brackets are enabled
Inherited from
id
id: string
Position ID. Usually id should be equal to brokerSymbol
Inherited from
lastPrice
Optional
lastPrice: number
Last price provided by the broker
Inherited from
longQty
Optional
longQty: number
Long position quantity
Inherited from
marketValue
Optional
marketValue: number
Market value of the position
Inherited from
message
Optional
message: OrderOrPositionMessage
Message describing the state of the position
Inherited from
qty
qty: number
Position Quantity (positive number)
Inherited from
shortQty
Optional
shortQty: number
Short position quantity
Inherited from
side
side: Side
Position Side
Inherited from
stopLoss
Optional
stopLoss: number
Stop loss price. Available when Brackets are enabled
Inherited from
stopType
Optional
stopType: StopType
Stop Loss type
Inherited from
symbol
symbol: string
Symbol name
Inherited from
takeProfit
Optional
takeProfit: number
Take profit price. Available when Brackets are enabled
Inherited from
trailingStopPips
Optional
trailingStopPips: number
Trailing stop Pips value. Available when Brackets are enabled
Inherited from
trailingStopPrice
Optional
trailingStopPrice: number
Trailing stop price. Available when Brackets are enabled
Inherited from
PositionBase.trailingStopPrice
unrealizedPl
Optional
unrealizedPl: number
Unrealized profit/loss
Inherited from
unrealizedPlPercent
Optional
unrealizedPlPercent: number
Unrealized profit/loss in percent
Inherited from
PositionBase.unrealizedPlPercent
unrealizedPlQty
Optional
unrealizedPlQty: number
Unrealized profit/loss per quantity unit
Inherited from
updateTime
Optional
updateTime: number
Last update time (unix timestamp in milliseconds)