This is the largest free source code library for MetaTrader 5 platform programs. Here you can find ready-made Expert Advisors, technical indicators, scripts and libraries. Use the code library when learning MQL5 language and develop your own automated trading applications based on the provided codes.
You can freely download and test published codes, as well as launch them in MetaTrader 5. The library is also available directly from MetaTrader 5 platform and MetaEditor development environment.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Enable two-factor authentication ContinueEstimates buy/sell pressure by splitting the tick volume of every bar into a buy part and a sell part. The difference (delta) is shown as a four-color histogram with an optional EMA line.
Session-anchored VWAP with volume-weighted standard deviation bands. It restarts at every daily, weekly or monthly session open and shows how far price has stretched from the average price paid during the session.
Anchored VWAP with a draggable anchor line: drag the vertical line to any bar and the volume-weighted average price and its deviation bands are rebuilt from that bar onward.
An indicator that draws the opening range of each trading day as a box, extends its high and low through the session, and marks the first breakout with a buy or sell arrow.
Mouteki-DeMark trendline indicator enhanced with FDI and Hurst Exponent analysis, breakout targets, a market dashboard, and signal, invalidation and early-close alerts.
Historical spread statistics by hour for many symbols at once (median, 75th percentile, mean), exported to CSV. Does not trade.
Drop the script on the chart at your stop loss price and it opens a market order with the lot size calculated from your risk percentage and take profit placed at your reward:risk ratio.
Draws a dotted vertical line at the release time of each economic calendar event of the selected currencies, coloured by impact, from the built-in MetaTrader 5 calendar.
Compares a fast and a slow EMA on M5, M15, M30, H1, H4 and D1 and shows UP, DOWN or FLAT for each timeframe in one panel on the chart.
Panel that shows the ATR of the last closed bar, a stop-loss distance derived from it, the money at risk for a chosen percentage of the balance and the lot size that matches that risk.
Shows balance, equity, margin, margin level, floating P/L, today's closed P/L and the drawdown from the equity peak in a small panel on the chart.
A script that closes open positions in one click, with filters for chart symbol, magic number, buy/sell direction and profit/loss state. Works on netting and hedging accounts.
Draws the previous day's high and low over each day and marks the first touch of each level, with an optional alert.
Static safety scan of EA/indicator source: DLL imports, programs started, account data sent online, hidden text, martingale, SL = 0.
JONY ISLAM EMA Cluster Signals is a technical indicator that plots a 4-EMA cluster cloud to identify trend direction. It generates Buy/Sell arrow signals and automatically calculates Entry, Stop Loss, and TP1-TP3 levels using ATR. It also features a built-in Multi-Timeframe (M1-W1) trend panel.
Plots a Donchian channel and a long-period SMA and marks only those closed-bar channel breakouts that are on the same side of the SMA.
Plots a long-period SMA and marks bars where the RSI has pulled back to a set level while the price is still above the rising SMA.
Shows Bollinger bands and a Keltner channel on the chart, marks bars where the bands are inside the channel and draws an arrow when that squeeze ends.
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.
Trade manager for manual trades and other EAs: moves the stop to break-even at a chosen R multiple, closes part of the position at a second target, then trails the stop in steps. Survives terminal restarts.
Account-wide protection for prop firm and funded accounts: enforces a daily loss limit and a maximum overall loss (FTMO-style), closes all positions and blocks new trades when a limit is hit, with an optional profit target.
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.
Classic 50/200-day Golden Cross trend filter: long while the fast SMA of daily closes is above the slow SMA, flat (or optionally short) otherwise. One decision per completed D1 bar, sizing by % of balance or fixed lot.
A live account-level readout — equity, balance, tracked peak, and current drawdown % from that peak — the one risk number most charts never show you.