com.dukascopy.api
Enum IEngine.OrderCommand

java.lang.Object
  extended by java.lang.Enum<IEngine.OrderCommand>
      extended by com.dukascopy.api.IEngine.OrderCommand
All Implemented Interfaces:
Serializable, Comparable<IEngine.OrderCommand>
Enclosing interface:
IEngine

public static enum IEngine.OrderCommand
extends Enum<IEngine.OrderCommand>

Specifies type of the order


Enum Constant Summary
BUY
          Buy by current market price.
BUYLIMIT
          Buy when ask price is <= specified price
BUYLIMIT_BYBID
          Buy when bid price is <= specified price
BUYSTOP
          Buy when ask price is >= specified price
BUYSTOP_BYBID
          Buy when bid price is >= specified price
PLACE_BID
          Place bid at specified price
PLACE_OFFER
          Place offer at specified price
SELL
          Sell by current market price.
SELLLIMIT
          Sell when bid price is >= specified price
SELLLIMIT_BYASK
          Sell when ask price is >= specified price
SELLSTOP
          Sell when bid price is <= specified price
SELLSTOP_BYASK
          Sell when ask price is <= specified price
 
Method Summary
 boolean isLong()
          Returns true if order is LONG and false if order is SHORT
 boolean isShort()
          Returns true if order is SHORT and false if order is LONG
static IEngine.OrderCommand valueOf(String name)
          Returns the enum constant of this type with the specified name.
static IEngine.OrderCommand[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BUY

public static final IEngine.OrderCommand BUY
Buy by current market price. You can specify price and slippage, if current market price at execution moment (when order reaches server) is worse than specified price, and slippage is not big enough to execute order by current market price, then order will be rejected


SELL

public static final IEngine.OrderCommand SELL
Sell by current market price. You can specify price and slippage, if current market price at execution moment (when order reaches server) is worse than specified price, and slippage is not big enough to execute order by current market price, then order will be rejected


BUYLIMIT

public static final IEngine.OrderCommand BUYLIMIT
Buy when ask price is <= specified price


SELLLIMIT

public static final IEngine.OrderCommand SELLLIMIT
Sell when bid price is >= specified price


BUYSTOP

public static final IEngine.OrderCommand BUYSTOP
Buy when ask price is >= specified price


SELLSTOP

public static final IEngine.OrderCommand SELLSTOP
Sell when bid price is <= specified price


BUYLIMIT_BYBID

public static final IEngine.OrderCommand BUYLIMIT_BYBID
Buy when bid price is <= specified price


SELLLIMIT_BYASK

public static final IEngine.OrderCommand SELLLIMIT_BYASK
Sell when ask price is >= specified price


BUYSTOP_BYBID

public static final IEngine.OrderCommand BUYSTOP_BYBID
Buy when bid price is >= specified price


SELLSTOP_BYASK

public static final IEngine.OrderCommand SELLSTOP_BYASK
Sell when ask price is <= specified price


PLACE_BID

public static final IEngine.OrderCommand PLACE_BID
Place bid at specified price


PLACE_OFFER

public static final IEngine.OrderCommand PLACE_OFFER
Place offer at specified price

Method Detail

values

public static IEngine.OrderCommand[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (IEngine.OrderCommand c : IEngine.OrderCommand.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static IEngine.OrderCommand valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isLong

public boolean isLong()
Returns true if order is LONG and false if order is SHORT

Returns:
true if order is LONG and false if order is SHORT

isShort

public boolean isShort()
Returns true if order is SHORT and false if order is LONG

Returns:
true if order is SHORT and false if order is LONG


Copyright © 2009. All Rights Reserved.