Divergence Detector Indicator for MT4/MT5
Info
The Divergence Detector Indicator for MT4/MT5 is a Indicator for MetaTrader 4 that this indicator is designed to trade using divergence. It allows for the selection of one of 30 oscillators to detect divergences.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Indicator works exclusively on MetaTrader 4 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL4/Indicators folder via File ? Open Data Folder in MetaTrader 4.
How to Install and Use Divergence Detector Indicator for MT4/MT5
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
What this tool does
This indicator is designed to trade using divergence.
Typical Use Case
This Indicator excels in automated trading and technical analysis on MetaTrader 4.
Compatible Platform & Setup
This Indicator works on MetaTrader 4. Place the file in the MQL4/Indicators folder and restart the terminal.
Description & Settings
Related: Divergence Indicator Panel - another powerful indicator for MetaTrader 4 traders.
This indicator is designed to trade using divergence.It allows for the selection of one of 30 oscillators to detect divergences.
Also recommended: Multi-Indicator Divergence Detector for MetaTrader 4 - similar indicator with strong performance on MetaTrader 4.
Key features include:- Displaying extremes as points (red for highs, yellow for lows).
- Identifying divergences using connecting segments between extremes.
- Drawing support/resistance lines as rays passing through extremes.
- Visualizing channels as rays.
Oscillator Selection:
The desired oscillator can be chosen by setting the 'osc' parameter. By default, the Relative Strength Index (RSI) is selected (oscillator number 29).
Available oscillators include:
- Volume
- Close
- Open
- High
- Low
- (h+l)/2
- (h+l+c)/3
- (h+l+c+c)/4
- (o+c+h+l)/4
- (o+c)/2
- Relative Strength Index (RSI)
Adjustable Parameters:
- osc=29: Number of the oscillator.
- th=true: Enable bearish divergence.
- tl=true: Enable bullish divergence.
- trend=true: Enable support/resistance lines.
- convergen=true: Enable hidden divergence.
- complect=1: Unique identifier for the indicator on the chart.
- backsteph=0: Number of historical bars to look back for highs.
- backstepl=0: Number of historical bars to look back for lows.
- backstep=0: General number of historical bars to look back.
- qsteps=1: Number of displayed steps (maximum three).
- levdpl=5: Demark level points for the left side (e.g., 2 means the central bar is above/below the two preceding bars).
- levdpr=1: Demark level points for the right side (e.g., 2 means the central bar is above/below the two following bars).
- period=8: Calculation period for specific oscillators (iadx, iatr, ibearspower, ibullspower, icci, idemarker, iforce, imomentum, imfi, irvi, istddev, irsi, iwpr).
- ma_method=0: Averaging method for specific oscillators (istochastic, istddev, iforce).
- ma_shift=0: MA shift for istddev.
- applied_price=4: Applied price for specific oscillators (irsi, istddev, iobv, iosma, imacd, imomentum, iforce, icci, ibullspower, ibearspower, iadx).
- mode=0: Line index for specific oscillators (istochastic, irvi, imacd, iadx).
- fast_ema_period=12: Fast EMA period for iosma, imacd.
- slow_ema_period=26: Slow EMA period for iosma, imacd.
- signal_period=9: Signal line period for iosma, imacd.
- kperiod=13: K line period for stochastic.
- dperiod=5: D line period for stochastic.
- slowing=3: Slowing parameter for stochastic.
- price_field=0: Applied price for stochastic.
- showbars=1000: Number of bars to display the indicator (0 for the entire chart).
- trend_down=true: Enable resistance lines.
- trend_up=true: Enable support lines.
- trendline=true: Enable support/resistance lines.
- handycolour=true: Apply custom colors.
Channel Settings:
- highline=red: Color for the high channel.
- lowline=deepskyblue: Color for the low channel.
- channelline=false: Use parallel channels to trend lines.
- trend=0: Filter trend lines (1=uptrend only, -1=downtrend only, 0=all trends).
- channel=false: Enable channels.
- regression=true: Use linear regression channel (false for standard deviation channel).
- rayh=true: Display ray for the high channel.
- rayl=true: Display ray for the low channel.
- channelh=red: Color of the high channel.
- channell=deepskyblue: Color of the low channel.
- std_widthh=1.0: Standard deviation width for the high channel.
- std_widthl=1.0: Standard deviation width for the low channel.
Other Settings:
- comment=false: Display comments on the chart.
- code=159: Character code for Wingdings font to display extremums.
- buystop=false: Display buystop levels.
- selllimit=false: Display selllimit levels.
- sellstop=false: Display sellstop levels.
- buylimit=false: Display buylimit levels.
Recommendations:
- The color of the oscillator and extremum points can be configured in the Colors tab of the indicator's properties.
- Change the 'complect' parameter when attaching multiple instances of this indicator to the chart to avoid conflicts.
You may also like: moving average convergence divergence (macd) - excellent alternative for indicator users on MetaTrader 4.
Source Code
#property copyright "robotfx"
#property link "https://robotfx.org"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#property stacksize 16384
#property indicator_separate_window
#property indicator_level1 75
#property indicator_level2 50
#property indicator_level3 25
#property indicator_level4 0
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.