Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

TEMA_CUSTOM - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 2 reads | 0 comments |

TEMA_CUSTOM - indicator for MetaTrader 5

The Triple Exponential Moving Average (TEMA) technical indicator has advanced features for setting input parameters. The Triple Exponential Moving Average (TEMA) technical indicator was developed by Patrick Malloy, who published it in Technical Analysis of Stocks and Commodities magazine.

This indicator can be used in place of the usual moving average. The Triple Exponential Moving Average (TEMA) is a combination of an Exponential Moving Average, a Dual Exponential Moving Average, and a Triple Exponential Moving Average that provides less lag than these three averages alone.

Indicator input parameters:

 Input Smooth_Method MA_Method1=MODE_EMA_; // Average method for the first smoothing
Input integer length 1= 12 ; // Depth of first smoothing
Input integer stage 1= 15 ; // Parameters for the first smoothing
//---- For JJMA in the range of -100 ... +100, it will affect the quality of the transition process;
//----For VIDIA, it is the CMO cycle, for AMA, it is the slow average cycle
Input Smooth_Method MA_Method2= Mode_EMA ; // Average method for the second smoothing
Input integer length 2 = 5 ; // Depth of the second smoothing
Input integer stage 2= 15 ; // Parameters for the second smoothing
//---- For JJMA in the range of -100 ... +100, it will affect the quality of the transition process;
//----For VIDIA, it is the CMO cycle, for AMA, it is the slow average cycle
Input Smooth_Method MA_Method3= Mode_EMA ; // Average method for the third smoothing
Input integer length 3 = 5 ; //The depth of the third smoothing
Input integer stage 3= 15 ; // Parameters for the third smoothing
//---- For JJMA in the range of -100 ... +100, it will affect the quality of the transition process;
//----For VIDIA, it is the CMO cycle, for AMA, it is the slow average cycle
Input Application_Price_IPC= PRICE_MEDIAN ; // Price constant used for indicator calculation
Enter integer shift = 0 ; // indicator moves horizontally (in bars)
Enter integer price change = 0 ; // Vertical indicator moving points

It should be noted that the Phase1, Phase2, and Phase3 parameters have completely different meanings for different smoothing algorithms. For JMA, it is an external phase variable that varies from -100 to +100. For T3, it is the smoothed ratio multiplied by 100 for better visualization; for VIDYA, it is the CMO oscillation period; for AMA, it is the slow EMA period. In other algorithms, these parameters do not affect averaging. For AMA, the fast EMA period is a fixed value, equal to 2 by default. For AMA, the ratio of raised powers is also equal to 2.

The indicator uses SmoothAlgorithms.mqh library class (copy it to \MQL5\Include). The use of the class "Average price series for intermediate calculations without using additional buffers" is described in detail in the article.

The indicator was originally written in MQL4 and first published in the code base on June 19, 2015.

TEMA_CUSTOM - indicator for MetaTrader 5

Figure 1. TEMA_CUSTOM indicator


Attachment download

📎 smoothalgorithms.mqh (130.19 KB)

📎tema_custom.mq5 (8.74 KB)

Source: MQL5 #13926

Verification code Refresh