Exemple #1
0
 /// <summary>
 /// Samples the benchmark in a  try/catch block
 /// </summary>
 private void SampleBenchmark(IAlgorithm algorithm, IResultHandler results, DateTime time)
 {
     try
     {
         // backtest mode, sample benchmark on day changes
         results.SampleBenchmark(time, algorithm.Benchmark(time).SmartRounding());
     }
     catch (Exception err)
     {
         algorithm.RunTimeError = err;
         _algorithmState        = AlgorithmStatus.RuntimeError;
         Log.Error("AlgorithmManager.Run(): RuntimeError: SampleBenchmark: " + err.Message + " STACK >>> " + err.StackTrace);
     }
 }