This indicator brings regular bullish and bearish divergences in real time onto the graphs.
The algorithm to discover those divergences is based on my 10 years experience of detecting divergences visually.
The divergences are drawn as red and green rectangles on the charts. You may also do forward testing in the visual style of the strategy tester.
- fast EMA phase: The phase of the fast EMA of the MACD. Default value is 12.
- Slow EMA Period: The period of the slow EMA of the MACD. Default value is 26.
- sign SMA Period: The period of the signal SMA of the MACD. Default value is 9.
- colorMACD: The color of the MACD in the histogram window. Default color is gray.
- colorBullishBoxes: The color of the bullish boxes in the chart window. Default color is darkgreen.
- colorBearishBoxes: The color of the bearish boxes in the chart window. Default color is red.
- maxBars: Here you can define how many candles backward the indicator should draw the divergences. Default value is 5000.
You can choose a lower value like 2000 for performance reasons (less calculation)