示例#1
0
 public TradeData(int?TradeId,
                  string ticker,
                  int trade_type,
                  string exchange,
                  string company,
                  OpenCloseValues if_closed,
                  decimal?premium,
                  decimal?commissions,
                  DateTime?open_date,
                  DateTime?closed_date,
                  double?delta,
                  double?theta,
                  decimal?profit_loss,
                  DateTime?profit_loss_timestamp,
                  decimal?daily_profit_loss,
                  DateTime?daily_profit_loss_timestamp,
                  decimal?yesterday_profit_loss,
                  DateTime?yesterday_profit_loss_timestamp,
                  decimal?profit_threshold,
                  decimal?price_threshold,
                  bool price_above_below,
                  DateTime?last_email,
                  int email_notifications,
                  string notes)
 {
     bIfUpdatingMarketData = false;
     Id                           = TradeId;
     Ticker                       = ticker;
     Exchange                     = exchange;
     TradeType                    = trade_type;
     Company                      = company;
     OpenCloseStatus              = if_closed;
     Premium                      = (double?)premium;
     Commissions                  = (double?)commissions;
     OpenDate                     = open_date;
     ClosedDate                   = closed_date;
     TotalProfitLoss              = (double?)profit_loss;
     TotalProfitLossTimestamp     = profit_loss_timestamp;
     DailyProfitLoss              = (double?)daily_profit_loss;
     DailyProfitLossTimestamp     = daily_profit_loss_timestamp;
     YesterdayProfitLoss          = (double?)yesterday_profit_loss;
     YesterdayProfitLossTimestamp = yesterday_profit_loss_timestamp;
     LastEmail                    = last_email;
     EmailNotifications           = email_notifications;
     ProfitThreshold              = (double?)profit_threshold;
     PriceThreshold               = (double?)price_threshold;
     PriceThresholdAboveBelow     = price_above_below;
     Notes                        = notes;
     //m_Legs = new SortableBindingList<LegData> ();
     m_Legs = new SortableBindingList <LegData> ();
 }
示例#2
0
        public LegData(int?ID,
                       string ticker,
                       EquityType equity_type,
                       string exchange,
                       int multiplier,
                       string local_symbol,
                       int?con_id,
                       OpenCloseValues if_closed,
                       bool?if_call,
                       bool if_sell,
                       decimal?strike,
                       DateTime?expiry_date,
                       decimal?und_price,
                       decimal?open_price,
                       decimal?close_price,
                       int no_contracts,
                       double?totaldelta,
                       double?totaltheta,
                       double?gamma,
                       double?vega,
                       double?mydelta,
                       double?mytheta,
                       double?mygamma,
                       double?myvega,
                       DateTime?open_date,
                       DateTime?closed_date,
                       decimal?profit_loss,
                       DateTime?profit_loss_timestamp,
                       decimal?daily_profit_loss,
                       DateTime?daily_profit_loss_timestamp,
                       decimal?yesterday_profit_loss,
                       DateTime?yesterday_profit_loss_timestamp,
                       decimal?profit_threshold,
                       DateTime?last_email,
                       int email_notifications,
                       int?trade_id)
        {
            bIfUpdatingMarketData = false;
            Id              = ID;
            Ticker          = ticker;
            Equity          = equity_type;
            Exchange        = exchange;
            Multiplier      = multiplier;
            LocalSymbol     = local_symbol;
            ConId           = con_id;
            OpenCloseStatus = if_closed;
            IfCall          = if_call;
            IfSell          = if_sell;
            Strike          = (double?)strike;
            ExpiryDate      = expiry_date;
            UnderlyingPrice = (double?)und_price;
            OpenPrice       = (double?)open_price;
            ClosePrice      = (double?)close_price;
            NoContracts     = no_contracts;
            TotalDelta      = totaldelta;
            TotalTheta      = totaltheta;
//            Gamma = gamma;
//            Vega = vega;
            MyDelta                      = mydelta;
            MyTheta                      = mytheta;
            MyGamma                      = mygamma;
            MyVega                       = myvega;
            OpenDate                     = open_date;
            ClosedDate                   = closed_date;
            TotalProfitLoss              = (double?)profit_loss;
            DailyProfitLoss              = (double?)daily_profit_loss;
            DailyProfitLossTimestamp     = daily_profit_loss_timestamp;
            ProfitLossTimestamp          = profit_loss_timestamp;
            YesterdayProfitLoss          = (double?)yesterday_profit_loss;
            YesterdayProfitLossTimestamp = yesterday_profit_loss_timestamp;
            ProfitThreshold              = (double?)profit_threshold;
            LastEmail                    = last_email;
            EmailNotifications           = email_notifications;
            Trade_id                     = trade_id;
            ModelOption                  = null;
        }