Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Views:
4231
Rating:
(15)
Published:
2015.11.02 16:15
Updated:
2023.03.29 13:45
\MQL5\Include\
tema_custom.mq5 (8.74 KB) view
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The Triple Exponential Moving Average (TEMA) technical indicator with advanced features of setting input parameters. The Triple Exponential Moving Average (TEMA) technical indicator was developed by Patrick Malloy He published it in the Technical Analysis of Stocks & Commodities journal.

This indicator can be used instead of the usual moving averages. Triple Exponential Moving Average (TEMA) is a combination of one exponential moving average, a double exponential moving average and a triple exponential moving average, which provides less delay than any of these three averages individually.

Indicator input parameters:

input Smooth_Method MA_Method1=MODE_EMA_; // Method of averaging of the first smoothing
input int Length1=12; // Depth of the first smoothing
input int Phase1=15;  // Parameter of the first smoothing
//---- for JJMA within the range of -100 ... +100 it influences the quality of the transition process;
//---- for VIDIA it is a CMO period, for AMA it is a slow average period
input Smooth_Method MA_Method2=MODE_EMA; // Method of averaging of the second smoothing
input int Length2 = 5; // Depth of the second smoothing
input int Phase2=15;   // Parameter of the second smoothing
//---- for JJMA within the range of -100 ... +100 it influences the quality of the transition process;
//---- for VIDIA it is a CMO period, for AMA it is a slow average period
input Smooth_Method MA_Method3=MODE_EMA; // Method of averaging of the third smoothing
input int Length3 = 5; // Depth of the third smoothing
input int Phase3=15;   // Parameter of the third smoothing
//---- for JJMA within the range of -100 ... +100 it influences the quality of the transition process;
//---- for VIDIA it is a CMO period, for AMA it is a slow average period
input Applied_price_ IPC=PRICE_MEDIAN; // Price constant used for the indicator calculation
input int Shift=0; // Horizontal indicator shift in bars
input int PriceShift=0; // Vertical indicator shift in points

It should be noted that Phase1, Phase2 and Phase3 parameters have completely different meaning for different smoothing algorithms. For JMA it is an external Phase variable changing from -100 to +100. For T3 it is a smoothing ratio multiplied by 100 for better visualization, for VIDYA it is a CMO oscillator period and for AMA it is a slow EMA period. In other algorithms these parameters do not affect the averaging. For AMA the fast EMA period is a fixed value and is equal to 2 by default. The ratio of raising to the power is also equal to 2 for AMA.

The indicator uses SmoothAlgorithms.mqh library classes (copy it to <terminal_data_folder>\MQL5\Include). The use of the classes was thoroughly described in the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".

Originally this indicator has been written in MQL4 and was first published in the Code Base on 19.06.2015.

Fig.1. The TEMA_CUSTOM indicator

Fig.1. The TEMA_CUSTOM indicator

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/13926

Kolier_SuperTrend_HTF Kolier_SuperTrend_HTF

The Kolier_SuperTrend with the timeframe selection option available in the input parameters.

iBBFill_HTF iBBFill_HTF

The iBBFill indicator with the timeframe selection option available in the input parameters.

XDerivative_StDev XDerivative_StDev

The extra smoothed Derivative indicator with additional trend strength indication using colored dots based on the standard deviation algorithm.

Exp_KPrmSt Exp_KPrmSt

The Exp_KPrmSt Expert Advisor with the entry at the intersection of the signal and the oscillator lines of the KPrmSt indicator.