Exemplo n.º 1
0
 public Tick(DateTime?_dtserver, float?_price, float?_volume, ActionGlassItem _action = ActionGlassItem.zero)
 {
     dtTick = (DateTime)_dtserver;
     Price  = (float)_price;
     Volume = (float)_volume;
     Action = _action;
 }
Exemplo n.º 2
0
 public void AddTick(DateTime _dt, double _price, double _volume, ActionGlassItem _action)
 {
     graphC.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                                   (ThreadStart) delegate()
     {
         btemp = b.AddTick(new Tick(DateTime.Now, (float)_price, (float)_volume));
         if (btemp != b)
         {
             while (Bars.ContainsKey(b.openTick.dtTick))
             {
                 b.openTick.dtTick = b.openTick.dtTick.AddMilliseconds(1);
             }
             Bars.Add(b.openTick.dtTick, b);
             b = btemp;
         }
         if (graphC != null)
         {
             DrawGraph();
         }
     });
 }