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

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

author EAcpu | 4 reads | 0 comments |

UltraXMA - indicator for MetaTrader 5

The indicator is based on the integral value of the fan trend of similar moving averages and the arithmetic series of smoothing periods.

The moving average calculation algorithm is as follows. We have indicator input parameters as source data:

Any period value among the many line fans is calculated using an arithmetic series:

XMAPeriod(number) = starting length + number*step size

The value of the Number variable ranges from zero to StepsTotal. The obtained period values ​​are added to the variable array and used at each indicator tick to obtain an array of XMA Moving Average sector values. Calculate the direction of the current trend for each smoothing, and the number of positive and negative trends for the entire moving average sector array. The final positive and negative trend numbers are sequentially smoothed and used as indicator lines to form colored clouds with the help of draw_fill style class.

The trend direction of this indicator is determined by the color of the clouds, while its strength is determined by the width of the clouds. You can use overbought (UpLevel) and oversold (DnLevel) levels, which are set as a percentage value of the indicator's maximum amplitude.

The smoothing algorithm can be chosen from ten possible versions:

It should be noted that the Phase parameters of different smoothing algorithms have completely different meanings. 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 smoothing. 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 the SmoothAlgorithms.mqh library class (must be copied to terminal_data_folder\MQL5\Include). The use of the class "Average price series for intermediate calculations without using additional buffers" is described in detail in the article.

Indicator input parameters:

 //+------------------------------------------------------------------------+
//|Indicator input parameters |
//+------------------------------------------------------------------------+
Enter ENUM_APPLIED_PRICE apply price = PRICE_CLOSE ; // apply price
//----
Enter Smooth_Method W_Method=MODE_JJMA; // Smoothing method
Input integer starting length = 3 ; // Initial smoothing period
Input integer W phase = 100 ; // Smoothing parameter
//----
Input unit steps = 5 ; // Cycle change steps
The total number of steps in the input unit = 10 ; // Number of cycle changes
//----
Enter Smooth_Method SmoothMethod=MODE_JJMA; // Smoothing method
Input integer smoothing length = 3 ; // smoothing depth
Input integer smoothing phase = 100 ; // smoothing parameter
Input application_price_IPC= PRICE_CLOSE ; // application price
//----
Enter Unit Upper = 80 ; // Overbought level
Enter unit DN level = 20 ; // oversold level
Input colorUpLevelsColor =red; // Overbought level color
Input color DnLevelsColor=red; // Oversold level color
Input style level style=DASH_; // level style
Input width LevelsWidth=Width_1; // Level width 

UltraXMA - indicator for MetaTrader 5


Attachment download

📎 smoothalgorithms.mqh (133.8 KB)

📎 ultraxma.mq5 (11.41 KB)

Source: MQL5 #730

Verification code Refresh