Holy Grail Pullback System
RISK WARNING: this EA places real market orders with a stop and target on every trade. Confirm behaviour on a demo account before running it live, and size conservatively - InpRiskPercent controls how much of the account each trade risks. The Holy Grail setup, published by Linda Raschke and Laurence Connors in "Street Smarts" (1996), looks for a strong and still-strengthening trend (ADX above a threshold and rising, confirming momentum rather than just a level), then waits for price to pull back and touch a shorter moving average without breaking the trend - a pause, not a reversal. The entry trigger is the break of that pullback bar's own extreme in the trend direction: for a long, price closing back above the pullback bar's high; for a short, closing back below its low. That is genuinely a two-moment pattern, not a single-bar signal, so this EA carries it as a small state machine: the bar that touches the average arms a watch, and a later bar's break of that bar's extreme fires the entry. A watch that never triggers expires automatically after a configurable number of bars, because a trend strong enough to justify the setup rarely leaves a pullback unresolved for long - if the breakout hasn't happened by then, the original read on the trend is stale. The stop sits just beyond the pullback bar's opposite extreme, the level that would prove the pullback failed to hold. The target is a configurable multiple of that same risk distance. Position size is computed from account risk percentage and the trade's actual stop distance, converted to lots through tick value and tick size rather than a hardcoded contract size - the same conversion this catalogue uses everywhere real money is at stake, because a fixed contract size silently mis-sizes metals, indices and JPY crosses. Notes and limitations Only one position is held at a time per symbol and magic number - a new signal is ignored while a position from this EA is already open. Signals are evaluated once per new bar on the last fully closed bar only, never on the forming bar, so nothing here repaints. A trade skipped because the stop distance was inside the broker's minimum stop or freeze level is simply not taken; the EA does not widen the stop to force an entry through that restriction. Like any trend and pullback system, this does poorly in a choppy, low-ADX market by design - it is deliberately selective about when it trades at all.
Expert advisor · MT5 · v1.0 · Free
About Holy Grail Pullback System
Holy Grail Pullback System is an expert advisor (trading robot) for MetaTrader 5 based on Moving Average and ADX. It can size trades from your balance and risk percent and trades breakouts. It has 11 settings, such as Magic, Ema period and Adx period. MQL source code included.
Files in the download: HolyGrailPullbackSystem.ex5, HolyGrailPullbackSystem.mq5, HolyGrailPullbackSystem.txt.
Trading robots can lose money. Check every setting and test on a demo account before using real funds.
Settings
| Setting | Default | What it does |
|---|---|---|
| Magic | 20261207 | Magic number for this system's own orders |
| Ema period | 20 | Trend moving average period |
| Adx period | 14 | ADX period |
| Adx threshold | 30.0 | Minimum ADX to treat the trend as strong enough to trade |
| Max bars to trigger | 3 | Bars a pending pullback breakout is watched before the watch expires |
| Stop buffer pips | 2.0 | Extra pips added beyond the pullback bar's extreme for the stop |
| Reward multiple | 2.0 | Take-profit distance as a multiple of the stop distance |
| Risk percent | 1.0 | Risk % of balance per trade |
| Max slippage points | 5 | Slippage tolerance passed to the trade request |
| Max retries | 5 | Attempts per order action before giving up |
| Retry wait ms | 500 | Pause between attempts, milliseconds |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
- Test it first on a demo account or in the Strategy Tester.
Tags: Moving Average · ADX · Trend · Risk & Lot Size · Breakout · MT5 Expert Advisor · MQL5 Source Code