Moved OrderType from Exchnage class to Order class
This commit is contained in:
@ -26,10 +26,9 @@
|
||||
package traders.ManTrader;
|
||||
|
||||
import gui.Globals;
|
||||
import java.util.ArrayList;
|
||||
import sesim.Exchange;
|
||||
|
||||
import sesim.Exchange.Account;
|
||||
import sesim.Exchange.OrderType;
|
||||
import sesim.Order.OrderType;
|
||||
import sesim.Quote;
|
||||
|
||||
/**
|
||||
|
@ -165,4 +165,4 @@
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
</Form>
|
||||
|
@ -28,6 +28,7 @@ package traders.ManTrader;
|
||||
import gui.OpenOrdersList;
|
||||
|
||||
import sesim.Exchange;
|
||||
import sesim.Order.OrderType;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -175,7 +176,7 @@ public class ManTraderConsole extends javax.swing.JPanel {
|
||||
|
||||
System.out.printf("Should buy: %f %f\n",volume,limit);
|
||||
|
||||
long createOrder = trader.getSE().createOrder(trader.getAccount().getID(), Exchange.OrderType.BUYLIMIT, volume, limit);
|
||||
long createOrder = trader.getSE().createOrder(trader.getAccount().getID(), OrderType.BUYLIMIT, volume, limit);
|
||||
System.out.printf("The retval is %d",createOrder);
|
||||
|
||||
// this.ordersList.account=this.trader.getAccount();
|
||||
@ -190,7 +191,7 @@ public class ManTraderConsole extends javax.swing.JPanel {
|
||||
|
||||
System.out.printf("Should sell: %f %f\n",volume,limit);
|
||||
|
||||
long createOrder = trader.getSE().createOrder(trader.getAccount().getID(), Exchange.OrderType.SELLLIMIT, volume, limit);
|
||||
long createOrder = trader.getSE().createOrder(trader.getAccount().getID(), OrderType.SELLLIMIT, volume, limit);
|
||||
System.out.printf("The retval is %d",createOrder);
|
||||
}//GEN-LAST:event_sellButtonActionPerformed
|
||||
|
||||
@ -200,7 +201,7 @@ public class ManTraderConsole extends javax.swing.JPanel {
|
||||
|
||||
System.out.printf("Should stoploss: %f %f\n",volume,limit);
|
||||
|
||||
long createOrder = trader.getSE().createOrder(trader.getAccount().getID(), Exchange.OrderType.STOPLOSS, volume, limit);
|
||||
long createOrder = trader.getSE().createOrder(trader.getAccount().getID(), OrderType.STOPLOSS, volume, limit);
|
||||
System.out.printf("The retval is %d",createOrder);
|
||||
}//GEN-LAST:event_stopLossButtonActionPerformed
|
||||
|
||||
|
@ -37,7 +37,7 @@ import sesim.Exchange;
|
||||
import sesim.Exchange.Account;
|
||||
import sesim.Exchange.AccountListener;
|
||||
|
||||
import sesim.Exchange.OrderType;
|
||||
import sesim.Order.OrderType;
|
||||
import sesim.Order;
|
||||
import sesim.Order.OrderStatus;
|
||||
import sesim.Quote;
|
||||
@ -377,7 +377,7 @@ public class RandomTraderA extends AutoTraderBase implements AccountListener {
|
||||
// AccountData ad = this.se.getAccountData(account_id);
|
||||
Account ad = se.getAccount(account_id);
|
||||
|
||||
Exchange.OrderType type = Exchange.OrderType.BUYLIMIT;
|
||||
OrderType type = OrderType.BUYLIMIT;
|
||||
|
||||
if (ad == null) {
|
||||
return false;
|
||||
@ -424,7 +424,7 @@ public class RandomTraderA extends AutoTraderBase implements AccountListener {
|
||||
|
||||
Account ad = se.getAccount(account_id);
|
||||
|
||||
Exchange.OrderType type = Exchange.OrderType.SELLLIMIT;
|
||||
OrderType type = OrderType.SELLLIMIT;
|
||||
|
||||
// how much shares we ant to sell?
|
||||
double volume = getRandomAmmount(ad.getShares(), sell_volume);
|
||||
|
@ -38,6 +38,7 @@ import sesim.AutoTraderBase;
|
||||
import sesim.AutoTraderGui;
|
||||
import sesim.Exchange;
|
||||
import sesim.Exchange.Account;
|
||||
import sesim.Order.OrderType;
|
||||
import sesim.Quote;
|
||||
|
||||
/**
|
||||
@ -269,7 +270,7 @@ public class RandomTraderB extends AutoTraderBase {
|
||||
|
||||
Account ad = se.getAccount(account_id);
|
||||
|
||||
Exchange.OrderType type = Exchange.OrderType.BUYLIMIT;
|
||||
OrderType type = OrderType.BUYLIMIT;
|
||||
|
||||
if (ad == null) {
|
||||
return false;
|
||||
@ -309,7 +310,7 @@ public class RandomTraderB extends AutoTraderBase {
|
||||
|
||||
Account ad = se.getAccount(account_id);
|
||||
|
||||
Exchange.OrderType type = Exchange.OrderType.SELLLIMIT;
|
||||
OrderType type = OrderType.SELLLIMIT;
|
||||
|
||||
|
||||
// how much shares we ant to sell?
|
||||
|
Reference in New Issue
Block a user