public class Execution
extends java.lang.Object
Constructor and Description |
---|
Execution(OrderContext ctx,
Order order,
boolean includeCommission)
Constructor
|
Execution(java.lang.String acctId,
java.lang.String execId,
Instrument instr,
java.lang.Object refId,
long time,
Enums.OrderAction action,
int qty,
float avgPrice,
float entryPrice,
Enums.ExecutionType type,
float pnl,
float pips,
float commission,
int position,
int barCount,
float maxPriceReached,
float minPriceReached)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAccountId()
Gets the ID of the account that this execution occurred on.
|
Enums.OrderAction |
getAction()
Gets the action (buy or sell)
|
float |
getAvgPrice()
Gets the average fill price.
|
int |
getBar()
Gets the index of the bar when this execution occurred (since the strategy was last activated)
|
double |
getCommission()
Gets the commission.
|
float |
getEntryPrice()
Gets the entry price.
|
java.lang.String |
getId()
Gets the unique ID of this execution.
|
Instrument |
getInstrument()
Gets the instrument that was traded.
|
float |
getMaxPriceReached()
Gets the maximum price reached since the last execution.
|
float |
getMinPriceReached()
Gets the minimum price reached since the last execution.
|
double |
getNetPnl()
Gets the net profit/loss (includes commission cost).
|
float |
getPips()
Gets the pips (points) gained/lost
|
double |
getPnl()
Gets the profit or loss associated with this trade.
|
int |
getPosition()
Gets the position held after this execution.
|
int |
getQuantity()
Gets the quantity that was executed.
|
java.lang.Object |
getReferenceId()
Gets the reference ID for this execution.
|
long |
getTime()
Gets the time this execution occurred.
|
Enums.ExecutionType |
getType()
Gets the type of execution (Entry, Exit or SAR).
|
java.lang.String |
toString() |
public Execution(OrderContext ctx, Order order, boolean includeCommission)
ctx
- order contextorder
- includeCommission
- public Execution(java.lang.String acctId, java.lang.String execId, Instrument instr, java.lang.Object refId, long time, Enums.OrderAction action, int qty, float avgPrice, float entryPrice, Enums.ExecutionType type, float pnl, float pips, float commission, int position, int barCount, float maxPriceReached, float minPriceReached)
acctId
- execId
- instr
- refId
- time
- action
- qty
- avgPrice
- entryPrice
- type
- pnl
- pips
- commission
- position
- barCount
- maxPriceReached
- minPriceReached
- public java.lang.String getAccountId()
public java.lang.String getId()
public Instrument getInstrument()
public java.lang.Object getReferenceId()
public long getTime()
public Enums.OrderAction getAction()
public int getQuantity()
public float getAvgPrice()
public float getEntryPrice()
public Enums.ExecutionType getType()
public double getPnl()
public double getCommission()
public double getNetPnl()
public float getPips()
public int getPosition()
public int getBar()
public float getMaxPriceReached()
public float getMinPriceReached()
public java.lang.String toString()
toString
in class java.lang.Object