Beispiel #1
0
        public MockupManager()
        {
            if (MockupManager.StrategyDictionary == null)
            {
                MockupManager.StrategyDictionary = new Dictionary<string, Strategy>();
                StrategyOrderList = new List<StrategyOrderInfo>();

                StrategyDictionary["ST1"] = new Strategy() { StrategyId = "ST1", StrategyName = "Q Strategy 1" };
                StrategyDictionary["ST2"] = new Strategy() { StrategyId = "ST2", StrategyName = "Q Strategy 2" };
                StrategyDictionary["ST3"] = new Strategy() { StrategyId = "ST3", StrategyName = "Q Strategy 3" };
                StrategyDictionary["ST4"] = new Strategy() { StrategyId = "ST4", StrategyName = "Q Strategy 4" };

                StrategyOrderInfo order1 = new StrategyOrderInfo(StrategyDictionary["ST1"], "BAC", "Trading", 112.12, 2.5, -300, 104.93, 2, 153879, 0.00073, 100, 250.00, 1000, 10000);
                StrategyOrderInfo order2 = new StrategyOrderInfo(StrategyDictionary["ST1"], "AMD", "Trading", -1.23, 2.5, 100, 9.02, 3, 70200, -0.00002, 25.00, 2.00, 5000, 5000);
                StrategyOrderInfo order3 = new StrategyOrderInfo(StrategyDictionary["ST1"], "MSFT", "Stopped", 0.45, 0.55, 250, 89.21, 1, 10100, 0.00000, -78.00, 45.56, 1000, 500);
                StrategyOrderInfo order4 = new StrategyOrderInfo(StrategyDictionary["ST1"], "LVLT", "Max_Loss", 9.99, 2.5, 200, 70.10, 1, 98000, 0.00010, 2.00, 120.40, 100, 8500);
                StrategyOrderInfo order5 = new StrategyOrderInfo(StrategyDictionary["ST1"], "INTC", "Trading", 3.45, 2.5, 0, 114.32, 0, 112352, 0.00003, 13.00, -2.45, 100, 24300);
                StrategyOrderInfo order6 = new StrategyOrderInfo(StrategyDictionary["ST1"], "QQQQ", "Trading", -1.23, 2.5, -200, 41.20, 2, 65850, 0.00002, 5.00, 1.99, 100, 1000);

                StrategyOrderList.Add(order1);
                StrategyOrderList.Add(order2);
                StrategyOrderList.Add(order3);
                StrategyOrderList.Add(order4);
                StrategyOrderList.Add(order5);
                StrategyOrderList.Add(order6);
            }
        }
Beispiel #2
0
 public StrategyOrderInfo(Strategy _strategyInfo, string _symbol, string _status, double _pnl, double _ur_PnL, int _posShares, double _posAmnt,
     int _openOrders, int _vol, double _pnlPerShares, double _tradeingRev, double _rebateRev, double _maxLoss, int seedRemaining)
 {
     if (this.StrategyOrderSRV == null)
     {
         this.StrategyOrderSRV = new symbolUpdate();
     }
     this.Strategy = _strategyInfo;
     this.Symbol = _symbol;
     this.Status = _status;
     this.PnL = _pnl;
     this.UR_PnL = _ur_PnL;
     this.Position_Shares = _posShares;
     this.Position_Amount = _posAmnt;
     this.Number_Of_Open_Orders = _openOrders;
     this.Volume = _vol;
     this.Trading_Revenue = _tradeingRev;
     this.Rebate_Revenue = _rebateRev;
     this.Max_Loss = _maxLoss;
     this.User_Message = new string[1];
     this.User_Message[0] = string.Empty;
     this.SeedRemaining = seedRemaining;
 }