UltraAbsolutelyNoLagLwma - MetaTrader 5 Script - MT4/MT5 Resource

The indicator is based on the absolutely lag-free Lwma indicator and analyzes its multiple signal lines. The signal line calculation algorithm is as follows. Any period value in multiple signal lines is calculated using an arithmetic series:
SignalPeriod(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 price tick of the indicator to obtain an array of smoothed values of the indicator. Based on this array, calculate the direction of the current trend for each smoothing and find the number of positive and negative trends for the smoothed AbsolutelyNoLagLwma value for the entire array.
The final numbers of positive and negative trends are smoothed and used as indicator lines to form color histograms, using the DRAW_COLOR_HISTOGRAM2 style class. The indicator's trend direction is determined by the histogram color, while its strength is determined by the histogram width.
To indicate trends, four colors are used for each of the two trend directions: if the histogram value does not enter the overbought/oversold zone, the indicator is darker, while when overbought/oversold levels are exceeded, the indicator becomes lighter.
//+------------------------------------------------------------------------+ //|Indicator input parameters | //+------------------------------------------------------------------------+ Input unit F length = 7 ; // Smoothing depth Enter Applied_price_IPC=PRICE_CLOSE_; // price constant //---- 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 step = 5 ; // Cycle change step The total number of steps in the input unit = 10 ; // Number of changes during the period //---- 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 thickness
The smoothing algorithm can be chosen from ten possible versions:
It should be noted that the Phase type 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 averaging. For AMA the fast EMA period is fixed and the default value is equal to 2. For AMA, the ratio of raised powers is also equal to 2.
The indicator uses SmoothAlgorithms.mqh library class (copy it to

Figure 1. UltraAbsolutelyNoLagLwma indicator
Attachment download
📎 SmoothAlgorithms.mqh (130.2 KB)
📎 UltraAbsolutelyNoLagLwma.mq5 (28.68 KB)
Source: MQL5 #20975
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •