/// Variables for counting quotes amount
/// This method will be executed when strategy receive quote
private void SymbolOnNewQuote(Symbol symbol, Quote quote)
// Increase quote counter
// An example of standard log
Log("Quotes received", StrategyLoggingLevel.Info);
/// This method will be executed when strategy receive level2 quote
private void SymbolOnNewLevel2(Symbol symbol, Level2Quote level2, DOMQuote dom)
// Increase quote counter
// An example of error log
Log("Level2 received", StrategyLoggingLevel.Error);
/// This method will be executed when strategy receive last quote
private void SymbolOnNewLast(Symbol symbol, Last last)
// Increase quote counter
// An example of trading log
Log("Last received", StrategyLoggingLevel.Trading);
/// Use this method to provide run time information about your strategy. You will see it in StrategyRunner panel in trading terminal
protected override List<StrategyMetric> OnGetMetrics()
List<StrategyMetric> result = base.OnGetMetrics();
// Display our counters in Strategy Runner panel
result.Add(new StrategyMetric() { Name = "Quotes count", FormattedValue = quotesCount.ToString() });
result.Add(new StrategyMetric() { Name = "Level2 count", FormattedValue = level2Count.ToString() });
result.Add(new StrategyMetric() { Name = "Last count", FormattedValue = lastCount.ToString() });