Download MetaTrader 5

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 Source Codes of Technical Indicators for MetaTrader 4 - 20

The library of technical indicators for MetaTrader 4 developed in MQL4. Regardless of the market (forex, securities or commodity market), indicators help to represent quotes in an accessible form for easy perception.

This section contains thousands of applications that analyze financial markets using different algorithms. Conventionally, they can be divided into a few categories: trend indicators, oscillators, volume indicators and so on. In addition, there are sets of indicators based on algorithms by famous financiers. For example, Bill Williams' indicators and likes of it. All of them are characterized by different parameters of reliability, efficiency, lagging and others. There are more than 2000 indicators for technical analysis: trend indicators, reversal indicators, indicators of levels, predictors, scalping indicators and many others.


Displays open position: Profit or Loss + Lots Long or Short + Pips or Points

The new idea of the classical Bears Bulls Indicator.

This is classic implementation of the Turtle Trading system, with clear entry/exits signals within the same trend and enter/exit alerts. It should be used together with my other indicator, The Turtle Trading Channel to get further entry signals if you h

A trend following indicator that implements Dennis Gartman and Bill Eckhart trading system. Commonly known as "The Turtle Trader".

Draws a Vertical Line at Session Open - Eurozone/London - USA - Asia.

Another suggested way to track Heiken Ashi candles and trading short-term price swings

Indicator based on MACFibo trading strategy

3 TF Zigag Level with same settings.

Choosing between Heiken Ashi bars and candlesticks is a problem and measuring when the short term trend is losing strengh is another one. This indicator solves both.

Multi Time Frame Standard Deviation

Draws an ATR envelope surrounding price action and assists you in setting proper stoploss and takeprofit levels.

An improved version of the standard Moving Average indicator, now on the hourly timeframe, you can see moving averages of higher timeframes.

The indicator shows spread-related values (spread, Bid + spread, Ask + spread, Ask + Bid + spread).

This indicator points possible price reversals using 5bar and 7bar fractals.

Hamyar indicator, the complete package (pivots,zones,panel,tp's...)

Very fast zigzag. No suspended peaks. No wrong peaks. Designed for use in EA. Optimized peaks retrieval

Three main pivot points : Daily - Weekly - Monthly.

Do you want to know how the Spread on your Broker fluctuates? I developed 2 small indicators which will allow you to see hot the spread is performing real time and for the last few minutes or whichever you can thing your platform can hold.

Account Balance, Equity, Margin, Free Margin + Account Profit: position anywhere on chart - hide any item - enhanced user preference options.

TheGreedyPig Average Daily Range Indicator calculates 5, 10, 20 days and shows them on the chart. I found this on a Forum, updated, modified the Indicator I found.

This indicator shows signals triggered using Fractals and the original ZigZag indicator. Signals are never -ever- repainted and is an useful tool to study the real behavior of the ZigZag indicator.

This indicator shows signals from two different Zigzags without repainting, and allows you to study the real behaviour of the zigzag indicator as a trading tool over time.

The support and resistance levels are determined. It provides the values for TP and SL.

The ideas from the article 3 Methods of Indicators Acceleration by the Example of the Linear Regression" is implemented in this indicator.

Trade with right risk !

This multi-timeframe capable moving average discounts prices far from the average. It is smoother than SMA but follows price similar to an EMA of the same length.

This indicator throws visual and verbose buy/sell signals according to Bill Williams Trading in the Zone methodology and Alligator.

This indicator is based on the article: Getting Clear With Short-Term Swings by Ron Black

This code simply display ask-bid value.

Simple Daily pivot.

Center of Gravity Indicator plotted on MACD values in sub window.

Butterworth filtration.

SuperSmooth filter

MACD using gaussian filtration

Calculates pip difference between Current price and SL & TP price. Places Text labels at SL & TP lines: Order Type, Ticket number, SL & TP price, Pip calculation and Pip label.

Updates: 1. Order Type Discrimination 2. SL+TP and OE line price. 3. Enhanced user defined labels. Calculates pip distance between Order Execution price and SL & TP price

StDev Bands with gaussian smoothing

Rainbow through gaussian refirtration

This indicator is calculating numbers of ticks and average time between ticks for each minute in the current hour.

Notarius - trend indicator with alerts on the basis of price averaging.