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

UltraWPR - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

UltraWPR - indicator for MetaTrader 5

UltraWPR - indicator for MetaTrader 5

UltraWPR - indicator for MetaTrader 5

UltraWPR - indicator for MetaTrader 5

UltraWPR - indicator for MetaTrader 5

The indicator is based on WPR (Larry Williams' Percent Range, %) and its multi-signal line analysis. The signal line calculation algorithm is as follows. We have indicator input parameters as source data:

Any period value in multiple signal lines is calculated using an arithmetic series:

SignalPeriod(Number) = StartLength + Number * Step,

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 a smoothed array of Larry Williams Percent Range indicator values. Calculate the direction of the current trend for each smoothing and also determine the number of positive and negative trends for the entire array of WPR smoothed values. 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 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.

Place the UltraWPR indicator compiled file into terminal_data_folder\MQL5\Indicators\.

Indicator input parameters:

//+------------------------------------------------------------------------+
//|Indicator input parameters |
//+------------------------------------------------------------------------+
Input integer WPR_period = 13 ; // WPR indicator period
//----
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
//----
Enter Unit Upper = 80 ; // Overbought level, %
Input unit DN level = 20 ; // Oversold level, %
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 

UltraWPR - indicator for MetaTrader 5


Attachment download

📎 smoothalgorithms.mqh (133.8 KB)

📎 ultrawpr.mq5 (10.93 KB)

Source: MQL5 #722

Verification code Refresh