public interface IReportPosition
Provides information about report position
| Nested Class Summary | |
|---|---|
static class |
IReportPosition.PositionType
Indicates type of Position |
| Method Summary | |
|---|---|
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.getSecondaryCurrency()) |
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()
|
| Method Detail |
|---|
IReportPosition.PositionType getPositionType()
IReportPosition.PositionTypejava.lang.String getPositionId()
boolean isLong()
true if position is LONG, false otherwiseInstrument getInstrument()
Instrumentdouble 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.getSecondaryCurrency())Money getSwaps()
Money getGrossProfitLoss()
+ #getSwaps() expressed in
position's instrument second currency (Instrument.getSecondaryCurrency())
Money getCommission()
long getOpenTime()
long getCloseTime()
boolean isClosed()
true when (getClosePrice() > 0 and getCloseTime() > 0), false otherwise