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

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

author EAcpu | 3 reads | 0 comments |

AsymmetricStochNR - indicator for MetaTrader 5

Enhanced version of the stochastic oscillator . From the perspective of parameter fields, there are only three differences between the asymmetric stochastic indicator and the standard stochastic indicator:

Kperiod now consists of two values ​​- primary KperiodShort (short) and advanced KperiodLong (long).

Added oversold (OS) and overbought (OB) level parameters. If Stochastic enters the OS/OB zone, Kperiods (length of high/low search) switches.

The third difference (sensitivity limit) is the Sens parameter, which allows cutting off oscillations below a certain limit set in points. Therefore, the number of false signals is significantly reduced. In fact, the standard stochastic locates the current price between the price high and low of the number of bars set by the %K (Kperiod) parameter. It doesn't matter if the extreme points are 1 or 100 points away from each other. It will still indicate that the OS/OB value has been reached. Implementing some limits can eliminate oscillations that are insignificant to a trading system.

If the Stochastic enters the OS zone, the indicator will look for lows on the junior Kperiod (KperiodShort) bar and highs on the advanced Kperiod (KperiodLong) bar. If the Stochastic enters the OB zone, it looks for lows in the long range and highs in the short range.

Interpretation/Usage. Entering OS/OB via Stochastic means switching the trend into the appropriate direction. However, a trend reversal does not usually mean a signal to enter a market based on the current trend direction. Positions should be opened during pullbacks, which can be identified by the 50% line crossing/touching. If you follow the "Turtle" strategy, you should increase your positions during corrections. When the trend changes, all positions should be closed or reduced. In the latter case, the position is completely closed during the correction, while new positions are opened in the opposite direction. Stop loss is set near the previous (opposite) extreme point with a reasonable pullback. But they are less likely to trigger in operational mode. Stop loss is only set in case of force majeure.

The indicator was first implemented in MQL4 and released in the code base on April 22, 2010.

Indicator input parameters:

 //+------------------------------------------------+
//| Indicator input parameters |
//+------------------------------------------------+
Input unit K period short = 5 ; // %K period
Input unit K period length = 12 ; // %K period
Input Smooth_Method DMethod= Mode_SMA ; //Signal line smoothing method
Input unit D period = 7 ; // %D signal line period
Input integer D phase = 15 ; // signal line smoothing parameter
Input unit deceleration = 3 ; // slow down
Input ENUM_STO_PRICE price field = STO_LOWHIGH ; // Price selection parameters for calculation
Input unit sense = 7 ; // Sensitivity in points
Input unit overbought = 80 ; // Overbought level, %%
Input unit oversold = 20 ; // Oversold level, %%
Input color level color = blue; // level color
Input style level style=DASH_; // level style
Input width LevelsWidth=Width_1; // Level width
Enter integer shift = 0 ; // horizontal movement of the indicator in bars

This indicator allows choosing the type of smoothing of the signal line 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 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.

AsymmetricStochNR - indicator for MetaTrader 5


Attachment download

📎 asymmetricstochnr.mq5 (11.83 KB)

📎 smoothalgorithms.mqh (133.8 KB)

Source: MQL5 #714

Verification code Refresh