A robust, mechanical trading system implementing Inner Circle Trader (ICT) concepts in Python. This engine is specifically optimized for the Silver Bullet time windows to trade Gold (XAUUSD).
Backtest Configuration: 4H Higher Timeframe (Bias) / 15m Lower Timeframe (Entry)
- Net Profit: +12.15% (+$607 on $5,000 capital)
- Win Rate: 41.67%
- Risk per Trade: 1%
- Reward to Risk: Fixed 2:1
- Total Trades: 48
The execution engine follows a strict 6-step mechanical model:
- HTF Bias (4H): Determines direction based on Market Structure and Premium/Discount arrays.
- Time Alignment: Strictly trades during Silver Bullet windows:
- AM Session: 10:00 - 11:00 NY Time
- PM Session: 14:00 - 15:00 NY Time
- Liquidity Sweep: Looks for a wick or body sweep of a recent Low (for Buys) or High (for Sells).
- Market Structure Shift (MSS): Confirms reversal via energetic displacement breaking local structure.
- Entry Model: Enters on the return to the Order Block (or FVG) created by the displacement.
- Execution: Sets a fixed Stop Loss at the invalidated structure and targets 2R.
strategy.py: Core logic classICTExecutionEngineimplementing the 6-step algorithmic model.backtest.py: Backtesting script fetching data viayfinance, simulating trades, and generating performance reports.utils.py: Technical analysis helpers (Swing points, Order Blocks, Displacement, ATR).models.py: Data classes for Candles, Trade Setups, and Market Structure.main.py: Entry point for single-instance verification/testing.
-
Clone the repository:
git clone https://github.com/aryanjsingh/ict-silver-bullet.git cd ict-silver-bullet -
Install dependencies:
pip install pandas yfinance pytz
-
Run the Backtest:
python3 backtest.py
This software is for educational and research purposes only. It is not financial advice. Trading involves significant risk of loss. Past performance is not indicative of future results.