Donchian Channel Activator Factor

Category: Indicators By: Nicolas Created: March 3, 2016, 3:13 PM
March 3, 2016, 3:13 PM
Indicators
3 Comments

This indicator is made of the classical Donchian Channel, but the upper and lower are factorized by the Average True Range of recent periods (pd value). The trend revert is “activated” when the close crossed above or below the upper or lower line.

////DONCHIAN CHANNEL ACTIVATOR///
///VARIABLE 
//pd = 5
//ot = 1
//Factor = 1

hi = HIGHEST[pd](high)[ot]
lo = LOWEST[pd](low)[ot]
DUpper=hi+Factor*AverageTrueRange[pd](close)
DLower=lo-Factor*AverageTrueRange[pd](close)


if f=1 then
 if close<lo then
  f=-1
  c=DUpper//hi
 else
  c=DLower//lo
 endif
else
 if close>hi then
  f=1
  c=DLower//lo
 else
  c=DUpper//hi
 endif
endif

return c coloured by f as"donchian activator"

 

Download
Filename: Britains-Activator-Factor.itf
Downloads: 252
Nicolas Master
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Logo Logo
Loading...