public class UserStrategy : IStrategy { // Services available to the strategy: orders, indicators, parameters, // market data, and logging. private IApi _api = null!; private IIndicators _indicators = null!; private IStrategyParams _params = null!; private IMarketData _marketData = null!; private ILogger _logger = null!; public void OnInit(StrategyContext context) { _api = context.Api; _indicators = context.Indicators; _params = context.Parameters; _marketData = context.MarketData; _logger = context.Logger; _logger.Info("UserStrategy initialized."); } public void OnTick(decimal? price = null) { } // Called for every closed bar in every subscription. // symbolKey identifies the exchange, market, pair, and timeframe. public void OnBar(ISymbolKey symbolKey, IKline kline) { } // Called exactly once when a Tester, Paper, or Live run finishes. public void OnFinish(StrategyFinishContext context) { } }