This is an indicator built with ATR around a moving average, like a cloud.
You’ll need 2 indicators : Delta-Cloud (main one) and the Trailing stop ATR indicator which is necessary for calculation.
// Kevin Britains work
x = 10
a = AverageTrueRange[14](close)
up = low + (x+a)
dn = high - (x-a)
once trend=1
if high > up[1] then
trend=1
elsif low < dn[1] then
trend=-1
endif
if trend<0 and trend[1]>0 then
flag=1
else
flag=0
endif
if trend>0 and trend[1]<0 then
flagh=1
else
flagh=0
endif
if trend>0 and dn<dn[1] then
dn=dn[1]
endif
if trend<0 and up>up[1] then
up=up[1]
endif
if flag=1 then
up= low + (x+a)
endif
if flagh=1 then
dn= high - (x-a)
endif
if trend=1 then
super=dn
else
super=up
endif
return super as "Trailing Stop ATR"
and the main indi :
// Cloud Trend
// Kevin Britains
Trend1 = ExponentialAverage[75](close)
Trend2 = CALL "Trailing Stop ATR"[5]
if Trend1 > Trend2 then
CloudUpper = Trend1
endif
if Trend2 > Trend1 then
CloudUpper = Trend2
endif
if Trend1 < Trend2 then
CloudLower = Trend1
endif
if Trend2 < Trend1 then
CloudLower = Trend2
endif
return cloudUpper AS "DELTA UPPER",CloudLower AS "DELTA LOWER"