Why is main (trading) loop required in live trading?
Strategies are run bar-by-bar, always processing the most recent one and determining if an action is required. Actions that occurred on previous bars create Positions. In order to determine the current positions, you need to loop through previous bars to determine if the strategy had generated a trade, and now the current bar can be used to exit from it. Not having the main (trading) loop turns your strategy into a scan because it no longer has “memory” required to keep the trade history.