public interface IReportPosition
Modifier and Type | Interface and Description |
---|---|
static class |
IReportPosition.PositionType
Indicates type of Position
|
Modifier and Type | Method and Description |
---|---|
double |
getAmount()
Returns amount of the position.
|
double |
getClosePrice()
Returns price at which position was closed or 0 if order or position part wasn't closed.
|
long |
getCloseTime()
Returns time when server closed the position
|
Money |
getCommission()
Returns commission expressed in account's currency
|
double |
getCurrentPrice() |
Money |
getGrossProfitLoss()
Returns Gross Profit/Loss (
+ #getSwaps() expressed in
position's instrument second currency (Instrument.getSecondaryJFCurrency() ) |
Instrument |
getInstrument() |
double |
getOpenPrice()
Returns price at which position was filled
|
long |
getOpenTime()
Returns last time when server filled the position
|
java.lang.String |
getPositionId() |
IReportPosition.PositionType |
getPositionType() |
Money |
getProfitLoss() |
Money |
getSwaps() |
boolean |
isClosed() |
boolean |
isLong() |
IReportPosition.PositionType getPositionType()
IReportPosition.PositionType
java.lang.String getPositionId()
boolean isLong()
true
if position is LONG, false
otherwiseInstrument getInstrument()
Instrument
double getAmount()
isClosed
== false) returns amount requested.
For filled positions will return filled amount (full or partial)double getOpenPrice()
double getCurrentPrice()
double getClosePrice()
Money getProfitLoss()
Instrument.getSecondaryJFCurrency()
)Money getSwaps()
Money getGrossProfitLoss()
+ #getSwaps()
expressed in
position's instrument second currency (Instrument.getSecondaryJFCurrency()
)Money getCommission()
long getOpenTime()
long getCloseTime()
boolean isClosed()
true
when (getClosePrice()
> 0 and getCloseTime()
> 0), false
otherwiseCopyright © 2024. All rights reserved.