Divergences Template Indicator
This software component for MetaTrader 4 is built to enhance the capabilities of your trading environment. This technical indicator acts as a specialized analysis tool designed to visualize market data. It helps traders identify emerging trends, momentum shifts, and key support or resistance levels by plotting statistical calculations directly onto price charts.
How to Setup and Use Divergences Template Indicator
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.
Description & Settings
This indicator provides a template to be used to plot divergences based on your desired oscillator.
Depending on which oscillator you choose(whether it is CCI, RSI or even your custom indicator) you may modify this part of the code:
signal buffers This indicator has four different buffers as below to keep track of signals generated. There is a signal whenever the corresponding buffer hold non-empty value. inputs section
Finding
pivot highs
and
pivot lows
in indicatorBuffer depends on pivots_period input. The bigger you choose this value it will search larger swings for possible divergences.
Another input is alert_confirm_candles which defines how many bars to wait for confirming a signal. Divergence indicators are mostly lagging and issue a lot of false signals. The bigger you choose this value it will wait more and the number of false signals reduce. It is a compromise whether you want on-time signals or you want confirmed ones.
Normally you are not allowed to apply pivots_period < 2.
Repaint issue
Indicators that rely on pivot calculations has to wait as long as pivots_period to get a confirmation of the recent high/low. So this indicator needs to repaint signals as far as pivots_period back in time.