Breadth Confirmed Trend System
A single pair can look like it is trending while the move is really just one currency having a headline-driven day, with the rest of the market doing nothing related. EURUSD grinding higher purely because of a EUR-specific announcement, with USD itself flat against everything else, is a fragile trend to follow - it can reverse the moment the headline effect fades. This system will not trade that. It reimplements the relative-strength technique used by the CurrencyStrength indicator elsewhere in this catalogue: the percentage change of all 28 pair combinations across the eight major currencies (USD, EUR, GBP, JPY, AUD, NZD, CAD, CHF), averaged into one signed score per currency. Before any moving-average trend signal on the chart symbol is allowed to trigger an entry, the system checks that the pair's BASE currency's score clearly outranks its QUOTE currency's score (for a long) or the reverse (for a short) by at least a configurable spread - the breadth confirmation the file name promises. The chart symbol is parsed into its base and quote 3-letter codes and checked against the eight majors this breadth measure covers; a symbol that is not a clean combination of two majors (an exotic, a metal, an index) is detected at startup and the EA refuses to trade it rather than silently guessing a wrong currency split. Notes and limitations - Only trades symbols that are a clean combination of two of the eight major currencies; anything else is refused at startup with a message in the Experts log, not silently mistraded. - The 28-pair strength calculation needs all 28 pairs selected in Market Watch; pairs the broker does not offer simply drop out of the average and are logged once at startup. - The stop only ever tightens (never widens) once open, using ATR distance recalculated each new bar. - Only one position at a time. - Lot sizing uses MODE_TICKVALUE/MODE_TICKSIZE, not a hardcoded contract size. - Requiring breadth agreement reduces trade frequency compared to a plain moving-average system - this is the intended trade-off, not a defect.
Expert advisor · MT4 · v1.0 · Free
About Breadth Confirmed Trend System
Breadth Confirmed Trend System is an expert advisor (trading robot) for MetaTrader 4 based on Moving Average and ATR. It moves the stop loss behind price (trailing stop / break-even), can size trades from your balance and risk percent and has a news filter. It has 15 settings, such as Strength timeframe, Strength lookback and Symbol suffix. MQL source code included.
Files in the download: BreadthConfirmedTrend.ex4, BreadthConfirmedTrend.mq4, BreadthConfirmedTrend.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 |
|---|---|---|
| Strength timeframe | PERIOD_H1 | Timeframe the currency-strength percentage change is measured on |
| Strength lookback | 24 | Bars back the strength percentage change is measured over |
| Symbol suffix | Broker suffix appended to every strength pair (e.g. ".pro"), leave blank if none | |
| Min score spread | 0.15 | Minimum base-vs-quote strength score gap required to confirm breadth (percent) |
| Trend ma period | 55 | Moving average period used as the price trend filter |
| Trend ma method | MODE_EMA | Moving average method for the trend filter |
| Stop atr multiple | 2.0 | Initial stop distance as a multiple of ATR |
| Atr period | 14 | ATR period used for stop distance and trailing |
| Use risk sizing | true | Size by percent risk to the stop instead of a fixed lot |
| Risk percent | 1.0 | Percent of equity risked per trade, when risk sizing is on |
| Fixed lots | 0.10 | Lot size when risk sizing is off, or as a sizing fallback |
| Magic number | 32701 | Magic number for orders opened by this EA |
| Slippage pips | 3 | Slippage tolerance, in pips |
| Max retries | 5 | Attempts per trade 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 4 open File → Open Data Folder, then go to MQL4 → Experts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 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: Buy/Sell Arrows · Trend · EURUSD · Trailing Stop & Break-even · Risk & Lot Size · News Trading · Moving Average · ATR · MT4 Expert Advisor · MQL4 Source Code