Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Access the CodeBase from your MetaTrader 5 terminal
Couldn't find the right code? Order it in the Freelance section
How to Write an Expert Advisor or an Indicator

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

Submit your code

iRSI Very Simple A multi timeframe version is available with colors for orientation, for developers or profitable traders for free. Offer under conditions. Other multi timeframe indicators are also available.

The "Net Volume" indicator shows the volume taking into account the pressure of sellers and buyers

Linear regression line with an option to be applied to another indicators

main point is changing of MA curve to horizontal line and DPO curve shall represent to distance from close price to zero level or MA curve

This library simulates prop trading firm scenarios by resetting the account balance based on configurable profit and loss thresholds during backtesting, and logs reset results for analysis.

This code shows how you can create a dashboard to display all the relevant information on the chart

This code provides a simple function for sending push notifications to your mobile device whenever trades are opened or closed in MetaTrader 5. It's designed for netting accounts (where only one position per symbol is allowed).

The AutoCloseOnProfitLoss Expert Advisor (EA) is a powerful automation tool for MetaTrader 5, designed to close all open positions when predefined profit or loss targets are reached

This indicator detects bullish and bearish engulfing candlestick patterns with an optional volume filter to highlight stronger signals.

With these classes you can create and test your signals runtime.

Stochastic beginner tutorial to learn how to code in MQL5

A Marubozo is a long-bodied candlestick with no shadow, from the Japanese word meaning "close-cropped". Candlestick charts look at the opening and closing price on a single day and are used by technical traders.

Hidden Engulfing Candlestick Pattern

This is a script to export rates and ticks of current chart's symbol into CSV-files compatible with MT5's export/import format.

Root Mean Square

High and Low Line Indicator

Alerts on trendline break

Synchronized custom crosshair indicator showing price and (server/local) time.

This service periodically checks swaps for predefined symbols and saves detected changes into CSV-files for further analysis and potential replay (not implemented here). Also it monitors and alerts swap changes of existing positions.

Zig Zag indicator that relies only on a minimum % of retracement to each previous wave , and optionally , being bigger than a specific size measured in atr units.

Part 3 "Object Oriented Programming in MQL5" offers an immersion into the world of object-oriented programming (OOP) in the MQL5 language. Software development often involves the complexity related to the management of multiple entities, requiring advanced technology to improve programming convenience, productivity, and quality.

ATR - Average True Range - beginner tutorial to learn how to code in MQL5

This indicator uses two moving averages to calculate the market trend and changes color depending on the trend direction.

This indicator calculates the range difference between the 'MACD and Signal lines' and also the range distance between 'the last two MACD bar'.

This is an indicator to calculate 14 types of moving averages based on close price.

Historical Strong S/Rs Levels

It will detect whether there's confluence between the current chart timeframe and two other timeframes.

Population-based optimisation algorithms are collected here. The archive contains all necessary files to run the algorithms on test functions.

This is an update of the "Simple Yet Effective Breakout Strategy". In this code, I have added some helper functions for prop firm challenges.

This EA is a demonstration of how you can implement your own Hedging strategy with the help of the include file.

Bollinger Bands with controllable outer band smoothing (pre smoothing)

Engulfing Bar Occurs below Ema moving Average that is rising - Buy Trade -

An MQL5 Expert Advisor that reacts to high-impact forex news events using the MQL5 Calendar. It identifies news related to inflation (CPI/PPI) and interest rate decisions, placing breakout trades with pending orders. Ideal for traders looking to automate news-based strategies. (This is just a starting point)

This Script & EA enables coders to backtest their news based strategies which use the MQL5 Calendar.

A zigzag indicator that uses a single input to adjust the step size for detecting wave direction changes

Draw the wicks (thin lines): Draw a vertical line from the lowest price to the highest price of each candle (this is called a "wick")

MQL5-Like Trade Classes in Python for MetaTrader 5 Python

This indicator is a utility that shows labelled trade levels on any chart. If you want to replace your native trade levels on a native chart, then turn off "Show trade levels" in your F8 Chart Properties and attach this indicator. If you want to show trade levels on a Custom Chart (where native trade levels cannot be shown), then simply attach this indicator. BaseSymbol - specify the Symbol from which the trade level data will be pulled--handy for unique Custom Symbols. TextBarsBack - specify the number of bars back in history from the current bar where the level labels will be drawn. Note: Although magic number is referenced in the code, it is not presently included in the trade lines. If you're running multiple EA's on the same Symbol, you can edit the code to show magic numbers and then run multiple instances of the indicator on one chart. You can also edit the font sizes and text spacing in the object properties as needed for different display resolutions.

Combines a Moving Average with ATR-based upper and lower bands to act as a trend filter and volatility channel.

This is the exact conversion from pine script source code Supertrend by KivancOzbilgic

123456789...189