Multi oscillator divergence
The indicator identifies when a divergence occurs between price and an oscillator/indicator. It identifies both bullish and bearish divergences. It has a RSI filter option which makes it possible to filter out only the strongest setups.
- Can detect divergences for the following oscillators/indicators: MACD, OsMA, Stochastics, RSI, CCI, RVI, Awesome, ADX, Composite index, ATR, OBV, MFI and Momentum. Only one oscillator/indicator can be selected.
- Draws solid lines for regular/classical (potential reversal) divergences and dashed lines for hidden (trend continuation) divergences. The lines are drawn on the chart as well as in the indicator window.
- Sends an alert when a divergence has been detected.
- Contains 1 buffer which a developer can use with the iCustom() function in an Expert Advisor (EA). The buffer index is 4 and the shift is always 0. Code example and the buffer return values can be found at the end of the blog.
Please find the description and explanation of the input parameters here.
Please check out my other divergence products:
- added an option to disable drawing of lines and arrows if the RSI filter is enabled and the price it outside the RSI levels
- upon request I have added the possibility to scan for "early" divergences. This means that the alert will come directly upon candle open instead of waiting for the slope in the indicator to change direction (candle shift 1 or 2). Candle shift must be set to 0 for this to work. Please be aware though that this will lead to more false signals (repaintings)
- Replaced the parameter 'Wait for candle close' with new parameter 'Divergence candle shift'. Value 1 = previous parameter set to False and value 2 was value True. You can also set a higher value than 2.
- added the possibility to show MACD main line as histogram instead of a line (same as in the Metatrader native MACD indicator)
- added a possibility to set custom line level values in the indicator window for Stochastics and RSI
- added support for iCustom() to be used with an Expert Advisor
- added apossibility to disable scanning of bullish or bearish divergences
- added the possibility to set max bars to check between extremums
- added option to scan for only hidden or regular divergences