Double ATR trend indicator

Category: Indicators By: Jan Created: May 2, 2020, 10:05 AM
May 2, 2020, 10:05 AM
Indicators
2 Comments

Sharing a trend indicator, based upon the ATR of the ATR:  the double ATR trend indicator.

(not knowing if this indicator already exists)

The indicator is smoother then regular averages with the same period setting.

The double ATR trend indicator is calculated as follows:

DATR = Averagetruerange[Period](Averagetruerange[Period](Close))

For detecting the more general trend, the DATR is also calculated on a double period:

DATR2 = Averagetruerange[Period*2](Averagetruerange[Period*2](Close))

The default period setting is 15, the indicator should be added to the graph (like moving averages).  For comparison a 15 bars moving average is added.

Possibly the double ATR trend indicator on a double period could be used as a moving stop loss

As with most trend indicators, this indicator works well in a trending market, but not so well in a non trending, zigzagging market.

// Default Period = 15
// To be added to the graph itself like a moving average
//double ATR
Period = 15
DATR = Averagetruerange[Period](Averagetruerange[Period](Close))

//double ATR with doubled period
DATR2 = Averagetruerange[Period*2](Averagetruerange[Period*2](Close))

if DATR < DATR[1] then
 r=255
 g=0
 b=0
else
 r=0
 g=176
 b=80
endif
if DATR2 < DATR2[1] then
 ar=255
 ag=0
 ab=0
else
 ar=0
 ag=176
 ab=80
endif

return  DATR coloured(r,g,b) style(Line, 5) as "DATR", DATR2 coloured(ar,ag,ab) style(Line, 5) as "DATR2"

Download
Filename: DoubleATR-trend-indicator.itf
Downloads: 612
Jan Veteran
I usually let my code do the talking, which explains why my bio is as empty as a newly created file. Bio to be initialized...
Author’s Profile

Comments

Logo Logo
Loading...