TradingView strategy research

Holy Grail trading setup: ADX trend, pullback and validation

The Holy Grail trading strategy is a trend-pullback setup associated with Linda Raschke. Her public explanation uses a 14-period ADX reading above 30 before the first retracement to a 20-period EMA. The name does not establish a win rate. To test it, separate that published setup from the additional entry, stop, expiry and re-entry rules needed for a complete strategy.

See the decision guide

What the original public explanation supports

In her March 2004 Active Trader interview, hosted on her own website, Raschke describes buying the first retracement to EMA20 after ADX rises above 30 on the same timeframe, with an exit sought on a push to new highs. She also discusses momentum confirmation and discretion. That interview establishes the setup, but it does not specify every order, expiry or cancellation condition needed to reproduce a mechanical backtest.

  • Use periods consistently: EMA20 on a 30-minute chart is a 20-bar average, not a 20-day average. The ADX reading and pullback belong to that same chart timeframe.
  • The reproducible research version below adds its own price-direction filter, close-confirmed entry, deadlines and exits. It is not a verbatim Street Smarts rulebook or a claim to reproduce Raschke's discretionary trades.

Freeze a long-only research version

This is an untested specification for standard daily candles. Fix the symbol, exchange, session and price adjustments before testing. Use closing-price EMA20 and DMI with DI length 14 and ADX smoothing 14. Wait for 200 completed bars and valid indicator values. Use one unit with sufficient capital, one position at a time and no additions. All decisions below use completed bars.

  • Evaluate cancellation before recognition or confirmation. A first-touch bar that closes below EMA20 or fails H > T cancels the episode. A bar entirely below EMA20 also fails through the close rule. A recovery bar that reaches H and closes above T is canceled because the intended target was already reached.
  • ADX may fall below 30 during the waiting phase; that alone does not cancel this version. The price rules and deadlines control the active episode. A fresh strength cross occurring during an active episode is ignored.
  • These exact thresholds and the one-episode restriction are research choices. Short trades, stop-entry confirmation and discretionary re-entry require separate specifications and results.
StageExact research ruleReason for the boundary
Arm a fresh trendWhile flat and idle, ADX crosses from at most 30 to above 30. Close is above EMA20; EMA20 is above its value three bars earlier; high exceeds every high in the previous 20 bars, excluding today.The ADX event selects a fresh strength episode. Price and EMA slope select the long direction.
Wait for the first touchOn one of the next 10 bars, require low <= EMA20 <= high and close >= EMA20. Freeze T as that bar's high, L as its low and H as the highest high from the arm bar through the bar before the touch. Require H > T.The arm bar cannot also be the pullback bar. The target and touch range are known before confirmation.
Confirm a recoveryOn one of the next three bars after the touch, require close > T and close < H. The cancellation rules below must pass first. Submit a market buy after that close.A touch alone creates no trade. Confirmation on the third bar is allowed before expiry.
Cancel before entryCancel on any close < EMA20. After the touch, also cancel if any low < L or any high >= H. If no touch occurs by bar 10, or no confirmation by the third post-touch bar, expire at that close.A broken pullback, completed move or late recovery cannot be reclassified after seeing what happens next.
Consume the episodeKeep T, L and H fixed through repeat touches. After expiry, cancellation or a closed trade, require a later fresh ADX cross above 30 and all arm conditions. Never rearm on the same bar that ends an episode.One sustained high-ADX period cannot generate an unlimited series of dip entries.

Keep order timing separate from the signal

With default bar-close strategy calculation, TradingView normally fills a newly submitted market order at the next bar open. This version therefore does not buy at the confirmation close. Submit a protective bracket linked to the pending entry, with stop S = L minus one minimum tick and target H. Keep both prices fixed; do not wait until the entry-bar close to submit protection.

  • Count the entry bar as zero. If the position remains open at the close of bar five after entry, submit a market exit for the next available fill. Keep protection until the position closes, then cancel remaining exit orders. Ignore new setups while an order is pending or a position is open.
  • If an opening gap fills the entry at or beyond a bracket level, retain the actual fill and the first executable exit. Do not erase the trade or backdate a cancellation using the opening price. Planned stop distance is not a maximum possible loss.
  • After entry, the fixed bracket and time exit govern the position. The pre-entry EMA cancellation rule does not become an unstated moving stop.

Worked example: a qualifying touch with a later trigger

These are hypothetical daily observations, not a backtest. Assume tick size 0.01 and a point value of 1 per unit. The arm bar passes every condition with ADX moving from 29 to 31. Before the first touch, the episode reaches H = 108. On the touch bar, EMA20 = 103.20, high T = 104.40, low L = 102.90 and close = 103.60. The low reaches the EMA and the close holds above it.

  • A high of 104.80 with a close of 104.20 would not trigger this version. It would trigger some stop-entry versions, which is why their results cannot be mixed with this close-confirmed test.
  • If the confirmation bar instead has low 102.80 and close 104.60, cancel before checking the bullish close. The broken touch low cannot be repaired by a later recovery on that bar.
EventCalculation or observationExpected result
Next completed barHigh 104.80, low 103.30, close 104.60, EMA20 103.33.Close > 104.40, close < 108, low >= 102.90 and high < 108: submit the entry.
Assumed following openEntry fill 104.60; S = 102.90 - 0.01 = 102.89.Planned stop distance is 104.60 - 102.89 = 1.71 per unit.
Target branch108 - 104.60 = 3.40 per unit.Gross target-to-stop ratio is 3.40 / 1.71, approximately 1.99.
Illustrative costsAssume total round-trip costs of 0.04 per unit and exact bracket fills.Net target gain 3.36; net stopped loss 1.75. A gap or time exit changes these outcomes.

Three failure samples to check before profit statistics

Start each independent case from the same frozen touch: T = 104.40, L = 102.90, H = 108. The bar counts below begin after that touch. These fixtures test whether the rule implementation records absence, repetition and termination correctly; they do not estimate trading performance.

  • If ADX is already 34 when the test starts, there is no fresh cross and no arm event. Do not manufacture an earlier strength episode from incomplete history.
  • A repeated touch after a closed trade is also ineligible while ADX stays above 30. The reset requirement sacrifices some continuations in exchange for a reproducible episode count; it has not been shown to improve returns.
  • A setup can satisfy every entry condition and still hit its stop. Keep those losses separate from implementation errors and canceled setups.
SampleHypothetical observationsRequired outcome
Never triggeredBars one to three close at 104.10, 104.20 and 104.30. Each low stays >= 102.90, each high stays < 108, and each close stays >= its EMA20.No close exceeds 104.40. Expire after bar three with zero entries, even if bar four rallies.
Repeated pullbacksBar one has low 103.10, high 104.20, close 103.80 and EMA20 103.26. Bar two has low 103.15, high 104.30, close 104.10 and EMA20 103.34.Both touch the moving EMA again. Keep T = 104.40, L = 102.90 and the original deadline. Neither restarts the setup or creates a second entry.
Trend no longer qualifiesBar one has low 103.00, high 104.00, close 103.10 and EMA20 103.19. ADX remains 34.Cancel because close < EMA20, even though L is intact and ADX is high. A subsequent rebound needs a fresh eligible episode.

Validate the frozen version before optimizing it

First audit the arm, touch, confirmation, cancellation and expiry timestamps against the cases above. Then use an earlier development sample and a later untouched evaluation sample. Keep symbol, timeframe, costs, capital and order settings fixed across parameter comparisons. Count armed episodes, touches, expired setups, cancellations and filled trades separately.

  • A small predeclared sensitivity study could compare ADX thresholds 28, 30 and 32 against EMA lengths 18, 20 and 22: nine combinations, with both DMI lengths fixed at 14. Keep the deadlines, exits and direction rules unchanged. These alternatives are tests, not recommended settings.
  • Record every combination and its trade count, net result, profit factor, average trade and drawdown. Select on the development sample, freeze the choice, and report the later sample separately. Repeatedly choosing settings on the later dates consumes that holdout.
  • Inspect historical bars that touch both exits, include commission and slippage, and check finer price detail where available. TradingView's broker emulator uses fill assumptions; standard candles and a realistic cost model do not turn a simulation into live evidence.

Use Pineify to implement and compare the written rules

Give Pine Script AI Coding Agent this specification and the three failure fixtures. Request a strategy draft with visible state changes, frozen levels and exposed ADX and EMA inputs. Review the generated source, request syntax validation and compare its event log with the examples before using performance results.

  • Strategy Optimizer can compare exposed strategy inputs through its TradingView extension. Use the nine-combination sensitivity study after the frozen baseline behaves correctly, and reserve the later dates yourself.
  • Backtest Deep Report accepts supported TradingView trade CSV data and reports metrics including net profit, profit factor, average trade and drawdown from closed-trade equity. Check the imported trades and cost treatment before comparing reports. This drawdown does not capture every intratrade loss. Keep a separate setup log: a closed-trade file cannot tell you how many pullbacks never triggered.
  • Code generation, parameter search and report analysis do not prove the setup is profitable or execute this article's rules in a brokerage account.
Where Pineify fits

Pine Script AI Coding Agent

Draft the explicit ADX episode, first-touch and confirmation rules, then review the generated source and compare its events against the failure samples.

Also useful: Strategy Optimizer. Compare exposed ADX and EMA inputs after verifying the baseline. Keep a later sample separate and retain the results of every setting.

Draft the frozen setup rules

Frequently asked questions

Educational strategy research, not investment advice. The mechanical rules and prices are illustrative and have not been performance-tested. Trading can lose money, and gaps can exceed a planned stop distance. Historical tests and parameter searches do not guarantee future results.

Sources and verification

Published by Pineify. Pineify is an independent product and is not affiliated with TradingView. Sources support the technical explanations; examples do not establish trading performance.