The Botfathers CRT Model
- Experts
-
Kenneth Mwangi Chege
Sono specializzato nello sviluppo di Expert Advisor (EA) personalizzati in MQL5, trasformando strategie di trading in sistemi automatizzati basati su regole chiaramente definite e parametri configurabili. - Versione: 1.0
- Attivazioni: 5
The Botfathers CRT Model & CISD is a multi-timeframe algorithmic trading system designed around the Candle Range Theory (CRT) and Change in State of Delivery (CISD) trading concepts.
The Expert Advisor uses a structured top-down analysis approach, combining Daily market direction, H4 confirmation, and M5 entry execution.
Its methodology is designed to identify potential directional opportunities through daily liquidity-range violations, confirm market direction through consecutive H4 candle formations, and execute trades following lower-timeframe delivery shifts.
The EA incorporates predefined stop-loss and take-profit levels, position sizing based on monetary risk, session restrictions, and automated trade management.
Trading Strategy and Methodology
The trading process consists of three main analytical stages:
1. Daily Market Direction – Three-Day Range Analysis (D1)
The EA begins by examining the highs and lows of the previous three completed daily candles.
These three candles establish a reference range used to identify potential liquidity violations.
The EA then evaluates the most recently completed daily candle (Candle 4) to determine whether it has violated the established three-day range.
High-side violation: When the latest completed daily candle trades above the highest high of the previous three daily candles.
Low-side violation: When it trades below the lowest low of the previous three daily candles.
Both-side violation: When both the previous three-day high and low are breached.
The closing price of Candle 4 relative to Candle 3 is subsequently used to determine the directional bias.
The methodology distinguishes between continuation and reversal scenarios:
A high-side violation followed by a close above Candle 3's close produces a bullish bias.
A high-side violation followed by a close below Candle 3's close produces a bearish bias.
A low-side violation followed by a close below Candle 3's close produces a bearish bias.
A low-side violation followed by a close above Candle 3's close produces a bullish bias.
If both sides are violated, the closing price relative to Candle 3 determines the direction.
When no valid directional condition is identified, the EA does not establish a trading bias.
2. H4 Market Confirmation – Candle Range Theory (CRT)
After establishing the Daily directional bias, the EA moves to the H4 timeframe for directional confirmation.
The confirmation logic identifies consecutive completed H4 candles moving in the direction of the established Daily bias.
Two confirmation models are supported:
Two-Body CRT: Two consecutive H4 candles must close in the direction of the Daily bias, with the latest candle closing beyond the previous candle's close.
Three-Body CRT: Three consecutive H4 candles must close in the direction of the Daily bias, with each successive close progressing in the same direction.
For bullish confirmation, the candles must be bullish and their closing prices must progressively increase.
For bearish confirmation, the candles must be bearish and their closing prices must progressively decrease.
Either confirmation model can independently validate the Daily bias, depending on the enabled settings.
3. M5 Entry Execution – Change in State of Delivery (CISD)
Once Daily directional bias and H4 confirmation are established, the EA searches for an entry signal on the M5 timeframe.
The entry methodology uses a two-candle directional displacement condition.
Bullish CISD:
The immediately preceding completed M5 candle must be bearish.
The latest completed M5 candle must be bullish.
The bullish candle must close above the high of the preceding bearish candle.
Bearish CISD:
The immediately preceding completed M5 candle must be bullish.
The latest completed M5 candle must be bearish.
The bearish candle must close below the low of the preceding bullish candle.
Once a valid CISD condition is identified, the EA executes a market order in the direction of the established Daily bias.
The high and low of the signal candle provide the reference points for stop-loss placement.
Trade Execution and Risk Management
The EA uses a predefined risk-based position-sizing mechanism.
Stop-Loss Placement
Buy trades: Stop-loss is placed below the low of the bullish CISD signal candle.
Sell trades: Stop-loss is placed above the high of the bearish CISD signal candle.
An adjustable stop buffer can be added to the signal candle's extreme.
Take-Profit Placement
Take-profit is calculated using a configurable risk-to-reward ratio.
The default setting is 1:2, meaning the take-profit distance is twice the initial stop-loss distance.
Position Sizing
Lot size is calculated dynamically using the monetary risk budget and the distance between entry price and stop-loss.
The default risk configuration includes:
Base risk: $50.
Slippage reserve: $5.
Maximum modeled risk: $56.
Reward-to-risk ratio: 1:2.
The EA uses the broker's symbol specifications to calculate position volume and normalize it to the permitted lot size.
Automated Trade Management
The EA incorporates additional trade-management conditions designed to regulate trade frequency and protect existing positions.
Break-Even Management
When an open position reaches at least 1R in floating profit, the EA can move the oldest qualifying position's stop-loss to its entry price.
Multiple Positions
The EA supports up to two concurrent positions by default.
However, it will not open an additional position while an existing position is in floating drawdown.
Trade Cooldowns
The EA implements several cooldown mechanisms:
Normal cooldown: 10 minutes between entries.
After a losing trade: 60-minute cooldown.
After two losses in one trading day: Trading is suspended for the remainder of that day.
After four losses within 48 hours: A two-day cooldown is activated.
After reaching the configured profit threshold: A two-day cooldown is activated.
A winning closed trade can permit an immediate subsequent entry, bypassing the normal 10-minute spacing restriction, provided all other entry conditions are satisfied.
An existing trade reaching at least 1R can also permit an early subsequent entry.
Trading Sessions
The EA includes configurable trading-session filters based on broker server time.
Default trading windows:
London session: 08:00–12:00.
New York session: 13:30–17:00.
Trading can be restricted to these sessions or the session filter can be disabled.
Friday Protection
The EA stops accepting new trades after the configured Friday cutoff, which defaults to 22:30 server time.
It can also automatically close its open positions at that cutoff.
Additional Features
Multi-timeframe analysis (D1, H4 and M5).
Configurable Daily, H4 and M5 confirmation requirements.
Optional two-body and three-body CRT confirmation.
Adjustable monetary risk parameters.
Dynamic lot-size calculation.
Configurable risk-to-reward ratio.
Automated stop-loss and take-profit placement.
Break-even protection.
Maximum concurrent trade restriction.
Daily and rolling 48-hour loss limits.
Configurable trading sessions.
Friday trading protection.
One signal evaluation per M5 candle.
Magic Number identification for trade management.
Important Notes
Model 1 is a rule-based Expert Advisor that automates a specific interpretation of CRT and CISD concepts.
Its signals are evaluated using completed candles, and all trading decisions are subject to the configured filters and execution conditions.
The EA does not guarantee profits. Trading results depend on market conditions, broker execution, spreads, commissions, slippage, and the selected configuration.
Users should test and optimize the EA using historical data and a demo account before deploying it on a live trading account.
Important technical observations before publishing
There are a few details worth understanding before submitting the EA to the MQL5 Market:
CRT implementation: The H4 CRT logic is specifically defined as consecutive directional candle bodies and progressive closes. It does not independently identify a traditional H4 liquidity sweep.
CISD implementation: The M5 CISD is a two-candle close-through condition. The EA does not search for a more extensive market structure shift.
Daily bias: The daily reference range uses the previous three completed candles, while the fourth completed candle determines the directional bias.
Profit cooldown: The configured 4% threshold is calculated against TargetAccountSizeUSD , not the actual account balance or equity. With the default $100,000 target, this means $4,000 in closed profit since the EA started.
Break-even: The break-even function moves the oldest EA position to entry when an EA position reaches 1R; it does not necessarily move every open position to break-even.
