This indicator provides you with MACD formula applied to volume-aware Accumulation/Distribution and OnBalance Volumes indicators. In addition to tick volumes it supports special pseudo-real volumes, synthesized for Forex symbols where real volumes are unknown. More details on the volume surrogates may be found in description of another indicators - TrueVolumeSurrogate and OnBalanceVolumeSurrogate (algorithm of the latter is used internally in MACDAD for AD and OBV calculation before they proceed to MACD formula).
Using the combined price/volume action is widely recognized as an advantage in comparison to pure price action. This is why MACD based on OBV or AD may provide additional gain for trading.
The indicator shows a histogram of MACD itself, red signal line, and yellow dotted oscillating line, which visualizes a difference between the histogram and the signal line.
- FastMA - fast period, by default - 12;
- SlowMA - slow period, by default - 26;
- SignalMA - signal line period, by default - 9;
- FastSlowMAMethod - fast and slow moving average method, by default - exponential;
- SignalMAMethod - signal moving averaging method, by default - simple;
- PriceType - applied price type (applicable only if UseVolumes is none, see below), by default - Close;
- UseVolumes - mode selector: none - standard MACD built on pure price, OBV - MACD built on OBV curve, AD - MACD built on AD curve; by default - none; when it's OBV or AD, PriceType makes no sense and takes no effect;
- SurrogateVolumes - enable/disable usage of surrogate volumes; by default - false (tick volumes); it takes effect only if UseVolumes is OBV or AD;
On the screenshots below, the indicator is demonstrated with various settings on the same chart EURUSD H1.
- default settings, UseVolumes = none, MACD is built on price;
- UseVolumes = OBV, SurrogateVolumes = false;
- UseVolumes = AD, SurrogateVolumes = false;
- UseVolumes = OBV, SurrogateVolumes = true;
- UseVolumes = AD, SurrogateVolumes = true;
- New parameter Alerts allows you to enable alerts for specific events: MACD histogramm crosses zero up or down; Dashed oscillator line crosses zero up or down (red signal line crosses histogramm); both signals.
- New parameter AlertsOnTicks (false by default) controls if alerts can be generated only once on every bar, or multiple times by ticks (if true). When it's true, every type of signal can be raised twice: first for initial crossing and second for optional retreat (crossing back). Next crossings if they happen will be skipped in order to prevent massive alerts on price fluctuations. When AlertsOnTicks = false, bars with indices 1 and 2 are checked for event generation (both 1 and 2 are completed bars). When AlertsOnTicks = true, bars 0 and 1 are checked for event conditions (the bar 0 keeps changing, it's not completed yet).