示例#1
0
 public SimAccount()
 {
     log_data            = new LogData();
     performance_data    = new PerformanceData();
     order_data          = new OrderData();
     holding_data        = new HoldingData();
     total_pl_list       = new List <double>();
     total_pl_ratio_list = new List <double>();
 }
示例#2
0
 public SimAccount()
 {
     log_data            = new LogData();
     performance_data    = new PerformanceData();
     order_data          = new OrderData();
     holding_data        = new HoldingData();
     total_pl_list       = new List <double>();
     total_pl_ratio_list = new List <double>();
     margin_required     = 0.0;
     leverage            = 0.0;
     start_ind           = 0;
     end_ind             = 0;
 }
示例#3
0
 public void add_log_data(int i, string dt, string action, HoldingData hd, OrderData od, PerformanceData pd)
 {
     total_pl_log.Add(pd.total_pl);
     if (od.order_serial_list.Count > 0)
     {
         log_data_table.Rows.Add(pd.total_pl, pd.total_fee, dt, i, od.order_side[od.order_serial_list.Last()], od.order_type[od.order_serial_list.Last()],
                                 od.order_size[od.order_serial_list.Last()], od.order_price[od.order_serial_list.Last()], od.order_message[od.order_serial_list.Last()], hd.holding_side, hd.holding_price, hd.holding_size,
                                 action);
     }
     else
     {
         log_data_table.Rows.Add(pd.total_pl, pd.total_fee, dt, i, "", "", 0, 0, "", hd.holding_side, hd.holding_price, hd.holding_size, action);
     }
 }