Discussing the article: "Automating Classic Market Methods in MQL5 (Part 4): Mark Minervini's Trend Template"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Automating Classic Market Methods in MQL5 (Part 4): Mark Minervini's Trend Template.
This article presents TrendTemplateEA, an Expert Advisor implementing Mark Minervini's eight-condition trend template for daily forex charts. It evaluates all conditions on every bar and enters only when they are simultaneously satisfied, using RSI above 50 in place of the stock market RS rating. The entry trigger is a 20-bar high breakout on expanding volume, with all rules coded and testable in MQL5.
In Part 3 of this series, we automated Stan Weinstein's Stage Analysis—a framework that classifies markets into four lifecycle stages and trades only Stage 2 advances. Weinstein asks one question: what phase is this market in? Mark Minervini asks a harder one: does this market meet each one of eight specific structural requirements simultaneously?
Minervini is one of the most studied traders alive. He won the U.S. Investing Championship in 1997 with an audited 155% return and again in 2021 with an audited 334.8% return in the million-dollar category. His method, which he calls SEPA—Specific Entry Point Analysis—begins with the Trend Template: a checklist of eight technical conditions that a market must satisfy before it even qualifies for chart analysis. If any single condition fails, the instrument is eliminated. No exceptions.
The power of the trend template is not in any individual condition. Each condition, taken alone, is a basic technical filter. The power comes from requiring all eight conditions simultaneously. This combination selects markets that trend in a specific, structured way: moving averages are stacked correctly, price is above them, distance from the annual low confirms momentum, proximity to the yearly high confirms leadership, and the 200-day moving average is rising, suggesting sustained institutional support.
The trend template was designed for stocks, where Minervini also applies fundamental filters and a relative strength ranking from Investor's Business Daily. This article adapts seven technical conditions for forex pairs on the daily timeframe. The eighth condition (RS ranking) cannot be replicated in MQL5 without an external data feed, so it is replaced with a 14-period RSI momentum filter. The entry signal is the Volatility Contraction Pattern breakout—a series of progressively tighter price swings ending in a high-volume breakout through resistance—simplified here to a 20-bar high breakout on expanding volume.
Author: Tola Moses Hector