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

In Part 6 of the "MQL5 Programming for Traders", we will study a key component of the MQL5 language – trading automation. We will start with a description of the fundamental entities, such as financial instrument specifications and trading account settings. These are prerequisites for creating properly operating Expert Advisors.

Class to access to the local time for the specified location, as well as time zone information and the local trading session hours.

The book "Neural networks in algorithmic trading with MQL5" is a comprehensive guide, covering both the theoretical foundations of artificial intelligence and neural networks and practical aspects of their application in financial trading using the MQL5 programming language.

Alligator beginner tutorial to learn how to code in MQL5

This function allows you to retrieve and return the filling policy of a symbol in MetaTrader 5. This is useful for making trading decisions based on the filling policy of a specific financial instrument.

The default CCI in MT5 doesn't have the shift parameter. This script implements the shift.

This is an indicator with a rainbow-like display, both for trend or pullback prediction.

Multi_BreakEven is a script file that enables setting multiple entry positions to breakeven, either through pips or a target price, once the trade becomes favorable.

This Expert Advisor does not trade. A simple panel, implemented using the standard Canvas library, allows you to draw digits with the mouse. The trained mnist.onnx model is used to recognize the digits.

This is a simple program to compare asynchronous and synchronous all close. It is a sample program, so feel free to modify it for your own testing purposes, such as adding conditions.

The MT5 custom indicator, named "wd.Multi_LineMA.mq5," is designed to offer traders valuable insights into Moving Average values from a higher timeframe (MTF Multi TimeFrame). It encompasses additional visual features for in-depth analysis, such as the ability to view trails for a specified number of bars and a dynamic MA horizontal price line.

Here are some examples of codes for set counters based on "Count"

It will delete all objects on the chart when the compiled executable is dragged onto the chart

Capture widescreen screenshots by pressing the 's' hotkey on the keyboard

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

How to use Metaquotes native smoothing functions in MovingAverages.mqh SimpleMAOnBuffer(), ExponentialMAOnBuffer(), SmoothedMAOnBuffer(), and 2 LinearWeightedMAOnBuffer()

A demonstration on how to modify objects in an indicator without having the source code

RMA Relative Moving Average is a variant of EMA

Monitoring of memory leaks in the strategy tester

This is an edit of the Mod_ATR_Trailing_Stop by MQL5 user @Scriptor found here https://www.mql5.com/en/code/20423 . MT5 indicator .mql5 and .ex5 files, report any bugs, I'll fix.

Horizontal Grid Controller with KeyEvents

This Script collects all MQL5 built-in indicators buffers and stores them in a CSV file for analysis purposes

While manually adjusting the stop-loss of a single trade to match its open price is a relatively simple task, managing numerous positions individually can be cumbersome and time-intensive. The Titik Impas Breakeven script for MT4/MT5 streamlines this process, providing efficiency and convenience for traders dealing with multiple positions.

Bollinger Bands with controllable outer band smoothing (post smoothing)

Super pass-band filter as described by John Ehlers

Trend Dashboard Indicator MetaTrader 5 indicator — a multi-timeframe indicator that is based on three standard indicators: Stochastic oscillator, RSI (Relative Strength Index), and CCI (Commodity Channel Index). It displays current trend directions for M1, M5, M15, M30, H1, H4, D1, W1, and MN1 timeframes. When you follow such an indicator you have a clear picture of the trends across all important timeframes. It doesn't matter which timeframe you attach this indicator to. The indicator can be downloaded for MT4 and MT5.

Let follow previous EA by this link https://www.mql5.com/en/code/46630

Checks if either upper or lower Wick range of a candlestick is greater than Body range of a candlestick and plot a wingding

Select the last closed deal (trade) to further work.

Standard Bollinger Bands indicator with averaging features added

This is a first for MetaTrader 5. Now you can click on the chart to create price alerts.

Basic library to create Volume Profiles on chart.

This is a lesson on how to: 1. calculate the lot size in each order corresponding to the percentage of balance loss. 2. Trailling and count position buy and sell. The condition buy or sell base on Price action and moving average filter

Trailing stop tutorial using ATR indicator

Linear Regression Line

This code does not trace the iatr() because the iatr() or this code is a more modern version. This code uses original smoothing, a kind of SMA and not wilder smoothing. The analysis of the two smoothings can suggest opportunities elsewhere

This script saves all the OHLCV data available on the chart to a CSV file.

Set TakeProfit by just dragging and dropping script on the desired price level.

Keltner Channel for traders or young developers by William210

Syncs all chart symbols to symbol of the chart the EA is attached to

123456789...184