Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why is main (trading) loop required in live trading?

live loop main trading
0
Posted

Why is main (trading) loop required in live trading?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123