MQL5 Source Codes of Technical Indicators for MetaTrader 5 - 4

icon

MQL5 technical indicators analyze MetaTrader 5 price charts on Forex, as well as stock and commodity markets. Indicators define trend direction and power, overbought and oversold states, support and resistance levels. Underlying mathematical models provide objective assessment of the current market state allowing traders to accept or reject trading system's signals.

You can download and launch offered indicators in MetaTrader 5. The library of indicators is also available directly from MetaTrader 5 platform and MetaEditor development environment.

Submit your code

Marks swing highs and lows that are confirmed by a fixed number of bars on both sides and plots a simple moving average for trend context.

Plots a Donchian channel built from closed bars, arrows after a close outside the channel and a two-colour ATR trailing stop line that follows the breakout direction.

Draws the high and low of the previous day and the previous week plus round-number levels around the current price as horizontal lines.

Free MT5 chart planner with draggable entry, stop and target levels, spread, risk-based lots, fees, estimated swap, break-even and net risk/reward. Indicator only; no orders.

A regression-test harness for indicator code. It compares an incremental, tick-by-tick calculation (the way OnCalculate runs live) with an independent from-scratch reference on a fixed dataset, flags every deviation, and prints a regression digest you can compare between versions of your code.

Unbroken swing highs and lows, shaded by strength: how old each level is and how many times price was turned away from it.

A panel showing the current spread, the average spread since the indicator was attached and the spread cost of a 1-lot trade in account currency.

Draws the Tokyo, London and New York trading sessions as coloured boxes that span the high and low of each session.

A panel that ranks the eight major currencies (USD, EUR, GBP, JPY, AUD, NZD, CAD, CHF) by their average rate of change against each other.

Splits the current swing range (last swing high to last swing low) into a Premium zone above 50% and a Discount zone below 50%, with an equilibrium line and a live label that shows where the price is inside the range.

Detects swing highs and lows and labels every break of market structure: BOS (Break of Structure) when the trend continues and CHoCH (Change of Character) when the trend reverses.

Detects bullish and bearish Fair Value Gaps (three-candle price imbalances), draws them as boxes extending to the right and automatically removes each box once the price fills the gap.

Marks bullish and bearish order blocks (the last opposite candle before a strong impulse) and tracks their state: fresh, mitigated when price returns, and removed when broken.

Fair Value Gap (FVG) Detector with Auto-Removal When Filled

Shows the daily opening gaps for stock indices and indicates whether each one has been filled.

Marks built-in economic calendar events on the chart with time lines, optional windows, labels, a panel and alerts.

A compact dashboard that classifies EMA trends across multiple timeframes and displays slope, ATR distance, duration and an alignment summary.

Draws support and resistance levels from confirmed swing highs and lows, and the fair value gaps (3-candle gaps) that price has not filled yet. Rule-based, merges nearby levels by ATR, removes a gap as soon as price trades back through it.

A live account-level readout — equity, balance, tracked peak, and current drawdown % from that peak — the one risk number most charts never show you.

Closed-bar sweeps of confirmed swing levels, with wick, volatility and freshness filters, liquidity lines, a dashboard and optional alerts.

Draws the daily open price as a horizontal line and shows, in points, how far the current price is from today's open. The label changes color depending on whether the price is above or below the open.

Supertrend trend-following indicator based on ATR. The line changes color and side of the price when the trend changes, with optional signal arrows and alerts.

Shows the time left until the current candle closes and the current spread in a corner of the chart. The countdown updates every second, even when no new ticks arrive.

Dynamic support and resistance bands built from a moving average and the Average True Range (ATR). The bands widen when volatility rises and narrow when it falls.

Daily pivot point with three resistance levels and three support levels, using Classic, Fibonacci or Camarilla formulas.

Draw Asian, London and New York session ranges as chart boxes with high/low lines, labels and an optional London–New York overlap. Configure GMT or broker-server hours and review the latest session statistics in a panel.

Session windows are quoted in GMT; the chart runs on the broker's clock. This indicator takes each window in GMT, applies your broker's offset, and draws the box over that window's bars. It adds the high and low lines to every enabled window unless you switch them off, prints the session name and range only on that session's newest box when there is room, and never trades.

Marks previous day, Asian and London session highs and lows from chart bars and flags closed-bar, ATR-filtered liquidity sweeps. Non-repainting, with EA-readable buy/sell buffers and an on-chart display panel.

Auto-scaled round-number grid for any symbol — big figures and half levels drawn to the right spacing whether you're on EURUSD, USDJPY, XAUUSD or an index, plus a live "distance to nearest magnet" readout.

Compact zero-buffer MetaTrader 5 on-chart HUD displaying live Spread in points and pips, Daily ATR(14) range consumption percentage, broker Stops/Freeze levels, and 1R lot size.

Draws the previous day High, Low and Close as horizontal levels on the chart, with optional history for several past days, extension of today's levels to the right and price labels.

TradingView-style Long/Short position tool for MT5: drag the Entry, Stop and Target lines and get lot size, risk, reward, R:R and margin instantly.

MA Toolkit: a compact moving average indicator written from scratch. Choose SMA, EMA or LWMA for a fast and a slow line, see the fast line colored by its slope, and get optional crossover arrows, alerts and an info panel.

Horizontal lines at round figures around the displayed price, with a spacing that adjusts according to the zoom level.

MTF order blocks from the chart timeframe or a higher one, shaded on the chart and followed bar by bar: fresh until price comes back, tested after that with every return counted, broken once a close goes through. Sizes are measured in average ranges, so the defaults fit any symbol, and a new zone absorbs the ones it overlaps, so zones never stack.

Panel showing a candle countdown, spread, daily ATR and the proportion of the daily range already used.

An animated 24-hour dial of the Sydney, Tokyo, London and New York sessions with automatic daylight saving time, a countdown to the close of the current candle, and live spread and day range. The panel collapses into a bar and can be dragged on the chart.

An animated chart panel that shows the equity drawdown of the account in real time, the closed result of the day, week and month, and one line for every Expert Advisor running on the account.

Live rolling-correlation heatmap across your watchlist — spot hidden overlapping exposure before you stack three “different” trades that are secretly one trade.

Opening range breakout indicator for MT5 on Gold (XAUUSD), forex and indices: box of the first minutes of up to three sessions, breakout levels, two targets by range height, arrows and alerts on the closed candle. Open source code.

1234567891011...154