Example #1
0
 public void SetNewBarSlice(long barSize)
 {
     try
     {
         BarSlice slice = this.barSliceManager.GetSlice(barSize);
         if (slice != null)
         {
             foreach (KeyValuePair <FreeQuant.Instruments.Instrument, FreeQuant.Data.Bar> keyValuePair in slice.Table)
             {
                 this.OnNewBar(keyValuePair.Key, keyValuePair.Value);
             }
             slice.Reset();
         }
         foreach (Strategy strategy in this.strategies.Values)
         {
             strategy.OnBarSlice(barSize);
         }
     }
     catch (Exception ex)
     {
         this.EmitError(ex);
     }
 }