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

Super Spearman Rank Correlation - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 2 reads | 0 comments |

Ultra Spearman Rank Correlation - indicator for MetaTrader 5

The indicator is based on the value of several signal lines Spearman Rank Correlation Indicator. The signal line calculation algorithm is as follows. Input parameters include

The set of signal lines is calculated using the arithmetic series formula:

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

The value of the numeric variable ranges from 0 to StepsTotal. The resulting periods are added to an array and used to calculate the mean Spearman rank correlation indicator. The calculation of the current trend direction is based on the average trend value of all signal lines.

Finally, the positive and negative values ​​of the trend are averaged and used as indicator lines, displayed as a color histogram, using the DRAW_COLOR_HISTOGRAM2 painting style. The histogram color depends on the trend direction and the histogram width depends on the trend strength.

For indicator values ​​outside overbought and oversold levels, dark colors are used. For overbought/oversold values, use lighter colors.

Input parameters:

 //+------------------------------------------------------------------------+
//|Indicator input parameters |
//+------------------------------------------------------------------------+
Input integer range N= 14 ; //----
Enter Smooth_Method W_Method=MODE_JJMA; // Smoothing method
Input integer starting length = 3 ; // starting length
Input integer W phase = 100 ; // phase
//----
Input unit steps = 5 ; // cycle step size
Total number of steps in input unit = 10 ; //Total number of steps
//----
Enter Smooth_Method SmoothMethod=MODE_JJMA; // Smoothing method
Input integer smoothing length = 3 ; // smoothing length
Input integer smoothing phase = 100 ; // smoothing phase
//----
Enter Unit Upper = 80 ; // Overbought level (percentage)
Input unit DN level = 20 ; // Oversold level (percentage)
Input colorUpLevelsColor =blue; // Overbought level color
Input color DnLevelsColor=blue; // Oversold level color
Input style level style=DASH_; // Level style
Input width LevelsWidth=Width_1; // Level width

The indicator can be smoothed by choosing from a dozen possible versions:

It should be noted that the Phase1 and Phase2 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 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.

This indicator uses the SpearmanRankCorrelation.mq5 indicator, which must be placed into terminal_data_folder\MQL5\Include.

Ultra Spearman Rank Correlation - indicator for MetaTrader 5

Super Spearman rank correlation indicator


Attachment download

📎 smoothalgorithms.mqh (133.8 KB)

📎 spearmanrankcorrelation.mq5 (6.6 KB)

📎 ultraspearmanrankcorrelation.mq5 (11.71 KB)

Source: MQL5 #787

Verification code Refresh