public static enum IEngine.OrderCommand extends Enum<IEngine.OrderCommand>
Enum Constant and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
static IEngine.OrderCommand |
getValue(long mtValue)
Returns OrderCommand object converted from Metatrader long value
P_BUY = 0;// Buying position.
|
boolean |
isConditional()
Returns true if order is one of STOP or LIMIT orders
|
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.
|
public static final IEngine.OrderCommand BUY
public static final IEngine.OrderCommand SELL
public static final IEngine.OrderCommand BUYLIMIT
public static final IEngine.OrderCommand SELLLIMIT
public static final IEngine.OrderCommand BUYSTOP
public static final IEngine.OrderCommand SELLSTOP
public static final IEngine.OrderCommand BUYLIMIT_BYBID
public static final IEngine.OrderCommand SELLLIMIT_BYASK
public static final IEngine.OrderCommand BUYSTOP_BYBID
public static final IEngine.OrderCommand SELLSTOP_BYASK
public static final IEngine.OrderCommand PLACE_BID
public static final IEngine.OrderCommand PLACE_OFFER
public static IEngine.OrderCommand[] values()
for (IEngine.OrderCommand c : IEngine.OrderCommand.values()) System.out.println(c);
public static IEngine.OrderCommand valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic boolean isLong()
public boolean isShort()
public boolean isConditional()
public static IEngine.OrderCommand getValue(long mtValue)
Copyright © 2016. All rights reserved.