Loading…

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

SettingDefaultWhat it does
Strength timeframePERIOD_H1Timeframe the currency-strength percentage change is measured on
Strength lookback24Bars back the strength percentage change is measured over
Symbol suffixBroker suffix appended to every strength pair (e.g. ".pro"), leave blank if none
Min score spread0.15Minimum base-vs-quote strength score gap required to confirm breadth (percent)
Trend ma period55Moving average period used as the price trend filter
Trend ma methodMODE_EMAMoving average method for the trend filter
Stop atr multiple2.0Initial stop distance as a multiple of ATR
Atr period14ATR period used for stop distance and trailing
Use risk sizingtrueSize by percent risk to the stop instead of a fixed lot
Risk percent1.0Percent of equity risked per trade, when risk sizing is on
Fixed lots0.10Lot size when risk sizing is off, or as a sizing fallback
Magic number32701Magic number for orders opened by this EA
Slippage pips3Slippage tolerance, in pips
Max retries5Attempts per trade action before giving up
Retry wait ms500Pause between attempts, milliseconds

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Experts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: Buy/Sell Arrows · Trend · EURUSD · Trailing Stop & Break-even · Risk & Lot Size · News Trading · Moving Average · ATR · MT4 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria