Watch how to download trading robots for free
Find us on Facebook!
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 - 8

Submit your code

This indicator calls 3 other subwindow indicators. All files go in your Indicators folder.

A dynamic trendline-based evolution of the Donchian Channel

Script for partially close active buy orders

Partially close active sell orders

The AutoTrendLines indicator automatically draws support and resistance trend lines on your MetaTrader 5 chart. It identifies key price levels using two methods: Two Extremums (Type 1) or Extremum and Delta (Type 2). The lines are recalculated only when a new bar forms, ensuring efficient performance.

The indicator implements some of the most interesting approaches to measuring correlations

"2 Moving Averages with Bollinger Bands" is a custom MT5 indicator that combines two configurable moving averages and optional Bollinger Bands. It generates real-time Buy and Sell arrows when crossovers occur, with optional alerts, sound, and email notifications. Suitable for all timeframes and symbols

This is a simple script file to compute lot size either using risk percentage approach or the actual amount to risk.

This indicator detects a specific bearish spike formation over 3 candles

The Value Area Retracement indicator, is a powerful volume profile-based tool designed to identify key trading levels—Point of Control (POC), Value Area High (VAH), Value Area Low (VAL), and Profile High/Low—across different timeframes. It helps traders spot potential retracement opportunities to the POC, breakout zones, and value areas, making it useful for intraday, swing, and position trading.

Expert Advisor for MetaTrader 5 that combines Exponential Moving Averages (EMA) and Relative Strength Index (RSI) to generate trading signals. Includes risk management features and trading time filter.

The EA identifies trade setups by waiting for a user-defined number of indicators (e.g., 2 out of 3) to show divergence simultaneously. This multi-layer confirmation approach filters out market noise. Key Features: Triple Confirmation Engine: Analyzes RSI, MACD, & Stochastic divergence. Advanced Filters: Optional Trend Filter (MA) and Volume Filter for superior signal quality. Full Customization: Control all indicator settings, divergence sensitivity, and trade logic. Professional Risk Management: Use fixed lots or percentage-based money management with SL/TP.

The Cincin EA (v2.24) is an automated trading system for MetaTrader 5 that executes conservative random trades on a specified symbol (e.g., EURUSD), with features like basket management, hedging, and position control.

A lightweight tool for manual scalping in MT5 using keyboard shortcuts

Parallel use of the MetaTrader 4 and MetaTrader 5 order systems.

The Zigzag2_R_Color indicator with the timeframe selection option available in the input parameters.

The VR Alert NT5 indicator warns the trader about the price reaching a specified level.

The Slope Direction Line indicator is displayed as a colored moving average line indicating the average market movement direction.

Holt's double exponential smoothing with linear forecasting

This version can use one of the 4 basic averages types for smoothing.

This is MQL5 version of Shved Supply and Demand written by Shved and upgraded by eevviill7 with history mode.

Static class to fix the TimeGMT() function during testing in the strategy tester.

Serialization and deserialization of JSON protocol. The code is ported from a high-speed С++ library.

Holt's double exponential smoothing - the trend component.

Adaptive Laguerre filter trend.

Detecting the start of a new bar or candle in an Expert Advisor's OnTick() event handler.

To use martingale money management when a position is in loss and price hits any of specific distances.

This is the exact conversion of pivotshigh and pivotslow functions from pine script v4 as an mql5 indicator.

This function performs the main logic of opening a trade. Calculates the opening price, take profit levels and stop loss based on symbol information and parameters provided by the user. Prepare a trade request (MqlTradeRequest) with the necessary information, such as symbol, volume, order type, deviation, comment, magic number, etc. Call the OrderSend function to send the operation request and get the result. SetTypeFillingBySymbol function: Determines the order fill type (Fill or Kill, Immediate or Cancel, or Return) based on the symbol's filling policy. GetMinTradeLevel function: Calculates the minimum operating level based on the freeze level and the symbol stops level. Adjusts the minimum level to make sure it is within certain limits and returns the result.

Indicator based on basic slope moving average and cloud around. Indicator shows two types of signals: prepearing - dot and entry - arrow.

This is a indicator displaying candlesticks patterns on a chart.

When applied to financial markets this method is usually used to determine the moments of prices extreme deviation from a "standard" level.

Class for displaying multi-line comments.

YMA

Moving average for prices (O+C+H+L)/4.

A variation on the T3 theme that was made as a sort of envelopes using T3 for basic value.

The Aroon indicator in the new visualization.

The newest version of ALMA.

The Dynamic Trend signal indicator draws a two-color trend direction line and adds signal arrows.

The library and iCanvas class simplify writing programs using Canvas.

Signal indicator iCrossAD. It shows possible reversals or price roll-backs.

123456789101112131415...191