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"
More code that just throw up loads of errors...
Here's one:
Error in the indicator: Trailing Stop ATR
Syntax error: The function "Trailing Stop ATR" called from "Trailing Stop ATR" is called with 1 parameter(s) instead of 0 expected.
What is x?
What is a?
It looks like this if you try and open the itf on a Macbook:
êˆìûxçÆéÑòœdÙñÓœÎ≈ÈeÁÄ¢q¿Íl∆Ω¯r<Uf –πß˝|∞˙<Ã5oÚ7rE≤l(Qz<p•M,j.¯Ÿü›@∑ KòùÙ¬Sƒ2å:\*`⁄ÜüÍᡪoÒ˜É)ÍFóF¨xíwîHm{:aΩyóCUn£@"_ j_ı`Ó[¸»b¯e~ê˧ó!gŒ:´ãüâ*N-¡õ—∏g1Z ]˙?