Class Execution

java.lang.Object
com.motivewave.platform.sdk.order_mgmt.Execution

public class Execution extends Object
Represents an executed order.
  • Constructor Details

    • Execution

      public Execution(OrderContext ctx, Order order, boolean includeCommission)
      Constructor
      Parameters:
      ctx - order context
      order -
      includeCommission -
    • Execution

      public Execution(String acctId, String execId, Instrument instr, Object refId, long time, Enums.OrderAction action, float qty, float avgPrice, float entryPrice, Enums.ExecutionType type, float pnl, float pips, float commission, float position, int barCount, float maxPriceReached, float minPriceReached)
      Constructor
      Parameters:
      acctId -
      execId -
      instr -
      refId -
      time -
      action -
      qty -
      avgPrice -
      entryPrice -
      type -
      pnl -
      pips -
      commission -
      position -
      barCount -
      maxPriceReached -
      minPriceReached -
  • Method Details

    • getAccountId

      public String getAccountId()
      Gets the ID of the account that this execution occurred on.
    • getId

      public String getId()
      Gets the unique ID of this execution.
    • getInstrument

      public Instrument getInstrument()
      Gets the instrument that was traded.
    • getReferenceId

      public Object getReferenceId()
      Gets the reference ID for this execution.
    • getTime

      public long getTime()
      Gets the time this execution occurred.
    • getAction

      public Enums.OrderAction getAction()
      Gets the action (buy or sell)
    • getQuantity

      public int getQuantity()
      Gets the quantity that was executed.
    • getQuantityAsFloat

      public float getQuantityAsFloat()
      Gets the quantity that was executed (as a floating point for partial quantities).
    • getAvgPrice

      public float getAvgPrice()
      Gets the average fill price.
    • getEntryPrice

      public float getEntryPrice()
      Gets the entry price.
    • getType

      public Enums.ExecutionType getType()
      Gets the type of execution (Entry, Exit or SAR).
    • getPnl

      public double getPnl()
      Gets the profit or loss associated with this trade.
    • getCommission

      public double getCommission()
      Gets the commission.
    • getNetPnl

      public double getNetPnl()
      Gets the net profit/loss (includes commission cost).
    • getPips

      public float getPips()
      Gets the pips (points) gained/lost
    • getPosition

      public int getPosition()
      Gets the position held after this execution.
    • getPositionAsFloat

      public float getPositionAsFloat()
      Gets the position held after this execution (as a floating point for partial positions).
    • getBar

      public int getBar()
      Gets the index of the bar when this execution occurred (since the strategy was last activated)
    • getMaxPriceReached

      public float getMaxPriceReached()
      Gets the maximum price reached since the last execution.
    • getMinPriceReached

      public float getMinPriceReached()
      Gets the minimum price reached since the last execution.
    • toString

      public String toString()
      Overrides:
      toString in class Object