The primary objective of this project is to develop the Market Structure Break (MSB) + Order Block trading strategy into a high-performance, automated code form. This project aims to translate the visual rules of the strategy into a robust algorithmic system capable of precise execution and backtesting.
This project is strictly focused on code logic and backend components. There is no frontend development included in this repository.
The strategy engine developed here is designed to be highly modular and operable within any future frontend or execution platform. This is a critical preliminary step; a solid, verified, and accurate strategy engine is required before any frontend scaffolding can begin. The goal is to ensure the "engine" is perfect before building the "car."
To ensure reliability and maintainability, the project is built using a strictly modular approach. By breaking the strategy down into independent components, we can achieve:
- Isolated Testing: Each module (e.g., Zigzag calculation, Order Block detection, Trend Confirmation logic) can be tested individually for accuracy against known market data.
- Precision Tuning: We can fine-tune specific parameters within individual modules without affecting the integrity of the entire system.
- Verification: Every modular part is verified to ensure it operates strictly within the bounds of its defined rules, preventing logic drift.
- Market Structure Module: Identifies swing highs/lows and confirms "Higher Highs" and "Lower Lows" using Zigzag logic.
- Order Block Module: Detects and manages Bullish and Bearish supply/demand zones.
- Entry/Exit Logic: Handles the specific "close into" and "close above/below" triggers defined in the strategy.
- Risk Management: Enforces the 1:1.5 Risk/Reward ratio and dynamic stop-loss placement.
For detailed information on the trading rules and execution steps, refer to: