Exemple #1
0
 public void AddBar(double time, double open, double high, double low, double close, int volume, int openInterest)
 {
     timeStamp = TimeStamp.FromOADate(time);
     closeTick.Initialize();
     closeTick.SetTime(timeStamp);
     closeTick.SetTrade(close, volume);
     timeStamp.AddMilliseconds(-1);
     highTick.Initialize();
     highTick.SetTime(timeStamp);
     highTick.SetTrade(high, 0);
     timeStamp.AddMilliseconds(-1);
     lowTick.Initialize();
     lowTick.SetTime(timeStamp);
     lowTick.SetTrade(low, 0);
     timeStamp.AddMilliseconds(-1);
     openTick.Initialize();
     openTick.SetTime(timeStamp);
     openTick.SetTrade(open, 0);
     Add(openTick);
     Add(lowTick);
     Add(highTick);
     Add(closeTick);
 }