예제 #1
0
        public override BaseData Clone()
        {
            VIX fear = new VIX();

            fear.Open = Open; fear.High = High; fear.Low = Low; fear.Close = Close;
            return(fear);
        }
예제 #2
0
 //
 public void OnData(VIX vix)
 {
     _vix   = vix.Close;
     _scale = 1 - (_vix / 30m);
     if (_scale < 0)
     {
         _scale = 0;
     }
 }
예제 #3
0
        public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, DataFeedEndpoint datafeed)
        {
            VIX fear = new VIX();

            //try
            //{
            //Date	Open	High	Low	Close	Volume	Adjusted Close
            //10/27/2014	17.24	17.87	16	16.04	0	16.04
            string[] data = line.Split(',');
            fear.Time   = DateTime.ParseExact(data[0], "yyyy-MM-dd", CultureInfo.InvariantCulture);
            fear.Open   = Convert.ToDecimal(data[1]); fear.High = Convert.ToDecimal(data[2]);
            fear.Low    = Convert.ToDecimal(data[3]); fear.Close = Convert.ToDecimal(data[4]);
            fear.Symbol = "VIX"; fear.Value = fear.Close;
            //}
            //catch
            //{ }
            return(fear);
        }
예제 #4
0
 //
 public void OnData(VIX vix)
 {
     _vix = vix.Close;
 }
예제 #5
0
 //
 public void OnData(VIX vix)
 {
     _vix = vix.Close;
 }
예제 #6
0
 public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, DataFeedEndpoint datafeed)
 {
     VIX fear = new VIX();
     //try
     //{
     //Date	Open	High	Low	Close	Volume	Adjusted Close
     //10/27/2014	17.24	17.87	16	16.04	0	16.04
     string[] data = line.Split(',');
     fear.Time = DateTime.ParseExact(data[0], "yyyy-MM-dd", CultureInfo.InvariantCulture);
     fear.Open = Convert.ToDecimal(data[1]); fear.High = Convert.ToDecimal(data[2]);
     fear.Low = Convert.ToDecimal(data[3]); fear.Close = Convert.ToDecimal(data[4]);
     fear.Symbol = "VIX"; fear.Value = fear.Close;
     //}
     //catch
     //{ }
     return fear;
 }
예제 #7
0
 public override BaseData Clone()
 {
     VIX fear = new VIX();
     fear.Open = Open; fear.High = High; fear.Low = Low; fear.Close = Close;
     return fear;
 }
 //
 public void OnData(VIX vix)
 {
     _vix = vix.Close;
     _scale = 1 - (_vix / 30m);
     if (_scale < 0) _scale = 0;
 }