sclass G22StrategyRun { settable G22TradingStrategy strategy; settable TickerSequence ticker; settable TickerSequence profitTicker; settable double finalProfit; run { strategy(strategy.emptyClone()); strategy.primed(true); for (pricePoint : ticker.pricePoints()) { strategy.feed(pricePoint); double profit = strategy.coinProfit(); profitTicker.addIfPriceChanged(profit, pricePoint.timestamp); } strategy.closeAllPositions(); finalProfit(strategy.coinProfit()); } }