Idea Contributor: yyy999, MQ5 Code Creator: barabashkakvn.
How the KDJ Indicator Works
The KDJ Indicator is built around the concepts of MaxHigh (the highest high) and MinLow (the lowest low) within a defined KdjPeriod. Essentially, MaxHigh minus MinLow gives us the range of the selected KdjPeriod. From here, we calculate how far the current bar's Close price is from MinLow, expressed as a percentage of that range. This percentage forms the base RSV line.
Next, we smooth out the base RSV line over the M1 period to create the K line. We then take this smoothed K line and average it over the M2 period to form the smoothed D line. Finally, the difference between the K line and the D line results in what we call the KDC histogram.
To give you a clearer picture, let’s compare the KDJ Indicator with the MACD:

Related Posts
- Unlocking MetaCOT 2: Your Ultimate CFTC Indicator Toolkit for MT4
- Unlocking the Power of Master Tools for MetaTrader 4
- Visualize Current Trends Across All Time Frames with This MetaTrader 4 Indicator
- Mastering the MACD Candle Indicator for MetaTrader 4
- Unlock Trading Insights with Volume Profile + Range v6.0 for MetaTrader 5