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 | Donchian_Oscillator

Donchian Oscillator is an indicator of a ratio between the price and the Donchian channel. If the current Close price is above the Donchian channel, the indicator draws a histogram bar with a positive value equal to the distance from the price to the upper channel border. If the current Close price is below the Donchian channel, the indicator draws a histogram bar with a negative value equal to the distance from the lower channel border to the price.

It has one input parameter:

  • Period - Donchian channel calculation period

Calculation:

  • If Close > Max
    Green histogram bar equal to Close - Max
  • If Close < Min
    Red histogram bar equal to Close - Min

where:

Max, Min - the highest High and the lowest Low within the Period range

MetaTrader Experts, Indicators, Scripts and Libraries

23303