Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | ZigZag_Oscillator

Indicator ZigZag Oscillator displays in a separate chart window a colored histogram of the Close price distance from the ZigZag pivot point (break).

It has four configurable parameters:

  • ZigZag Depth - parameter ZigZag Depth
  • ZigZag Deviation - parameter ZigZag Deviation
  • ZigZag Backstep - parameter ZigZag Backstep
  • ZigZag pivot point - pivot point to start calculating the distance from

Calculations:

ZZOsc = 100 * (Close - LastZZ) / LastZZ

where:

LastZZ - ZigZag price on the pivot point

If the pivot point is equal to zero, then the counting will be started from the nearest left ZigZag break or from the end of its last ray.

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 1. ZigZag Oscillator + ZigZag, ZigZag pivot point = 0

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 2. ZigZag Oscillator + ZigZag, ZigZag pivot point = 1

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 3. ZigZag Oscillator + ZigZag, ZigZag pivot point = 2

23420