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

MQL5 Source Codes of Technical Indicators for MetaTrader 5

icon

MQL5 technical indicators analyze MetaTrader 5 price charts on Forex, as well as stock and commodity markets. Indicators define trend direction and power, overbought and oversold states, support and resistance levels. Underlying mathematical models provide objective assessment of the current market state allowing traders to accept or reject trading system's signals.

You can download and launch offered indicators in MetaTrader 5. The library of indicators is also available directly from MetaTrader 5 platform and MetaEditor development environment.

Submit your code

The indicator plots two lines. The lower line is calculated based on the latest SMA period that caused a bounce up. The upper line is calculated based on the latest SMA period that caused a bounce down.

An indicator which visualizes how volume changes over time within each bar. It shows tick volume in a rolling histogram format.

Trade Assistant MetaTrader 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.

Calculate a moving average in one function call. Code that can easily be transported between different projects.

Total Power Indicator (MetaTrader indicator) — is based on the two standard indicators — Bear Power and Bull Power. The indicator calculates how many bullish and bearish bars were there during a given look-back period and then calculates the proportional index for bears, bulls, and total (calculated as the absolute difference between bulls and bears) for the current bar. This way, we get continuous lines of the relative average bear and bull power over a period, removing the main disadvantage of the original Bear/Bull Power indicators — the lack of a long-term perspective. The original MetaTrader 4 version of Total Power Indicator was created by Daniel Fernandez of Asirikuy.com in 2011. The version for MT5 is now also available.

TD Sequential Ultimate MetaTrader indicator shows all parts of the TD Sequential method developed by the legendary technical analyst, Tom DeMark. TD Sequential Ultimate displays Buy and Sell Setups, including the Setup Perfection arrows, Buy and Sell Countdowns, including the failed count 13 attempts, and TDST Support and Resistance levels. Unlike many other implementations of the TD Sequential method, this indicator offers multiple improvements:

Coppock MetaTrader indicator — is an implementation of the famous Coppock curve indicator first created by Edward Coppock in 1962. The indicator shows long-term buy and sell opportunities (classically, it is used for only buying) by measuring the weighted moving average (with a period of 10) of the sum of two rates of change (with a period of 14 and 11). It is the classical version. In this MetaTrader version, you can modify the parameters of the basic indicators. You can use this Coppock indicator in MT4 and MT5.

Support and Resistance MetaTrader indicator — as the name of this indicator suggests, it displays the support and resistance levels. It shows them directly on the chart, providing an easy help when you want to set stop-loss or take-profit level, or when you want to see the next market target. This indicator uses the standard MetaTrader Fractals indicator (by Bill Williams' method) and has no changeable input parameters. This indicator is available for MetaTrader version 4 and 5.

Spread MetaTrader indicator — displays current spread in the main window of the chart. You can modify the font parameters, indicator's position and the normalization of the spread value. The spread is redrawn after each tick, ensuring the most current and active spread value. This can be useful for brokers with variable spreads or with spreads that are widened often. You can also enable a spread label to be shown near the current Bid line. The indicator is available for both MT4 and MT5.

Schaff Trend Cycle (MetaTrader indicator) — is a cyclical oscillator created by calculating the stochastic over stochastic over a MACD line using cycles. The result is the improved version of the oscillator that is not choppy during the trends and reacts to the changes very fast. It was developed by Doug Schaff, who assumed that the currency trends accelerate and decelerate in cycles. Its algorithm was made public in 2008. Schaff Trend Cycle tries to combine two different methods of determining the trend direction changes — MACD and smoothed stochastic oscillator. The value of the indicator fluctuates between 0 and 100. Two trigger levels are used — 25 and 75. Optional alerts are available. You can download this indicator for MT4, MT5

RSIOMA MetaTrader indicator — this indicator takes two moving averages, calculates their RSI (Relative Strength Index) and then also adds a moving average of the calculated RSI. These two lines now can accurately signal the trend changes. They are shown in the separate window where they change from 0 to 100. The auxiliary histogram is shown for a quick-glance view of the current trend. The indicator is available for both MT4 and MT5 versions of the MetaTrader platform.

Round Levels MetaTrader indicator — an MT4/MT5 indicator that can display round levels and zones near them based on your configuration. It can be useful to trade off the natural psychological support and resistance zones. It can also issue alerts when the price is in either support or resistance zone.

Recent High/Low Alert MetaTrader indicator — displays two bands of maximum and minimum levels across recent N candles. By default, the maximum band is displayed with a blue line; the minimum band is displayed with a yellow line. Additionally, it can invoke a popup alert, send an email alert, or issue a notification alert when the current price (Bid) breaks recent High or Low level. All alerts can be turned off. If you use the email alert feature, do not forget to set the email settings in your MetaTrader platform's options window. Same with push-notifications. The indicator is available for both MT4 and MT5.

Range Expansion Index (MetaTrader indicator) — is a relative oscillator indicator that measures the pace of the price changes and signals overbought/oversold states if the price demonstrates weakness or strength. It was developed by Tom DeMark and explained in his book The New Science of Technical Analysis. The value of the indicator changes from -100 to +100. The REI is an enhanced oscillator because it tries to remain calm during the range trading and indicates signals only when the significant peaks or bottoms are spotted. You can download this indicator both for MT4 and MT5.

Rainbow Multiple Moving Average (RMMA) MetaTrader indicator — is a very simple but visually informative indicator based on the standard moving average. It draws 66 rainbow-colored moving average lines of your preferred type and price directly in the main window of the chart. This indicator is available for both MT4 and MT5 versions of the trading platform.

QQE MetaTrader indicator — or Quantitative Qualitative Estimation, is based on a rather complex calculation of the smoothed RSI indicators. As a result, you get two lines in a separate indicator window — the fast one and the slow one. There is also an important indicator level (50), which is used in signals. You can enable text, sound, and e-mail alerts for this indicator. This QQE implementation supports multi-timeframe analysis with upper timeframe display. The indicator is available for MT4, MT5

Price Alert MetaTrader indicator — can issue any type of alert when the price reaches certain levels set by a trader. There are three types of price levels: the first one is used when the price rises above certain level (displayed with the green line on the chart), the second one is used when the price falls below certain level (displayed with the red line on the chart), and the third one is used when the price reaches the certain level exactly (displayed with the yellow line). Three alert types include: native (popup), email, and push-notification. For email and push-notification alert features to work, you need to set up the email or MetaQuotes ID settings in your MetaTrader platform options window. The indicator is available for both MT4 and MT5.

Point-and-Figure MetaTrader 5 indicator is an indicator that can plot a point-and-figure chart directly in the main window of your normal MT5 chart. You can set up all the point-and-figure method parameters, such as the box size and the reversal distance, according to your preference. In addition, you can control all the display parameters of the PnF chart. This point-and-figure indicator supports all sorts of alerts. It is based on real ticks data, and thus is available only for MT5.

Pinbar Detector is a MetaTrader indicator that tries to detect Pinbars (also known as "Pin-bar" or "Pin bar") and marks them by placing a "smiling face" symbol below the bullish Pinbars and above the bearish Pinbars. It is a pure price action indicator, which is not using any standard technical indicators in its code. The configuration of Pinbar detection can be done via the indicator's input parameters. Pinbar Detector can issue platform alerts and email alerts on detection. The indicator is available both for MT4 and MT5 versions of the trading platform.

Pinbar Detector is a MetaTrader indicator that tries to detect Pinbars (also known as "Pin-bar" or "Pin bar") and marks them by placing a "smiling face" symbol below the bullish Pinbars and above the bearish Pinbars. It is a pure price action indicator, which is not using any standard technical indicators in its code. The configuration of Pinbar detection can be done via the indicator's input parameters. Pinbar Detector can issue platform alerts and email alerts on detection. The indicator is available both for MT4 and MT5 versions of the trading platform.

Keltner Channel (MetaTrader indicator) — is a classical technical analysis indicator developed by Chester W. Keltner in 1960. The indicator is somewhat similar to the Bollinger Bands and Envelopes. It uses three plot lines: the middle line is the 10-day simple moving average applied to the typical price ((high + low + close) / 3), the upper and the lower bands are produced by adding and subtracting the moving average of the daily price range (High and Low difference) from the middle line. This way, a volatility-based channel is built. In this version of the indicator you can modify all the parameters of the MA. The indicator is available both for MT4 and MT5 versions of the platform.

Gain/Loss Info MetaTrader indicator — displays the gains and losses for all candles where the given threshold is surpassed. The values are calculated in points and percentage. The indicator can calculate gain/loss in two modes: plain candlestick Close and Open difference, and as difference between current Close and previous Close. You can set minimum change limits (for pips and percentage), change modes, and you can also control font color of the output numbers. The indicator is available for both MT4 and MT5.

Murrey Math Line X MetaTrader indicator — a pivot line indicator that will definitely help every trader who knows how to trade with support, resistance, and pivot lines. It displays 8 primary lines (with 5 more additional ones) on the main chart, helping you to find the best points to sell, buy, and exit your positions. The indicator can issue alerts when a candle closes after breaking any of the pivot lines. You can download this indicator for MT4 and MT5 platform.

Moving Average Candlesticks MetaTrader indicator — is a chart visualization of a standard moving average using the candlestick bars. It draws the candlesticks based on the moving average values calculated for Close, Open, Low, and High. It allows seeing a compact snapshot of the more detailed market information compared with the classic MA indicator. It works with any currency pair, timeframe, and MA mode. The indicator is available for MT4 and MT5.

Market Profile MetaTrader indicator — is a classic Market Profile implementation that can show the price density over time, outlining the most important price levels, value area, and control value of a given trading session. This indicator can be attached to timeframes between M1 and D1 and will show the Market Profile for daily, weekly, monthly, or even intraday sessions. Lower timeframes offer higher precision. Higher timeframes are recommended for better visibility. It is also possible to use a free-draw rectangle session to create a custom market profile on any timeframe. Six different color schemes are available to draw the profile's blocks. Drawing profiles as a plain color histogram is also possible. Alternatively, you may choose to color the profile based on bullish/bearish bars. This indicator is based on bare price action and does not use any standard indicators. It is available for MetaTrader 4, MetaTrader 5

Laguerre MetaTrader indicator — a completely custom indicator that doesn't rely on the standard MT4/MT5 indicators. It shows the weighted trendline in the separate window of the chart. It can be used for simple entry and exit signals. The indicator is available for both MT4 and MT5.

Keltner Channel (MetaTrader indicator) — is a classical technical analysis indicator developed by Chester W. Keltner in 1960. The indicator is somewhat similar to the Bollinger Bands and Envelopes. It uses three plot lines: the middle line is the 10-day simple moving average applied to the typical price ((high + low + close) / 3), the upper and the lower bands are produced by adding and subtracting the moving average of the daily price range (High and Low difference) from the middle line. This way, a volatility-based channel is built. In this version of the indicator you can modify all the parameters of the MA. The indicator is available both for MT4 and MT5 versions of the platform.

Float MetaTrader indicator — a sophisticated indicator that analyzes the previous chart history for the given currency pair and then tries to analyze the trends in the current situation. It shows where trends start and end in a separate chart window and Fibonacci retracement levels combined with DiNapoli levels on the main chart. It also displays how long ago the local high and low were detected. This indicator is available for MT4 and MT5.

Gain/Loss Info MetaTrader indicator — displays the gains and losses for all candles where the given threshold is surpassed. The values are calculated in points and percentage. The indicator can calculate gain/loss in two modes: plain candlestick Close and Open difference, and as difference between current Close and previous Close. You can set minimum change limits (for pips and percentage), change modes, and you can also control font color of the output numbers. The indicator is available for both MT4 and MT5

Fisher MetaTrader indicator — is quite a simple histogram indicator that detects the trend's direction and strength and signals about trend changes. It doesn't use any standard MT4/MT5 indicators in its code. Fisher bases its calculations on the maximum and minimum price levels from the previous periods, applying some advanced math calculations to the relations between the current price and the max/min prices. The indicator is available for both MT4 and MT5. This is a "repainting" indicator — it recalculates previous bars when a new bar arrives.

Flexible Momentum (MetaTrader indicator) — calculates the change of a currency rate during a given period (in seconds) and displays the result as a number of points and percentage in the main chart window of the platform. It offers highly customizable alerts based on thresholds for maximum momentum in points and percentage. Because this indicator uses ticks history to calculate momentum, it works only in MT5.

Easy Trend Visualizer is a MetaTrader indicator that does exactly what its name says. It shows where the trend begins, where it ends, and where there is no trend at all. It is based on standard MetaTrader ADX (Average Direction Movement Index) indicators and works quite fast. Easy Trend Visualizer displays itself in the main chart window. It offers a range of alerts: horizontal line appears, horizontal line cross, arrow up, arrow down, previous horizontal line cross (PHLC). Available for MT4 and MT5 platforms

Dots (MetaTrader indicator) is based on the 2006 indicator by TrendLaboratory. It displays the current trend direction by placing the dots on the main chart. The blue dots signal bullish trend and the red dots signal bearish trend. Although the indicator doesn't rely on any standard MetaTrader indicators, it uses a call to iMA() (moving average) to get the price values depending on the input price type used (Close, Open, High, Low, Typical, etc.) The calculation is based on the cosine of the angle of price change. Trader can modify several input parameters. The indicator is available both for MT4 and MT5 versions of the platform.

Donchian Ultimate MetaTrader indicator — is a classic Donchian channel indicator with multiple features added:

Daily Percentage Change (MetaTrader indicator) — calculates the change of currency rate related to the previous daily close and displays it in percentage points in the main chart window of the platform. Additionally, it can display the weekly and monthly percentage changes. Different colors can be set for positive or negative price increases. Also, a small customizable arrow helps to visualize the price change direction. If your broker uses an unconventional time zone, the indicator can use Time Shift parameter to adjust the hour it will use for the day's end. The indicator works equally well in MT4 and MT5.

Detrended Price Oscillator (MetaTrader indicator) — a version of the price oscillator based on the difference between the current price and the simple moving average shifted by (Period / 2) + 1 bars. Unlike the stochastic oscillator, this indicator aims to show the short-term trend changes (price waves inside the long-term trend). The indicator is displayed in the separate window of the chart. You can use this Detrended Price Oscillator (DPO) indicator in both MT4 and MT5 versions of the platform.

CCI Arrows MetaTrader indicator — will show you where the CCI cross with the zero occur (marking it with the red or blue arrow) to help you decide whether to go short or long. It has a minimal lag and a relatively high accuracy. This simple indicator is a good choice for those traders that prefer to keep it simple and hate complex indicators. CCI Arrows supports all types of alerts. The indicator is available in MT4 and MT5 versions.

Candle Wicks Length Display MetaTrader indicator is an indicator that can display the length of candle wicks in pips directly on your chart. You can set the minimum length to be displayed. Alternatively, it can show wick lengths that are less than the given limit. The indicator supports all sorts of alerts and works with both MT4 and MT5.

Bollinger Squeeze Basic MetaTrader indicator — is a complex indicator based on Momentum, Bollinger bands, and Keltner channel. The indicator is drawn in the separate window of the chart as a Momentum histogram and a range of dots when show the relationship between the current Bollinger bands and Keltner channel values. This indicator is available for both MT4 and MT5 versions of the trading platform.

Bollinger Squeeze Advanced MetaTrader indicator — is a complex indicator consisting of two components: A measure of trendedness based on the Bollinger bands and Keltner channel "squeeze". A trend direction and strength histogram based on one of the following eight oscillators: Stochastic, CCI, RSI, MACD, Momentum, Williams % Range, ADX, DeMarker.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135