• Overview
  • Reviews
  • Comments (16)
  • What's new

RenkoMACD Divergence

The indicator displays renko bars on a chart, uses them to plot the MACD oscillator and determines the divergence conditions (divergences of price movements and oscillator values). The buy/sell signal is formed if the next High/Low price is not confirmed by the oscillator values.

The ZigZag indicator is used to evaluate the extremums. Only the last 3 peaks are taken into account (see the screenshot). If peak 1 is higher than peak 2 or peak 3, and at the same time the macd value is lower, then a sell signal is formed. The logic of buy signals is mirrored.

The indicator draws its signals as arrows in the main chart window, displays pop-up messages, sends emails and push-notifications, as well as generates an EventChartCustom custom event for using the signal in automation of trading. The event generated by the indicator can be handled by an external EA in the OnChartEvent function. The parameters passed to the event handler from the indicator are the following: dparam - the value of the nearest price peak; sparam - text message.

Description of the indicator parameters:

  • RenkoBar - size of a Renko bar in points (automatically recalculated for 5-digit quotes);
  • CountBars - the number of Renko bars displayed on the chart;
  • bearColor - color of a bearish Renko bar;
  • bullColor - color of a bullish Renko bar;
  • hideBars - flag to hide the usual bars on the chart;
  • MacdFast - period of the fast line of the oscillator;
  • MacdSlow - period of the slow line of the oscillator;
  • MacdColor - color of the oscillator;
  • zzDev - deviation from the previous movement as a percentage;
  • zzBack - deviation from the previous movement as a number of Renko bars;
  • zzColor - color of the ZigZag lines;
  • zzWidth - width of the ZigZag lines.
  • signalBuyColor - the color of the Buy signal arrow;
  • signalSellColor - the color of the Sell signal arrow;
  • useAlert - enable pop-up messages;
  • useMail - enable e-mail messages;
  • useNotification - enable push-notifications;
  • CustomEventBuy - indicator of the custom buy event (0 - disable);
  • CustomEventSell - indicator of the custom sell event (0 - disable);
No reviews
Version 1.3 2016.11.22
1) Set the default CountBars=0. Number of displayed renko bars is set at a double chart width.
2) In case of insufficient archive data, the indicator is not unloaded but joins a queue instead.
3) Low/High quotes from the archive are used for the initial indicator plotting.
4) MACD histogram is automatically scaled by value.
5) RenkoBar parameter value is multiplied by 100 for two-digit quotes.
Version 1.1 2016.08.16
Added numPeaks parameter - number of price peaks used for evaluating a divergence