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 ContinueOn-chart position-size calculator. Drag the stop line (and optional target line) and the panel shows lots for your risk %, money at risk and reward:risk. Uses OrderCalcProfit, so it is correct for gold, indices, crypto, FX and any account currency.
Shows when volatility is compressed (Bollinger Bands inside the Keltner Channel) and which way it releases. Red dots = squeeze on, green = released, four-colour momentum histogram. Wilder ATR, closed bars, no repaint.
Donchian channel of the N bars before each bar, midline and confirmed breakout arrows that never repaint. Optional D1 EMA-slope filter shows only breakouts in the higher-timeframe trend. Alerts and push. Any symbol.
Read-only forensic script that audits historical broker Bid/Ask ticks in 15-day RAM-safe chunks: computes session spread percentiles (P50/P95), 23:00-00:15 rollover widening ratios, weekday feed blackout gaps, and exports clean millisecond CSV files.
Relative Volume (RVOL) in a subwindow: the volume of every bar divided by its normal volume, drawn as a color-coded histogram with reference levels and a live text label.
Builds a volume profile for every day and draws its Point of Control (POC) and the Value Area boundaries (VAH and VAL) as horizontal lines on the chart. The levels of the current day are updated as the day develops.
Detects horizontal symmetrical triangles with objective, non-repainting rules (pivot zigzag, 3+2 touches, symmetry, no wicks or bodies breaking the lines) and draws them to the apex with breakout arrows and an optional Gann box.
Part 2 of the indicator regression-testing series. Measures how many bars of history a recursive indicator (EMA, Wilder smoothing, or a cascade of up to three stages) needs before the error left by its starting value falls below a tolerance and recommends a safe warm-up length.
Script that calculates the lot size for a given risk percent and stop loss. Places no orders.
Draws Asia, London and New York session boxes with high/low range and an optional Asia breakout alert.
Shows on the chart how much of today's prop-firm daily loss limit is used. Counts closed P/L (with commission and swap) and floating P/L since the daily reset, and shows the loss so far, the money left and the equity floor. The base can be balance, equity, or the higher of the two at the reset. Colour warnings at 50% and 80%, with alerts. Display only: never trades.
Converts broker server time to UTC and New York time with US and EU daylight saving rules. Works the same live and in the Strategy Tester, where TimeGMT() returns server time.
Blocks new trades on US CPI and FOMC days (New York date). Built-in calendar 2015-2027, works in the Strategy Tester. Never opens trades.
Closes the newer side when a buy and a sell are open on the same symbol (manual trades or any EA). For prop firm accounts that forbid hedging. Never opens trades.
Breakout status and measured targets for 13 chart patterns: channels, wedges and triangles found on zigzag swings, each shaded by what price did after its last swing (forming, broke up, broke down, target hit, failed) and rated with a quality score. Larger patterns stay around the smaller ones inside them, and same-size patterns never pile up.
Night session range breakout for XAUUSD: one decision per day, a hash-chained journal written before every order, and safe recovery after restarts.
Lightweight real-time HUD for MetaTrader 5 that monitors live spread (points and pips), session Min/Avg/Max spread, and tick arrival velocity (ticks/sec and ticks/min) with automatic market regime classification.
Execution-safe utility script to close open positions in one click with configurable slippage deviation, spread guard protection, symbol/P&L/Magic filters, and automatic retry handling.
Estimates 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.