AlgoBullion — Best Free Forex Indicator for MT5: AI Pattern Matching + Smart Money Flow Detector

Ranked among the best free forex indicators for MT5. A 45-buffer institutional-grade detector with k-NN pattern similarity engine, BOS/MSS/FVG smart money features, 5-regime market classification, adaptive sensitivity with self-learning weights, and a real-time dashboard. Free compiled ex5 download — no registration required.

July 22, 2026  |  14 min read  |  Free EX5 Included

Free Download — AlgoBullion v3.00

Compiled EX5 file. Works on any MetaTrader 5 platform. Licensed until 2030.
Source code available upon request — contact us for licensing.

Download AlgoBullion.ex5 (Free)

File size: ~120 KB  |  Platform: MetaTrader 5  |  License valid until Jan 1, 2030

How AlgoBullion Looks on Chart

AlgoBullion renders a colored EMA line on the price chart with a 4-layer confidence cloud, plus match boxes showing the top historical periods that are most similar to current market conditions. A floating dashboard panel shows real-time metrics.

AlgoBullion MT5 Indicator on Chart - Pattern Matching and Smart Money Flow

AlgoBullion on an MT5 chart. The colored EMA line changes between green (bullish), red (bearish), and blue (neutral). Match boxes in the background show the most similar historical patterns with similarity percentage and directional labels.

Table of Contents

  1. What Is AlgoBullion?
  2. The 7 Detection Engines
  3. The 12-Dimensional Feature Vector
  4. How Pattern Matching Works — k-NN with Mahalanobis Distance
  5. Dashboard Panel Explained
  6. Input Parameters — Full Reference
  7. How to Read AlgoBullion Signals
  8. Alerts & Notifications
  9. Self-Learning: Adaptive Weights & Win Rate Tracking
  10. Installation Guide
  11. FAQ

1. What Is AlgoBullion?

AlgoBullion is an institutional-grade MT5 indicator built for traders who want more than just another moving average crossover. It combines a k-NN pattern similarity engine that scans up to 2,000 historical bars to find the closest matches to current market structure, with smart money detection (BOS, MSS, FVG, liquidity sweeps), 5-regime market classification, and a self-learning system that adapts its sensitivity and feature weights based on real-time outcome tracking.

The output is simple — a colored EMA line (green = bullish, red = bearish, blue = neutral) with a 4-layer confidence cloud. Match boxes show you exactly which historical periods the current market most resembles, with similarity percentages and directional labels. A docked dashboard panel gives you 37 rows of real-time analytics including probability distribution, win rates per regime, session strength, and the 12-dimensional feature breakdown.

Specification Value
NameAlgoBullion
Version3.00
PlatformMetaTrader 5 (MT5)
Buffers45 (24 calculation + 21 smart money/probability/learning)
Plots5 (4-layer cloud + 1 colored EMA line)
Core Algorithmk-NN with Mahalanobis-style standardized distance (12D feature space)
Scan Depth20–2,000 bars (auto-scaled by timeframe, up to 3x on H4+)
Smart Money FeaturesBOS, MSS, FVG, Equal Highs/Lows (liquidity), Displacement, Trend Direction
Regimes5 (Trending Up, Trending Down, Breakout, Ranging, Low Vol)
LicenseFree until January 1, 2030

2. The 7 Detection Engines

AlgoBullion is not a single-indicator system. It runs 7 concurrent detection engines, each feeding into the final probability-weighted output.

# Engine What It Does Output
1 Pattern Similarity Scans historical bars and finds top-K most similar patterns to current market via standardized 12D distance. Temporal decay weights recent patterns higher. Top-5 match similarity %, weighted momentum, match boxes on chart
2 Smart Money (BOS/MSS) Detects Break of Structure and Market Structure Shift using 5-bar fractal swing point analysis. Tracks when highs/lows break previous structural points. BOS and MSS signals per bar (-1 to +1 scale)
3 FVG Detection 3-candle imbalance detection. Measures gap between candle wicks against ATR to identify fair value gaps — the empty space where price has not been traded. FVG signal (+1 bullish, -1 bearish) when gap exceeds 30% ATR
4 Liquidity Sweep Scans 10-bar window for clustered equal highs and lows. When price breaks through a cluster, it flags the liquidity sweep — trapped traders with stops beyond. Buy-side and sell-side liquidity sweep flags per bar
5 Regime Classification Classifies each bar into 1 of 5 market regimes using ATR ratio, ROC5 magnitude, and RSI value. ATR expansion > 1.8x = Breakout. ATR < 0.4x = Low Vol. Between = Trend or Range. Integer regime label (0-4) plus gated pattern matching (only matches from same regime)
6 Adaptive Sensitivity Automatically adjusts similarity sensitivity based on current volume relative to its moving average. High volume → higher sensitivity. Low volume → relaxed thresholds. Dynamic sensitivity value that protects against false matches in low-liquidity sessions
7 Self-Learning Tracks per-regime win rates over time using MT5 GlobalVariables. Updates adaptive feature weights — rewarding features that contributed to correct predictions and penalizing noise features. Running win rate % per regime, learned feature weights stored persistently

3. The 12-Dimensional Feature Vector

Every bar in AlgoBullion is described by a 12-dimensional feature vector. This is what makes the pattern matching statistically meaningful — it's not comparing just one indicator value. It's comparing momentum across three time horizons, volatility, volume, market structure, displacement, and institutional flow signatures all at once.

# Feature What It Measures Default Weight
F1ROC 1-bar (%)Immediate price change — short-term momentum1.0
F2ROC 3-bar (%)3-period momentum — filters noise from F11.0
F3ROC 5-bar (%)Swine-level momentum — determines direction of top-K matches1.2
F4RSI (norm 0–1)Overbought/oversold state — contextualizes momentum1.5
F5ATR % of priceVolatility relative to price — identifies calm vs explosive conditions1.0
F6Volume RelativeTick volume vs 20-bar MA — unusual activity detection0.8
F7DisplacementBody/range ratio — measures directional conviction (0–1)1.0
F8Trend DirectionEMA slope normalized to -1..+1 — regime-agnostic trend signal1.3
F9BOS SignalBreak of Structure — fractal pattern acknowledges institutional flow1.2
F10MSS SignalMarket Structure Shift — directional change in structure1.2
F11FVG PresenceFair Value Gap — imbalance indicating institutional interest1.0
F12Liquidity ClusterCombined buy-side + sell-side liquidity sweep signal per bar1.0

Features F1–F6 capture what most indicators track (price + volume + volatility). Features F7–F12 capture what institutional traders track (displacement, structure, imbalance, and where trapped orders sit). The combination is what separates AlgoBullion from single-indicator systems.

4. How Pattern Matching Works — k-NN with Mahalanobis Distance

The Layman Explanation

Imagine you're looking at today's market and asking: "When has the market looked exactly like this before?" AlgoBullion answers that question mathematically. It takes the current bar's 12-dimensional fingerprint (momentum, volatility, volume, structure, etc.) and scans the last 300-2,000 historical bars looking for the 5 most similar fingerprints. It then checks what happened after those similar periods — did price go up or down? — and uses that to compute a weighted probability for the current bar.

The Technical Explanation

AlgoBullion uses a Mahalanobis-style standardized distance over the 12D feature space. Each feature is normalized by its historical standard deviation so that a 1% change in ROC5 (which might be normal) is penalized differently than a 10% change in ATR % (which would be extreme). The distance formula is:

distance = sum( |current_feature[j] - historical_feature[j]| / std[j] * weight[j] ) over j=0..11

This distance is then converted to a similarity score using an exponential decay function: similarity = 100 * exp(-distance * sensitivity). The sensitivity parameter controls how strictly the engine penalizes small differences — lower values give more matches (good for ranging markets), higher values only match nearly identical conditions (good for clean trends).

Key Selection Optimizations

  • Heap-based Top-K: O(N log K) complexity instead of O(N^2) — 2,000 bars scanned in milliseconds.
  • Regime Gating: Matches are only pulled from bars in the same market regime (Trending Up/Down, Breakout, Ranging, Low Vol). You don't match a trending bar to a consolidation bar — that would produce false signals.
  • Two-Pass Fallback: If pass 1 (strict regime gate) produces fewer than 3 matches, pass 2 widens to any regime to ensure the dashboard always has data.
  • Temporal Decay: Older historical matches are penalized by an exponential decay factor. A match from 10 bars ago carries more weight than one from 500 bars ago.
  • SMA-Seeded EMA: The resulting weighted momentum line is smoothed with an EMA that is seeded using an SMA of the first N values — eliminating the cold-start bias that plagues standard EMAs.

5. Dashboard Panel Explained

The right-side dashboard panel shows 37 rows of real-time data updated every second via the OnTimer event. It is fully draggable — click and drag the dark panel to reposition it anywhere on your chart.

Dashboard Section Rows Key Metrics
TITLE1"ALGOBULLION PRO" header
SYMBOL INFO2Symbol + timeframe + time, Bid/Ask/Spread
SMART FLOW3Direction (Bullish/Bearish/Neutral), Slope, Distance from line, Weighted Momentum, AvgSim, MinSim (OOD flag), DirAgreement
FEATURES2ROC1, ROC3, ROC5, RSI, ATR%, VolRel live values per bar
TOP MATCHES5Match #1-5 with similarity %, bars ago, and direction (UP/DOWN/FLAT)
ACCOUNT2Equity, Balance, Floating P&L, Daily P&L (closed + floating)
PRO STATUS3AdaptSens ON/OFF, Temporal Decay, OOD threshold, current Regime, Probability Bull/Bear/Neutral %
SELF-LEARNING5Per-regime win rates: Trend Up, Trend Down, Breakout, Ranging, Low Vol with color-coded %
SESSION1Active sessions (Asia/London/NY) + session strength %

6. Input Parameters — Full Reference

AlgoBullion exposes 40+ customizable input parameters grouped into 10 logical sections. Below is the parameters dialog showing every option you can configure.

AlgoBullion MT5 Input Parameters - Full Configuration Dialog
Group Parameter Default Range / Description
AI Pattern ScannerScan Depth30020–2000 bars, auto-scaled by timeframe
Top Matches52–20 most similar patterns to display
Pattern Length103–50 bars per pattern slice
Sensitivity1.50.1–5.0 (lower = more matches, higher = stricter)
Similarity FeaturesRSI Length14Standard RSI period
ATR Length14ATR period for volatility normalization
Volume MA Length20Tick volume moving average period
Smart Flow LineShow LineONEnable/disable the colored EMA line
Smoothing50EMA period for line smoothing (1–200)
Trend Length20Slope detection period (1–200)
AI: Adaptive SensEnableONVolume-based dynamic sensitivity adjustment
Strength0.50.1–2.0 adaptation strength
Temporal Decay0.50=off, 1.0=strong — recent patterns weighted higher
Min OOD Threshold15.0%Similarity below this = Out-of-Distribution warning (red)
Confidence CloudShow CloudONEnable/disable the 4-layer gradient cloud
Cloud Spread1.5ATR multiplier for cloud width
Transparency650–95 cloud opacity
Alerts14 paramsCross, color change, popup, push, sound alerts
Dashboard4 paramsShow/hide, X/Y position, font size
Session Filter4 paramsGMT-based session filtering, Friday cutoff
News Filter9 paramsMT5 economic calendar integration, visual lines, block windows

7. How to Read AlgoBullion Signals

Signal Appearance Meaning Trading Context
Green Line + Cloud EMA line colored green, cloud gradient green Weighted momentum from top-K matches is positive. Slope of smoothed line is rising. Historical similar patterns are predominantly bullish. Consider long entries at support.
Red Line + Cloud EMA line colored red, cloud gradient red Weighted momentum is negative. Slope is declining. Historical similar patterns are predominantly bearish. Consider short entries at resistance.
Blue Line EMA line colored blue, no cloud gradient Slope is flat/no clear signal. Top-K matches show mixed directions. Consolidation/indecision. Do not enter. Wait for color change.
Line Crossover Price crosses above/below the AlgoBullion smoothed line Real-time momentum exceeds (or falls below) the historical weighted average Stronger confirmation when crossing in the same direction as the line color
OOD Warning MinSim in dashboard shows red with low % Top matches have low similarity — current market has no historical precedent Out-of-distribution event. Do not trade. Wait for similarity to recover.

8. Alerts & Notifications

AlgoBullion supports 8 independent alert triggers, each configurable independently with popup (Alert), mobile push notification, and sound output.

Alert Triggers When
Price Crossed AboveBid crosses above AlgoBullion smoothed line
Price Crossed BelowBid crosses below AlgoBullion smoothed line
Changed BullishSlope turned positive (line changed from red/blue to green)
Changed BearishSlope turned negative (line changed from green/blue to red)
Changed NeutralSlope flattened to zero (line changed to blue)
Any CrossEither cross-up or cross-down event
Any Color ChangeAny of the three color-change events
Any AlertUnion of all trigger types — catch-all notification

9. Self-Learning: Adaptive Weights & Win Rate Tracking

AlgoBullion contains a persistent learning system that stores running statistics across MT5 sessions using GlobalVariables. This means the indicator gets smarter the longer you use it on a specific symbol.

  • Per-Regime Win Rates: For each of the 5 market regimes (Trend Up/Down, Breakout, Ranging, Low Vol), the engine tracks total predictions and correct predictions. A correct prediction is one where the weighted momentum direction matches the actual price movement X bars forward.
  • Adaptive Feature Weights: Each of the 12 features starts with a default weight (see Section 3 table). After each prediction, the engine checks if the prediction was correct. If yes — features that were closely matched get their weights increased. If no — features with large discrepancies get penalized. The learning rate is 0.05, so weights adapt gradually over hundreds of bars.
  • Per-Symbol Persistence: All learning data is keyed by symbol + regime. EURUSD Trend Up has its own weights and win rate. XAUUSD Breakout has its own. GBPUSD Ranging has its own. This prevents cross-symbol contamination.
  • Dashboard Transparency: All 5 regime win rates are displayed in real-time on the dashboard (green if above 60%, blue if 45-60%, red if below 45%, dim if no data). You can see which market conditions AlgoBullion performs best in — and avoid the ones where it struggles.

10. Installation Guide

  1. Download AlgoBullion.ex5 from the download button at the top of this page.
  2. Copy the file to: MQL5\Indicators\ (Open MT5 → File → Open Data Folder → MQL5 → Indicators).
  3. Restart MT5 or right-click the Navigator panel and click Refresh.
  4. Find AlgoBullion under Navigator → Indicators.
  5. Drag it onto any chart (works on all instruments: XAUUSD, EURUSD, GBPUSD, US30, NASDAQ, etc.).
  6. For alerts to work, enable push notifications in MT5: Tools → Options → Notifications → Enable Push Notifications → enter your MetaQuotes ID.
  7. For news filter to work, the economic calendar must be available in your MT5 terminal (Tools → Calendar → enable).

The indicator is valid on all timeframes. The scan depth auto-scales: H1 uses 300 bars × 2 = 600. H4 uses 300 bars × 3 = 900. Higher timeframes get proportionally deeper scans.

11. FAQ

Is AlgoBullion really free?

Yes — the compiled EX5 is free. The license is valid until January 1, 2030. Source code is available on request for custom modifications. Contact us for source code licensing.

Can this indicator repaint?

No. AlgoBullion calculates on closed bars only. The EMA line uses an SMA-seeded initialization but once the EMA seed is established (after the first smoothing period), all calculations use confirmed close prices.

What timeframes work best?

H1 and M15 are the sweet spot — enough bars per session for clean patterns without excessive noise. M5 works for scalping but produces more false signals due to micro-range noise. H4 and Daily work well for swing bias confirmation.

What instruments does this work on?

All MT5 instruments — forex pairs, XAUUSD, XAGUSD, indices (US30, NAS100, GER40), commodities (USOIL), and cryptocurrencies. The pattern engine is instrument-agnostic because all 12 features are normalized.

How many bars of history do I need?

At least 350 bars for the default scan depth to work properly. More is better — 500+ bars produce more reliable top-K matches. For M5, load at least 1,000 bars.

Can I use this for automated trading?

The EX5 is an indicator only — it does not place trades. However, the buffer values (BufLine, BufLineColor, BufProbBull, BufProbBear, BufRegime) are accessible from other EAs using iCustom(). You can build an EA that reads these buffers and trades based on the signals. We build custom EAs that integrate AlgoBullion signals.

Want the AlgoBullion Source Code or a Custom EA?

The EX5 is free. Source code access, custom modifications, white-label rebranding, and fully automated EAs built around AlgoBullion signals are available. View our pricing or see how our process works.

Request a Quote