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

MQL4 and MQL5 Source Code Library


You don't know where to start learning the MQL5 or MQL4 programming language? Various programs for your MetaTrader terminal are available here. Download and study published code examples, develop your own indicators and Expert Advisors. Publish your applications in the largest library of MQL5 and MQL4 codes, and they will be available in every MetaTrader terminal and MetaEditor.

Your code examples in MQL4 and MQL5 will be distributed worldwide, and thousands of traders will know about you!

Submit your code

cycle timeframes using hotkeys 'N','M' prev,next timeframe

This EA is designed to trade all the boom and crash indices from on mt5. It is a scalper; it trades on the 1 minute time frame. It uses a moving average to determine the trend, and the awesome oscillator to identify entry points. Every order is set with stop loss and take profit levels. It features smart automatic lot size adjustment. INSTRUMENTS Boom 500 Index Boom 1000 Index Crash 500 Index Crash 1000 index all available on Note: it is highly recommended to trade all four indices when using this expert to significantly improve risk management, safety, and profitability. TIMEFRAME m1 only; DO NOT trade on other timeframes. SETTINGS Use moving average trend filter - the EA should use a moving average to filter trends. Default = false Minimum valid spike size - the smallest change in asset price for valid spikes. Default = 1 Order Comment base string - part of the text in the order comment; to help you monitor positions. Default = Trendy Boom and Crash Trader...

Elegant oscillator

Slow Line of the original Didi Index

Volatility/volume indicator based on price deviations anomaly.

On chart stochastic (like)

Sma (Simple Moving Average) with NET (Noise Elimination Technology)

ZigZag NK Sound Alerts notifies you with Sound alert, Push Notification or Popup Notification on terminal when Zigzag changes its bar.

cycles though market watch symbols, using hotkeys Comma and Period for prev/next symbol in market watch list

hotkeys 1-9 numbers on keyboard but not on number-pad to change timeframes 1=m1 2=m5 3=m15 4=m30 5=h1 6=h4 7=d1 8=w1 9=mn

Rsi with Hann windowing

ZigZag Color Indicator for Line Charts which works on Close prices rather than High low This indicator has only one input parameter which is ExtDepth and its optimized for performance

Momentum deviation bands

Momentum deviation

Select Timeframe to draw Bobokus Fibonacci and add any custom fibonacci levels you want

Draws an equidistant channel to detect rectangular consolidation pattern on chart

The indicator calculates the average price for the specified period.

iExposure will show the opening of trading positions in tabular form in the sub-window below the main window. This allows the trader to see at a glance the positions in the market including the profit value and the amount of risk for each position. The iExposure indicator is a technical tool that is easy to use and very helpful, especially if a trader opens several trades at once with several different instruments. Traders can add the iExposure indicator to any price chart if they wish to use it. By adding the iExposure indicator, traders can also still see tabs of other trading positions for other currencies. Also note that iExposure can also monitor all trading positions, besides being able to make details by displaying one position for one window.

Displays the current timeframe and symbol name in large font on the chart background. Useful when hopping between several charts with different symbols at the same time.

The script is best use to clean up all drawings ( Delete All Object, Comment, horizontal line, vertical line, arrows etc) on current chart. Please feel free to modify based on your needs.

Dynamic pivots - any time frame

Limit channels - with states

The Hurst Coefficient Indicator was created John Ehlers in “Cycle Analytics For Traders”, pg.67-68.

ATR based limit channels

Short description.

Hann filter

Fir filters


Directional Movement using Hann windowing

CCI (mimic)

MT5 Indicator for Position Size Calculation

Rex indicator extended version

MyRsi with Noise Elimination Technology - by John Ehlers

MyRsi - by John Ehlers

The Hilbert Oscillator Indicator was created John Ehlers in "Rocket Science For Traders", pg.90-91

Moving Average Bands Width

Moving average bands - extended version

Moving Average Bands

Nadaraya-Watson estimator

This indicator provides handles for 2 properties, MA Speed (scaled) & Price-to-MA Distance (%)

Open Pending order After Position Get StopLoss