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

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

author blogger | 802 reads | 0 comments |

XPercentR-PCR - indicator for MetaTrader 5

Scorpion@fxfisherman.com

The simple oscillator indicator is displayed as a colored cloud. The color of the cloud indicates the direction of the trend.

Indicator input parameters:

 //+------------------------------------------------------------------------+
//|Indicator input parameters|
//+------------------------------------------------------------------------+
Input unit HL_period = 55 ; //----
Enter Smooth_Method SmoothMethod=MODE_JJMA; // Smoothing method
Input unit smoothing length = 3 ; // smoothing depth
Input integer smoothing phase = 100 ; // smoothing parameter
Enter Unit Upper = 80 ; // Overbought level
Enter unit DN level = 20 ; // oversold level
Input colorUpLevelsColor =Purple; // Overbought level color
Input color DnLevelsColor=Purple; // Oversold level color
Input style level style=DASH_; // level style
Input width LevelsWidth=Width_1; // Level width

This indicator allows choosing the averaging algorithm from ten possible versions:

It should be noted that the Phase parameters of different smoothing algorithms have completely different meanings. For JMA, it is the Phase external variable that changes from -100 to +100. For T3 it is the smoothing ratio multiplied by 100 for better visualization; for VIDYA it is the CMO oscillator period; for AMA it is the slow EMA period. In other algorithms, these parameters do not affect smoothing. For AMA, the fast EMA period has a fixed value, which is 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.

XPercentR-PCR - indicator for MetaTrader 5

Figure 1 XPercentR-PCR indicator


Attachment download

📎 smoothalgorithms.mqh (133.8 KB)

📎xpercentr-pcr.mq5 (9.52 KB)

Source: MQL5 #1030

Refresh