class ClosedPositionBuilder

Parents

ClosedPosition

Brief

The builder of the ClosedPosition class

Public Methods

build

Builds a new instance of the ClosedPosition class with the set parameters

ClosedPositionBuilder

A constructor

setAccountId

Sets the unique identification number of the account the position was closed on

setAccountKind

Sets the type of the account

setAccountName

Sets the unique name of the account the position was closed on

setAmount

Sets the amount of the position

setBuySell

Sets the trade operation the position was opened by

setCloseOrderId

Sets the unique identification number of the order the position was closed by

setCloseOrderParties

Sets the unique identifier of the environment that was used to close the position

setCloseOrderReqId

Sets the identifier of the order request the position was closed by

setCloseOrderRequestTXT

Sets the custom identifier of the order the position was closed by

setCloseQuoteId

Sets the unique identifier of the pair of prices (bid and ask) the position was closed at

setCloseRate

Sets the price the position was closed at

setCloseTime

Sets the date and time when the position was closed

setCommission

Sets the amount of funds subtracted from the account balance to pay for the broker's service in accordance with the terms and conditions of the account trading agreement

setDividends

Sets the amount of dividends earned or paid for the position

setGrossPL

Sets the profit or loss of the position in the account currency

setNetPL

Sets the amount of the position profit/loss including commissions, interest, and dividends

setOfferId

Sets the unique identification number of the instrument traded

setOpenOrderId

Sets the unique identification number of the order the position was opened by

setOpenOrderReqId

Sets the identifier of the order request the position was opened by

setOpenOrderRequestTXT

Sets the custom identifier of the order the position was opened by

setOpenQuoteId

Sets the unique identifier of the pair of prices (bid and ask) the position was opened at

setOpenRate

Sets the price the position was opened at

setOpenTime

Sets the date and time when the position was opened

setPL

Sets the profit or loss of one lot of the position in the account currency

setPLPips

Sets the profit or loss of one lot of the position in pips

setRolloverInterest

Sets the cumulative amount of funds that is added to the account balance for holding the position overnight

setTradeID

Sets the unique identification number of the closed position

setTradeIdOrigin

Sets the unique identification number of the original position a partial closing of which resulted in opening of the current position

setTradeIdRemain

Sets the unique identification number of the position opened as a result of the partial closing of the current position

setValueDate

Sets the simulated delivery date

back