The indicator displays renko bars on a chart, use them to plot MACD histogram and provides buy/sell signals:
- signal of MACD histogram crossing its signal line;
- signal of MACD histogram crossing the line 0.
Renko is a non-trivial price display method. Instead of displaying each bar within a time interval, only the bars where the price moved a certain
number of points are shown. Renko bars do not depend on a time interval, therefore the indicator works on any timeframe without losing its
efficiency.
Buy/sell signals are passed to the indicator buffers and can be used in the automated trading. Signal 1 shows the histogram crossing the signal
line, while signal 2 displays the histogram crossing the level 0.
Apart from signals on a chart, the indicator features pop-up, e-mail and push notifications.
Parameters
- RenkoBar – renko bar size (specified for 4-digit quotes, automatically re-calculated for 5- and 3-digit quotes);
- CountBars – number of renko bars displayed on a chart;
- bearColor – bearish bar color;
- bullColor – bullish bar color;
- hideBars – flag of hiding standard bars on a chart
- MacdFast – fast MACD line period;
- MacdSlow – slow MACD line period;
- MacdSignal – MACD signal line period;
- MacdColor – MACD histogram color;
- SignalColor – MACD signal line color;
- showSignal_1 – enable/disable the signal of the histogram crossing the signal line;
- showSignal_2 – enable the signal of the histogram crossing the line 0;
- useAlert – enable notifications in a popup window;
- useMail – enable email notifications;
- useNotification – enable push notifications;
- messageSignal_1 – signal 1 notification text;
- messageSignal_2 – signal 2 notification text.
Use OnChartEvent for EA:
void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { switch (id) { case CHARTEVENT_CUSTOM+100: case CHARTEVENT_CUSTOM+101: goBuy(); break; case CHARTEVENT_CUSTOM+102: case CHARTEVENT_CUSTOM+103: goSell(); break; } } void goBuy() { // function for open BUY } void goSell() { // function for open SELL }