Top MQL4 and MQL5 source codes based on user ratings - 219

Submit your code

Decides if you can add to a running winner: only when all open trades in that direction are on break-even and the newest one is in profit. The open risk is never more than one add. Hedging accounts only.

Shows the time left on the current candle, the live spread and today's range next to the price or in a chart corner. Works on every timeframe.

Previous day high/low/open/close, previous week high/low and today's open, drawn as a segment for each of the last N days with price labels.

Countdown to the next important economic news from the built-in MetaTrader 5 calendar, with a vertical line and a before/after zone for every event.

Multi-timeframe trend table (M5, M15, M30, H1, H4, D1): price vs fast EMA vs slow EMA, RSI for each timeframe and an overall bias.

Risk-based lot size panel: risk (% of balance, % of equity or money) and stop loss in points give the lot. Shows money at risk, reward and margin and opens BUY / SELL with SL and TP in one click.

Daily loss limit and daily profit target for the whole account (prop firm style). When a limit is hit it closes positions, deletes pending orders and keeps the account flat until the next daily reset.

Script that closes positions in one click: all, only profitable, only losing, only buys or only sells, for this symbol or all symbols, with a magic filter and optional pending order delete.

Moves the stop loss to break-even and then trails it on trades that are already open. It never opens or closes a trade.

Starts a trailing stop when the price reaches the take-profit zone of a position you already have open. The take profit is removed, extended or kept. It never opens trades.

One include file that reads and writes JSON in MQL5 and MQL4. It refuses broken JSON and tells you the line and column of the mistake, keeps numbers exact, reads and writes UTF-8 files, and saves your EA's settings to a file and loads them back.

Previous day, week and month high and low, New York midnight open, period opens and the Asian range, with sweep marks and one alert per level. Day from broker or New York time. No repaint, buffers for EAs.

Regular and hidden divergences between price and RSI, MACD, Stochastic, CCI or Momentum. Swings confirmed on closed bars, signal on the confirmation bar, lines on oscillator and price. No repaint, buffers for EAs.

MACD regular and hidden divergences on closed bars with an honest first-touch statistics panel. Not a trading signal.

Saves your closed trades to a CSV file for your spreadsheet: one row per trade with points, costs, net result, R multiple, MAE and MFE.

Closes only the open positions that match your filters and, if you choose, deletes matching pending orders. Shows a summary and asks before it acts.

An indicator that reads the broker's weekly trade-session schedule for the chart symbol and shows whether trading is open, when the next close or open happens and a live countdown to it. It also marks bars that lie completely outside the trade sessions.

Check the first and last available bars, gaps between bars, and available MT5 tick history for a date range before a backtest.

A per-hour profile of when the day's range actually gets built, plus a live readout of whether today is running ahead of or behind its usual pace

Tracks every touch of a round "00" or "50" level and keeps a running scorecard of how often price rejects versus breaks through — then maps that history onto the levels nearest to current price.

Free MT5 research EA with three closed-bar entry models, ATR stops, fixed-R targets and a tester cost ledger. Version 2.31 uses the chart symbol and timeframe. Historical research: XAUUSD M5. Educational source; published tests were loss-making.

Include file with small functions to find the Gotobi days: the 5th, 10th, 15th, 20th, 25th and the last day of each month, moved back to the previous business day when they fall on a weekend or a holiday you list. Information only, no trading functions.

Read-only script that shows the real statistics of your trade history per symbol: win rate, net result, profit factor, average win/loss and longest losing streak.

Drag Entry, Stop Loss and Take Profit lines on the chart and instantly see the correct lot size for your risk, reward-to-risk, money at risk, potential profit and margin.

Scans the trend on M5, M15, H1, H4 and D1, shows market bias, volatility, session and previous-day levels in one clean panel, and opens trades with one click using a risk-based lot, ATR stop loss and R:R take profit.

1...212213214215216217218219