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