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; } }
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); }
// public void OnData(VIX vix) { _vix = vix.Close; }
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; }
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; }