Holy Grail strategy

On ES futures from January 2016 to July 2026, the Holy Grail lost $50,661 after costs and made money in 3 of 11 years.

TrendIntraday5-minute barsBacktested Nov 6, 2026

Holy Grail backtest, the result

Contract

E-mini S&P 500

  • −$50.7K

    Net after costs

    After $70,373 in fees and slippage

  • 3 of 11

    Years that made money

    January 2016 to July 2026

  • −$93K

    Largest drawdown

    Peak to trough, 1 contract

  • −$21

    Average trade

    2,466 trades

Holy Grail on ES, net after costs by month, from January 2016 to July 2026: −$50,661; buying and holding one ES contract: +$236,212

Net after costs by month, January 2016 to July 2026.

Holy Grail rules

In a strong trend, wait for a pullback to the 20-bar EMA and enter as price turns back through the pullback bar's high.

A drawing of the rules on a made-up day, not a result.

  1. ADX(14) and the directional indicators are Wilder's, and the average is the 20-bar EMA, on every five-minute close of the Globex session.
  2. When the ADX is above 30, +DI is above -DI and a bar's low touches the EMA, a buy stop is set above the high of the bar before it, with a protective stop at the touching bar's low; shorts mirror it.
  3. The entry stop lives for the next five-minute bar; entries only in the day session.
  4. Whatever is open at the exit minute is closed: 15:45 New York on ES, 14:30 on CL.
Decides on
5-minute bars
Holds
Nothing overnight
Parameters
threshold 30, warmup 28, open minute 570, exit minute 945

Results by year

It made money in 3 of 11 years on ES. Its best year was 2025, +$34,940, and its worst 2020, −$28,245.

Net after costs by year on ES, with trades, win rate, largest drawdown and buying and holding the same contract
YearNetTradesWin rateDrawdownBuy and hold
2016−$9,22922819%−$12,215+$11,497
2017−$7,10224520%−$7,356+$21,936
2018+$9,52124425%−$6,535−$8,589
2019−$15,20426619%−$15,714+$35,436
2020−$28,24525720%−$35,483+$27,761
2021−$9,25024323%−$14,220+$51,361
2022−$11,88023922%−$15,819−$45,939
2023−$10,11021724%−$17,807+$38,435
2024+$6,18821824%−$8,948+$42,947
2025+$34,94020031%−$13,038+$37,010
2026, Jan to Jul−$10,28910924%−$19,920+$24,355

Holy Grail backtest results

On ES it made $19,713 before costs. Fees and slippage took $70,373, more than all of it.

Net = before costs − fees − slippage
ES: $19,713 − $8,723 − $61,650 = −$50,661
Every figure of the Holy Grail backtest, by contract
FigureESCL
Net after costs−$50,661−$48,761
Before costs+$19,713+$1,810
Fees$8,723$8,471
Slippage$61,650$42,100
Trades2,4662,105
Trades a year235200
Win rate23%24%
Profit factor0.910.87
Average trade−$21−$23
Average trade, 95% interval−$52 to $15−$45 to $0
Sharpe ratio-0.36-0.59
Largest drawdown−$93,013−$51,285
Time in the market4%3%
Buying and holding the contract+$236,212+$52,267

The interval holds zero: this test cannot tell the average trade from no edge.

Holy Grail code and Pine Script

The strategy as the backtest ran it, and the Pine Script our compiler wrote from it for TradingView.

Holy Grail
holy_grail.py
1from atlantive import BUY, EMA, NEW_YORK, SELL, Bars, Session, Strategy2 3 4class HolyGrail(Strategy):5    """Raschke and Connors' Holy Grail on five-minute bars, traded in the contract's day session.6 7    ADX(14) and the directional indicators are Wilder's (alpha 1 / 14), the average is the 20-bar8    EMA, all on every five-minute close of the Globex session. When the ADX is above 30, +DI is above9    -DI and a bar's low touches the EMA, a buy stop is set one bar ahead above the high of the bar10    before it, with a protective stop at the touching bar's low; shorts mirror it (-DI above +DI, the11    high touching the EMA, a sell stop below the previous bar's low, the stop at the touching bar's12    high). The entry stop lives for the next five-minute bar. Both stops are tested on every13    one-second close, entries only in the day session, and whatever is open at its exit minute is14    closed: 15:45 New York on the equity index, 14:30 on crude oil. Nothing is read before 28 bars.15    The clock is one-second bars; the five-minute bars are built from them, by their start time.16    """17 18    data = "bars"19 20    class Params:21        threshold: float = 30.022        warmup: int = 2823        open_minute: int = 57024        exit_minute: int = 94525        clip: int = 126 27    class State:28        clock: Session(zone=NEW_YORK)29        bars: Bars(interval_ns=1_000_000_000)30        average: EMA(alpha=0.09523809523809523)31        true_range: EMA(alpha=0.07142857142857142)32        plus_dm: EMA(alpha=0.07142857142857142)33        minus_dm: EMA(alpha=0.07142857142857142)34        adx: EMA(alpha=0.07142857142857142)35        seen: int36        last_high: float37        last_low: float38        last_close: float39        armed: int40        trigger: float41        protect: float42        stop_level: float43        bar_key: int44        bar_high: float45        bar_low: float46        bar_close: float47 48    def on_event(self, view, ev, orders):49        self.clock.update(ev)50        if not self.bars.update(ev):51            return52        minute = self.clock.prev_minute53        second = self.clock.prev_second54        day = self.clock.prev_day55        high = float(self.bars.prev_high)56        low = float(self.bars.prev_low)57        close = float(self.bars.prev_close)58        key = (day * 1440 + minute) // 559        if key != self.bar_key:60            if self.bar_key != 0:61                self.armed = 062                h = self.bar_high63                lo = self.bar_low64                c = self.bar_close65                self.average.update(c)66                if self.seen > 0:67                    up = h - self.last_high68                    down = self.last_low - lo69                    pdm = 0.070                    mdm = 0.071                    if up > down and up > 0:72                        pdm = up73                    if down > up and down > 0:74                        mdm = down75                    tr = max(h - lo, abs(h - self.last_close), abs(lo - self.last_close))76                    self.true_range.update(tr)77                    self.plus_dm.update(pdm)78                    self.minus_dm.update(mdm)79                    atr = self.true_range.value80                    if atr > 0:81                        pdi = 100.0 * self.plus_dm.value / atr82                        mdi = 100.0 * self.minus_dm.value / atr83                        total = pdi + mdi84                        if total > 0:85                            self.adx.update(100.0 * abs(pdi - mdi) / total)86                        if self.seen >= self.p.warmup and self.adx.value > self.p.threshold:87                            ema = self.average.value88                            if pdi > mdi and lo <= ema:89                                self.armed = 190                                self.trigger = self.last_high91                                self.protect = lo92                            elif mdi > pdi and h >= ema:93                                self.armed = -194                                self.trigger = self.last_low95                                self.protect = h96                self.seen += 197                self.last_high = h98                self.last_low = lo99                self.last_close = c100            self.bar_key = key101            self.bar_high = high102            self.bar_low = low103        else:104            self.bar_high = max(self.bar_high, high)105            self.bar_low = min(self.bar_low, low)106        self.bar_close = close107        late = second + 1 >= self.p.exit_minute * 60 or minute < self.p.open_minute108        if view.position > 0:109            if close <= self.stop_level or late:110                orders.ioc(side=SELL, qty=abs(view.position))111        elif view.position < 0:112            if close >= self.stop_level or late:113                orders.ioc(side=BUY, qty=abs(view.position))114        elif not late:115            if self.armed == 1 and close > self.trigger:116                orders.ioc(side=BUY, qty=self.p.clip)117                self.stop_level = self.protect118                self.armed = 0119            elif self.armed == -1 and close < self.trigger:120                orders.ioc(side=SELL, qty=self.p.clip)121                self.stop_level = self.protect122                self.armed = 0
1//@version=62// HolyGrail, exported from Atlantive.3// Chart simulation: decisions use completed bars; market orders fill at the next bar open.4// Native fills, fees, data gaps and session boundaries can differ. Re-test on the target symbol.5// Use standard time-based candles and the strategy's timeframe, not synthetic chart prices.6// Pine v6 trims old trade records at its order limit; the strategy keeps calculating.7// Margin is explicitly disabled to retain the native signal simulation's sizing.8strategy("HolyGrail", overlay=true, initial_capital=100000.0, commission_type=strategy.commission.cash_per_contract, commission_value=1.68, default_qty_type=strategy.fixed, default_qty_value=1, calc_on_every_tick=false, process_orders_on_close=false, slippage=0, margin_long=0, margin_short=0)9 10if timeframe.in_seconds() != 111    runtime.error("HolyGrail was exported for the 1 second timeframe; set the chart to 1S.")12 13threshold = input.float(30.0, "threshold")14warmup = input.int(28, "warmup", minval=-9007199254740991, maxval=9007199254740991)15open_minute = input.int(570, "open_minute", minval=-9007199254740991, maxval=9007199254740991)16exit_minute = input.int(945, "exit_minute", minval=-9007199254740991, maxval=9007199254740991)17clip = input.int(1, "clip", minval=-9007199254740991, maxval=9007199254740991)18 19_q_safe_int(x) =>20    if math.abs(x) > 900719925474099121        runtime.error("an integer left the exact chart range; this run cannot be compared faithfully")22    int(x)23_q_int(x) => _q_safe_int(x < 0 ? math.ceil(x) : math.floor(x))24_q_iadd(a, b) => _q_safe_int(a + b)25_q_imul(a, b) =>26    if a != 0 and math.abs(b) > 9007199254740991 / math.abs(a)27        runtime.error("an integer multiplication left the exact chart range; this run cannot be compared faithfully")28    _q_safe_int(a * b)29_q_ifloordiv(a, b) =>30    _q_r = a % b31    _q_q = (a - _q_r) / b32    _q_safe_int(_q_r != 0 and ((_q_r < 0) != (b < 0)) ? _q_q - 1 : _q_q)33 34_q_high = _q_int(math.round(high * 1000000000.0))35_q_low = _q_int(math.round(low * 1000000000.0))36_q_close = _q_int(math.round(close * 1000000000.0))37 38var int seen = 039var float last_high = 0.040var float last_low = 0.041var float last_close = 0.042var int armed = 043var float trigger = 0.044var float protect = 0.045var float stop_level = 0.046var int bar_key = 047var float bar_high = 0.048var float bar_low = 0.049var float bar_close = 0.050// clock: completed chart bar's opening timestamp (America/New_York).51_q_clock_prev_minute = hour(time, "America/New_York") * 60 + minute(time, "America/New_York")52_q_clock_prev_second = _q_clock_prev_minute * 60 + second(time, "America/New_York")53_q_clock_prev_weekday = (dayofweek(time, "America/New_York") + 5) % 754_q_clock_prev_day = int(timestamp("UTC", year(time, "America/New_York"), month(time, "America/New_York"), dayofmonth(time, "America/New_York"), 0, 0) / 86400000)55// Current clock: this chart bar's scheduled close, known without a future bar.56// A native next event after a data gap can carry a later time.57_q_clock_minute = hour(time_close, "America/New_York") * 60 + minute(time_close, "America/New_York")58_q_clock_second = _q_clock_minute * 60 + second(time_close, "America/New_York")59_q_clock_weekday = (dayofweek(time_close, "America/New_York") + 5) % 760_q_clock_day = int(timestamp("UTC", year(time_close, "America/New_York"), month(time_close, "America/New_York"), dayofmonth(time_close, "America/New_York"), 0, 0) / 86400000)61_q_clock_seen = 162var float _q_average_value = 0.063var bool _q_average_seeded = false64var int _q_average_skipped = 065var int _q_average_frozen = 066var float _q_true_range_value = 0.067var bool _q_true_range_seeded = false68var int _q_true_range_skipped = 069var int _q_true_range_frozen = 070var float _q_plus_dm_value = 0.071var bool _q_plus_dm_seeded = false72var int _q_plus_dm_skipped = 073var int _q_plus_dm_frozen = 074var float _q_minus_dm_value = 0.075var bool _q_minus_dm_seeded = false76var int _q_minus_dm_skipped = 077var int _q_minus_dm_frozen = 078var float _q_adx_value = 0.079var bool _q_adx_seeded = false80var int _q_adx_skipped = 081var int _q_adx_frozen = 082int minute_l = na83int second_l = na84int day = na85float high_l = na86float low_l = na87float close_l = na88int key = na89float h = na90float lo = na91float c = na92float up = na93float down = na94float pdm = na95float mdm = na96float tr = na97float atr = na98float pdi = na99float mdi = na100float total = na101float ema = na102bool late = false103 104minute_l := _q_int(_q_clock_prev_minute)105second_l := _q_int(_q_clock_prev_second)106day := _q_int(_q_clock_prev_day)107high_l := _q_high * 1.0108low_l := _q_low * 1.0109close_l := _q_close * 1.0110key := _q_int(_q_ifloordiv(_q_iadd(_q_imul(day, 1440), minute_l), 5))111if key != bar_key112    if bar_key != 0113        armed := _q_int(0)114        h := bar_high115        lo := bar_low116        c := bar_close117        _q_sample1 = c118        if na(_q_sample1) or math.abs(_q_sample1) > 1.7976931348623157e308119            _q_average_skipped := _q_average_skipped + 1120        else121            if not _q_average_seeded122                _q_average_value := _q_sample1123                _q_average_seeded := true124            else125                _q_moved2 = _q_average_value + 0.09523809523809523 * (_q_sample1 - _q_average_value)126                if _q_moved2 == _q_average_value and _q_sample1 != _q_average_value127                    _q_average_frozen := _q_average_frozen + 1128                _q_average_value := _q_moved2129        if seen > 0130            up := h - last_high131            down := last_low - lo132            pdm := 0.0133            mdm := 0.0134            if up > down and up > 0135                pdm := up136            if down > up and down > 0137                mdm := down138            tr := math.max(h - lo, math.max(math.abs(h - last_close), math.abs(lo - last_close)))139            _q_sample3 = tr140            if na(_q_sample3) or math.abs(_q_sample3) > 1.7976931348623157e308141                _q_true_range_skipped := _q_true_range_skipped + 1142            else143                if not _q_true_range_seeded144                    _q_true_range_value := _q_sample3145                    _q_true_range_seeded := true146                else147                    _q_moved4 = _q_true_range_value + 0.07142857142857142 * (_q_sample3 - _q_true_range_value)148                    if _q_moved4 == _q_true_range_value and _q_sample3 != _q_true_range_value149                        _q_true_range_frozen := _q_true_range_frozen + 1150                    _q_true_range_value := _q_moved4151            _q_sample5 = pdm152            if na(_q_sample5) or math.abs(_q_sample5) > 1.7976931348623157e308153                _q_plus_dm_skipped := _q_plus_dm_skipped + 1154            else155                if not _q_plus_dm_seeded156                    _q_plus_dm_value := _q_sample5157                    _q_plus_dm_seeded := true158                else159                    _q_moved6 = _q_plus_dm_value + 0.07142857142857142 * (_q_sample5 - _q_plus_dm_value)160                    if _q_moved6 == _q_plus_dm_value and _q_sample5 != _q_plus_dm_value161                        _q_plus_dm_frozen := _q_plus_dm_frozen + 1162                    _q_plus_dm_value := _q_moved6163            _q_sample7 = mdm164            if na(_q_sample7) or math.abs(_q_sample7) > 1.7976931348623157e308165                _q_minus_dm_skipped := _q_minus_dm_skipped + 1166            else167                if not _q_minus_dm_seeded168                    _q_minus_dm_value := _q_sample7169                    _q_minus_dm_seeded := true170                else171                    _q_moved8 = _q_minus_dm_value + 0.07142857142857142 * (_q_sample7 - _q_minus_dm_value)172                    if _q_moved8 == _q_minus_dm_value and _q_sample7 != _q_minus_dm_value173                        _q_minus_dm_frozen := _q_minus_dm_frozen + 1174                    _q_minus_dm_value := _q_moved8175            atr := _q_true_range_value176            if atr > 0177                pdi := (100.0 * _q_plus_dm_value * 1.0) / atr178                mdi := (100.0 * _q_minus_dm_value * 1.0) / atr179                total := pdi + mdi180                if total > 0181                    _q_sample9 = (100.0 * math.abs(pdi - mdi) * 1.0) / total182                    if na(_q_sample9) or math.abs(_q_sample9) > 1.7976931348623157e308183                        _q_adx_skipped := _q_adx_skipped + 1184                    else185                        if not _q_adx_seeded186                            _q_adx_value := _q_sample9187                            _q_adx_seeded := true188                        else189                            _q_moved10 = _q_adx_value + 0.07142857142857142 * (_q_sample9 - _q_adx_value)190                            if _q_moved10 == _q_adx_value and _q_sample9 != _q_adx_value191                                _q_adx_frozen := _q_adx_frozen + 1192                            _q_adx_value := _q_moved10193                if seen >= warmup and _q_adx_value > threshold194                    ema := _q_average_value195                    if pdi > mdi and lo <= ema196                        armed := _q_int(1)197                        trigger := last_high198                        protect := lo199                    else if mdi > pdi and h >= ema200                        armed := _q_int(-1)201                        trigger := last_low202                        protect := h203        seen := _q_int(_q_iadd(seen, 1))204        last_high := h205        last_low := lo206        last_close := c207    bar_key := _q_int(key)208    bar_high := high_l209    bar_low := low_l210else211    bar_high := math.max(bar_high, high_l)212    bar_low := math.min(bar_low, low_l)213bar_close := close_l214late := _q_iadd(second_l, 1) >= _q_imul(exit_minute, 60) or minute_l < open_minute215if _q_int(strategy.position_size) > 0216    if close_l <= stop_level or late217        _q_qty11 = _q_int(math.abs(_q_int(strategy.position_size)))218        if _q_qty11 <= 0219            runtime.error("market order quantity must be a positive whole unit")220        _q_pos11 = _q_int(strategy.position_size)221        if _q_pos11 < 0 or _q_pos11 > 0 and _q_qty11 < _q_pos11222            runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")223        strategy.order("q1", strategy.short, _q_qty11)224else if _q_int(strategy.position_size) < 0225    if close_l >= stop_level or late226        _q_qty12 = _q_int(math.abs(_q_int(strategy.position_size)))227        if _q_qty12 <= 0228            runtime.error("market order quantity must be a positive whole unit")229        _q_pos12 = _q_int(strategy.position_size)230        if _q_pos12 > 0 or _q_pos12 < 0 and _q_qty12 < -_q_pos12231            runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")232        strategy.order("q2", strategy.long, _q_qty12)233else if not (late)234    if armed == 1 and close_l > trigger235        _q_qty13 = _q_int(clip)236        if _q_qty13 <= 0237            runtime.error("market order quantity must be a positive whole unit")238        _q_pos13 = _q_int(strategy.position_size)239        if _q_pos13 > 0 or _q_pos13 < 0 and _q_qty13 < -_q_pos13240            runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")241        strategy.order("q3", strategy.long, _q_qty13)242        stop_level := protect243        armed := _q_int(0)244    else if armed == -1 and close_l < trigger245        _q_qty14 = _q_int(clip)246        if _q_qty14 <= 0247            runtime.error("market order quantity must be a positive whole unit")248        _q_pos14 = _q_int(strategy.position_size)249        if _q_pos14 < 0 or _q_pos14 > 0 and _q_qty14 < _q_pos14250            runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")251        strategy.order("q4", strategy.short, _q_qty14)252        stop_level := protect253        armed := _q_int(0)

How it was tested

The published rules, never tuned on the data, with real costs on every fill. Every strategy here is tested the same way.

Market data
CME Globex 5-minute bars, Jan 2, 2016 to Jul 31, 2026
Rules
As published, with the published parameters, never tuned on this data
Size
1 contract on every trade
Contract
The most traded one, rolled as the market moved
Fees
The broker's $0.50 a side, plus CME's and the NFA's fees when the window opens
Slippage
1 tick a side on ES, 2 in NQ's regular session and 3 outside it, 1 on other markets, where it was not measured
Stops and entries
Tested on 1-second closes and filled at the next bar
Contracts traded
ES: 43 contracts, ESH6 to ESU6CL: 128 contracts, CLG6 to CLU6
Costs paid
ES: $8,723 in fees, $61,650 in slippageCL: $8,471 in fees, $42,100 in slippage
Warm-up
None: each contract reads only its own bars
Flagged days
ES: NoneCL: None Days the data holds too few bars for. Flagged, not removed.

Could you pass
a prop firm challenge
with the Holy Grail?

A backtest says whether a strategy makes money. Our AI runs its trades through the rules of every prop firm account, then tells you which one it would pass and at what size.

No card needed. Free credits every month.

  • Most money: Blue Guardian Futures Direct 50K, $5,084
  • Best payout odds: Funded Futures Family Straight to Funded 50K, 98%
  • Fastest pass: Phidias Express to Live 50K, 11 days
Blue Guardian Futures Direct 50K
Most money

$5,084

Median net across 2,000 simulated runs

Evaluation
None
First payout
97%
Fees paid
$1,521

Median net across 2,000 simulated runs

Best 5%$13,143Worst 5%−$412
Day 060120180
Example: ES opening range breakout

Questions about the Holy Grail

What is the Holy Grail?

In a strong trend, wait for a pullback to the 20-bar EMA and enter as price turns back through the pullback bar's high. The rules follow Linda Bradford Raschke and Laurence A. Connors, Street Smarts: High Probability Short-Term Trading Strategies (1996). Atlantive backtested it on CME futures from January 2016 to July 2026 after costs.

Is the Holy Grail profitable on ES futures?

Not in this backtest: on ES futures from January 2016 to July 2026 it lost $50,661 after costs, over 2,466 trades, positive in 3 of 11 years; on CL it lost $48,761. Buying and holding one ES contract over the same window made $236,212. The average trade was −$21, its 95% interval −$52 to $15. These are hypothetical results of a backtest, not of trading.

What are the Holy Grail's rules?

ADX(14) and the directional indicators are Wilder's, and the average is the 20-bar EMA, on every five-minute close of the Globex session. When the ADX is above 30, +DI is above -DI and a bar's low touches the EMA, a buy stop is set above the high of the bar before it, with a protective stop at the touching bar's low; shorts mirror it. The entry stop lives for the next five-minute bar; entries only in the day session. Whatever is open at the exit minute is closed: 15:45 New York on ES, 14:30 on CL. The rules follow Linda Bradford Raschke and Laurence A. Connors, Street Smarts: High Probability Short-Term Trading Strategies (1996). Its parameters are the published ones, never tuned on the data it was tested on.

How was the Holy Grail backtested?

On CME Globex data from January 2016 to July 2026, one contract, on 5-minute bars, rolled to the most traded contract as the market moved, with the broker's and CME's fees and the slippage measured on each market. Stops and entries were tested on 1-second closes and filled at the next bar. Nothing was fitted to the data.

Can I run the Holy Grail in TradingView?

Yes. The page carries its Pine Script, written by Atlantive's compiler from the same code the backtest ran, for TradingView's strategy tester. A chart's fills and fees can differ from the backtest's, so test it again on the symbol you trade.

Can I change the Holy Grail and test it again?

Yes. Rerun it in Atlantive: a new chat opens with the strategy's rules in the box, for you to read, change and send. The agent writes the code, backtests it on the market and window you name, and reports the result with its costs.

Rerun it in Atlantive. Change the market, the dates or a rule, then send it.

A new chat opens with this in the box

Backtest Raschke and Connors' Holy Grail on five-minute bars on ES, 2016-01-02 to 2026-07-31, one contract on a $100,000 account with default costs: with ADX(14) above 30 and +DI above -DI, when a bar touches the 20 EMA, buy stop above the previous bar's high for one bar, stop at the touching bar's low (shorts mirrored), entries in the day session, flat at the session's exit.

Never sent for you

May we measure this visit?

With your consent, Google Analytics and PostHog count visits to these pages. You can separately allow Google Ads to measure visits from our ads. Visit measurement starts only after you choose. Cookie policy