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

MQL4 Source Codes of Technical Indicators for MetaTrader 4 - 8

icon

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.

Submit your code

Previous day&week High/Low

RSI with Bollinger Bands calculated on it

Dynamic Pivot Indicator, provide all timeframes and extra timeframes

volatility, flat

this is RSI indicator that has two moving average inside the window

Simple pivot indicator

Ichimoku Kinko Hyo is an indicator that tracks the equilibrium of momentum and identify likely areas of support and resistance. The Ichimoku chart is composed of five (5) separate indicator lines. These lines work together to form the complete "Ichimoku picture".

The indicator shows BID-ASK-SPREAD information on chart

iWPR+ is an iWPR %Range function with a positive value.

This indicator places a mark (a semaphore) at the zig zag for each of 4 zig zag evaluation lengths.

An old forum indicator that's been updated

Indicator calculate the average price

The code is based on indicator ZigZag which is in-built in MT4. I have changed it so that it isn't calculated on highest Highs and lowest Lows, but instead uses highest Close and lowest Close of chart price history. See attached chart for differences: ZigZag (red) versus ZigZagClose (yellow).

The indicator is shown in a histogram the ADX uptrend and downtrend uses a different way. You can set period of indicator and bars count averages levels.

The indicator is shown in a histogram the Bands uptrend and downtrend uses a different way. You can set period of indicator and levels for trend.

The indicator is shown in a histogram the MACD uptrend and downtrend uses a different way. You can set period of indicator and levels for trend.

The indicator is shown in a histogram the Stochastic uptrend and downtrend uses a different way. You can set period of indicator and levels for trend.

The indicator is shown in a histogram the Bull and Bears uptrend and downtrend uses a different way. You can set period of indicator and levels for trend.

The indicator is shown in a histogram the ATR uptrend and downtrend uses a different way. You can set period of indicator and levels for trend.

The indicator is shown in a histogram the CCI up and downtrend uses a different way. You can set period of indicator and levels for trend.

The indicator is shown in a histogram the RSI up and downtrend uses a different way. You can set period of indicator and levels for trend.

It is an indicator of technical analysis that aims to assist every trader in his manual trades.

It is a manual trading system consisting of 5 indicators. We buy when all indicators are in blue, and we sell when all indicators are in red. Indicators auto turn chart in M5 time frame, there is a switch to skip it.

Simple utility that makes use of offline charts to facilitate training by enabling bar-by-bar display - both forward and backward, as well as reset to a pre-defined date/time.

Adaptive ATR

Used to compare 2 currencies on one chart, the Original indicator will recenter its calculation on every bar, and hence the price will keep shifting up and down and so the historical relative values do not remain constant. This indicator was modified so that the 'center' or initial relative reference point stays fixed and does not update each bar. It will only reinitialize when the indicator is reloaded or settings are changed.

Currency Index that calculates evenly on all 7 major pairs. Can also change base currency. Based on No Nonsense Forex podcast.

Arrow trends by iBearsPower and iBullsPower indicator for MT4.

Indicator Bears and Bulls Power for MT4 together in one separate window.

Volatility ratio

Three Moving Averages Convergence/Divergence - Indicator for MT4

The code consists of lines created according to the opening, closing, low and high values of prices.

Divides whole levels into Halfs and Quarters.

Trend indicator

Shows what % the current ATR is relative to it's historical value.

Improved version inspired by RSI_candles by © mladen 2018 https://www.mql5.com/en/code/20968

Trending Indicator MACD with coloured Histogram to detect trend and retracements in that trend.

Adaptive Moving Average - AMA

Variance calculated using no-loop method

Variance (Welford’s method for computing)

123456789101112131415...63