com.oanda.fxtrade.api
Interface MarketOrder

All Superinterfaces:
java.lang.Cloneable, Order

public interface MarketOrder
extends Order, java.lang.Cloneable

A MarketOrder is used to create a spot trade.

See Also:
Order

Method Summary
 java.lang.Object clone()
          Returns a exact copy of this MarketOrder.
 MarketOrder getClose()
           
 double getRealizedPL()
          Returns the profit realized on this trade.
 long getTransactionLink()
          Returns the transaction number of any trade or order that is related to this trade.
 double getUnrealizedPL(FXTick tick)
          Returns the unrealized profit/loss held by this order based on the provided market rate.
 java.lang.String toString()
           
 
Methods inherited from interface com.oanda.fxtrade.api.Order
getHighPriceLimit, getLowPriceLimit, getPair, getPrice, getStopLoss, getTakeProfit, getTimestamp, getTrailingStopLoss, getTransactionNumber, getUnits, setHighPriceLimit, setLowPriceLimit, setPair, setStopLoss, setTakeProfit, setTrailingStopLoss, setUnits
 

Method Detail

clone

java.lang.Object clone()
Returns a exact copy of this MarketOrder.


getClose

MarketOrder getClose()

getRealizedPL

double getRealizedPL()
Returns the profit realized on this trade.

Returns:
the profit realized on this trade. 0 will be returned if the trade is still open.

getTransactionLink

long getTransactionLink()
Returns the transaction number of any trade or order that is related to this trade. For example, if this MarketOrder was created by the triggering of a LimitOrder, calling getTransactionLink() would return the ticket number of that LimitOrder.

Returns:
the transaction link

getUnrealizedPL

double getUnrealizedPL(FXTick tick)
Returns the unrealized profit/loss held by this order based on the provided market rate.

Parameters:
tick - the FXTick to be used for calculating P&L
Returns:
the unrealized P&L (reported in quote currency)
See Also:
FXTick

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005 OANDA Corporation. All Rights Reserved.