Introduced Order.Addition
This commit is contained in:
parent
500204819c
commit
bebb0c1f12
@ -80,8 +80,14 @@ public class Order implements Comparable<Order> {
|
|||||||
BUYLIMIT, SELLLIMIT, STOPLOSS, STOPBUY, BUY, SELL
|
BUYLIMIT, SELLLIMIT, STOPLOSS, STOPBUY, BUY, SELL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static enum Addition {
|
||||||
|
NONE, MARGIN_CALL, FILL_OR_KILL
|
||||||
|
}
|
||||||
|
|
||||||
|
Addition addition;
|
||||||
protected Status status;
|
protected Status status;
|
||||||
protected Type type;
|
protected Type type;
|
||||||
|
|
||||||
protected double limit;
|
protected double limit;
|
||||||
protected double volume;
|
protected double volume;
|
||||||
|
|
||||||
@ -95,7 +101,7 @@ public class Order implements Comparable<Order> {
|
|||||||
GodWorld world;
|
GodWorld world;
|
||||||
|
|
||||||
Order(opensesim.world.TradingEngine engine, Account account, Type type,
|
Order(opensesim.world.TradingEngine engine, Account account, Type type,
|
||||||
double volume, double limit) {
|
double volume, double limit, Addition addition) {
|
||||||
|
|
||||||
AssetPair pair = engine.getAssetPair();
|
AssetPair pair = engine.getAssetPair();
|
||||||
|
|
||||||
@ -133,6 +139,12 @@ public class Order implements Comparable<Order> {
|
|||||||
// id = world.
|
// id = world.
|
||||||
// id = world.orderIdGenerator.getNext();
|
// id = world.orderIdGenerator.getNext();
|
||||||
id = engine.id_generator.getNext();
|
id = engine.id_generator.getNext();
|
||||||
|
this.addition = addition;
|
||||||
|
}
|
||||||
|
|
||||||
|
Order(opensesim.world.TradingEngine engine, Account account, Type type,
|
||||||
|
double volume, double limit) {
|
||||||
|
this(engine, account, type, volume, limit, Addition.NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Id getID() {
|
public Id getID() {
|
||||||
|
Loading…
Reference in New Issue
Block a user