sclass G22StrategyRun { settable G22TradingStrategy strategy; settable TickerSequence ticker; settable new TickerSequence profitTicker; settable double finalProfit; settable IIteratorMonitor iteratorMonitor = dummyIteratorMonitor(); double totalProfit() { ret finalProfit; } run { strategy(strategy.emptyClone()); strategy.logToPrint(false); strategy.actualTicker(ticker); strategy.primed(true); strategy.active(true); for (pricePoint : iteratorMonitor.monitorIterator(ticker.pricePoints())) { if (!strategy.active()) break; strategy.feed(pricePoint); double profit = strategy.coinProfit(); profitTicker.addIfPriceChanged(profit, pricePoint.timestamp); } strategy.closeMyself(); finalProfit(strategy.coinProfit()); } }