Hello everyone,
I am working on a private automated trading system and I am looking for high-level architecture feedback only. I am not sharing or selling any source code.
The system has grown over time and now includes several decision layers: signal logic, learning/scoring logic, reversal/retest logic, spread guards, daily risk limits, position protection, break-even logic, trailing stop, and diagnostics.
The main issue is that the system is becoming too monolithic. There are many filters and guard conditions, and sometimes different modules can compete with each other. For example, one module may detect a valid trade candidate, while another guard blocks it, and the final reason shown in diagnostics is not always clear.
My current plan is not to split everything into many files immediately. Instead, I am thinking about first building a central Decision Engine with a clear flow:
Signal → Override Candidate → Guards → Final Decision → Execution → Protection
The goal would be:
1. One final trade decision per tick/bar.
2. One clear EntrySource or decision source.
3. Guards should only block or explain, not create separate competing decisions.
4. Execution should be separated from decision-making.
5. Risk and protection management should be centralised.
6. Diagnostics should clearly show: Signal, Guard, Entry, Protection.
My question is:
For a growing automated trading system, is it better to first centralise the decision logic into one clean Decision Engine before splitting the code into separate modules/files?
Or would you recommend modularising first and then cleaning the decision flow afterwards?
I would appreciate any architecture-level feedback from people who have built or maintained automated trading systems.
Radoslaw Garczynski
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!