com.oanda.fxtrade.api
Interface Order

All Known Subinterfaces:
EntryOrder, LimitOrder, MarketOrder, StopLossOrder, TakeProfitOrder

public interface Order

Order is an abstract base class encapsulating the basic components of an OANDA forex order.

Note that a sell order is indicated by specifying negative units.


Method Summary
 double getHighPriceLimit()
          Returns the high price limit.
 double getLowPriceLimit()
          Returns the low price limit.
 FXPair getPair()
          Returns the FXPair.
 double getPrice()
          Returns the order price.
 StopLossOrder getStopLoss()
          Returns the StopLossOrder associated with this Order.
 TakeProfitOrder getTakeProfit()
          Returns the TakeProfitOrder associated with this Order.
 long getTimestamp()
          Returns the timestamp for this order.
 double getTrailingStopLoss()
           
 long getTransactionNumber()
          Returns the OANDA transaction number
 long getUnits()
          Returns the units field
 void setHighPriceLimit(double limit)
          Sets the highest price that this order will trigger at.
 void setLowPriceLimit(double limit)
          Sets the lowest price that this order will trigger at.
 void setPair(FXPair pair)
          Sets the currency pair for this order.
 void setStopLoss(StopLossOrder stoploss)
          Sets the stop loss for this order
 void setTakeProfit(TakeProfitOrder takeprofit)
          Sets the take profit for this order
 void setTrailingStopLoss(double trailingStopLoss)
           
 void setUnits(long units)
          Sets the units.
 

Method Detail

getHighPriceLimit

double getHighPriceLimit()
Returns the high price limit.

Returns:
the high price limit.

getLowPriceLimit

double getLowPriceLimit()
Returns the low price limit.

Returns:
the low price limit.

getPair

FXPair getPair()
Returns the FXPair.

Returns:
the FXPair

getPrice

double getPrice()
Returns the order price.

Returns:
the order price.

getStopLoss

StopLossOrder getStopLoss()
Returns the StopLossOrder associated with this Order.

Returns:
the StopLossOrder associated with this Order
See Also:
StopLossOrder

getTakeProfit

TakeProfitOrder getTakeProfit()
Returns the TakeProfitOrder associated with this Order.

Returns:
the TakeProfitOrder associated with this Order
See Also:
TakeProfitOrder

getTimestamp

long getTimestamp()
Returns the timestamp for this order.

Returns:
the timestamp for this order.

getTransactionNumber

long getTransactionNumber()
Returns the OANDA transaction number

Returns:
the OANDA transaction number

getUnits

long getUnits()
Returns the units field

Returns:
the units field

setHighPriceLimit

void setHighPriceLimit(double limit)
Sets the highest price that this order will trigger at.

Parameters:
limit - the highest price that this order will trigger at.

setLowPriceLimit

void setLowPriceLimit(double limit)
Sets the lowest price that this order will trigger at.

Parameters:
limit - the lowest price that this order will trigger at.

setPair

void setPair(FXPair pair)
Sets the currency pair for this order.

Parameters:
pair - the FXPair for this order
See Also:
FXPair

setStopLoss

void setStopLoss(StopLossOrder stoploss)
Sets the stop loss for this order

Parameters:
stoploss - the stop loss for this order
See Also:
StopLossOrder

setTakeProfit

void setTakeProfit(TakeProfitOrder takeprofit)
Sets the take profit for this order

Parameters:
takeprofit - the take profit for this order
See Also:
TakeProfitOrder

setUnits

void setUnits(long units)
Sets the units.

Parameters:
units - the units for this order

getTrailingStopLoss

double getTrailingStopLoss()
Returns:
trailing stop loss in fractional PIPs

setTrailingStopLoss

void setTrailingStopLoss(double trailingStopLoss)
Parameters:
trailingStopLoss - trailing stop loss in fractional PIPs


Copyright © 2005 OANDA Corporation. All Rights Reserved.