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

XWPR_Histogram_Vol - MetaTrader 5 Script - MT4/MT5 Resource

author EAcpu | 5 reads | 0 comments |

XWPR_Histogram_Vol - indicator for MetaTrader 5

WPR_Histogram_Vol indicator and additional average value of the resulting histogram. Similar averaging also applies to dynamic overbought/oversold levels.

 //+--------------------------------------------------------+
//| Indicator input |
//+--------------------------------------------------------+
Input unit WPRP period = 14 ; // indicator period
input ENUM_APPLIED_VOLUME volume type = volume_scale ; // volume
Enter an integer High level 2 = + 20 ; // Overbought level 2
Enter an integer High level 1 = + 15 ; // Overbought level 1
Enter an integer low level 1 = - 15 ; // oversold level 1
Enter an integer low level 2 = - 20 ; // Oversold level 2
Enter Smooth_Method MA_SMethod=MODE_SMA_; // Average method
Input unit MA_length = 12 ; // Smoothing depth
Input integer MA_phase = 15 ; // first smoothing parameter,
//---- For JJMA, it changes within the range of -100...+100, which affects the quality of the transient process;
//---- For VIDIA this is the CMO period, for AMA this is a slow average
Input integer shift = 0 ; // indicator moves horizontally (in bars)

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.

XWPR_Histogram_Vol - indicator for MetaTrader 5

Figure 1. XWPR_Histogram_Vol indicator


Attachment download

📎 SmoothAlgorithms.mqh (130.2 KB)

📎 XWPR_Histogram_Vol.mq5 (27.2 KB)

Source: MQL5 #22427

Verification code Refresh