Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BacktestTradingProvider"/> class.
 /// </summary>
 /// <param name="loggerFactory">Used to create output.</param>
 /// <param name="timer">Timer provider for registering trades.</param>
 /// <param name="data">Data provider for confirming trades.</param>
 public BacktestTradingProvider(
     ILoggerFactory loggerFactory,
     BacktestTimerProvider timer,
     BacktestDataProvider data)
     : base(loggerFactory, timer)
 {
     _logger       = loggerFactory.CreateLogger(GetType());
     _dataProvider = data;
     _orderCache   = new Queue <OrderUpdate>();
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BacktestDataProvider"/> class.
 /// </summary>
 /// <param name="loggerFactory">Used to create output.</param>
 /// <param name="database">The backtest database database.</param>
 /// <param name="timerProvider">Used to keep track of time.</param>
 public BacktestDataProvider(ILoggerFactory loggerFactory, DatabaseContext database, BacktestTimerProvider timerProvider)
     : base(loggerFactory, timerProvider)
 {
     _timer   = timerProvider;
     _buffers = new BacktestBuffers(database, Logger);
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BacktestOutputLogger"/> class.
 /// </summary>
 /// <param name="timer">BacktestTimerProvider to get timespan information.</param>
 /// <param name="outputFolder">General backtest output folder.</param>
 public BacktestOutputLogger(BacktestTimerProvider timer, string outputFolder)
 {
     OutputFolder = outputFolder;
     _timer       = timer;
 }