dominike

Cloud ATR trend indicator

Category: Indicators By: dominike Created: April 8, 2016, 8:29 PM
April 8, 2016, 8:29 PM
Indicators
2 Comments
Cloud ATR trend indicator

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"

 

Download
Filename: Trailing-Stop-ATR-1.itf
Downloads: 141
Download
Filename: technip-atr-stop-1460103435c4p8l.png
Downloads: 100
Download
Filename: DELTA-CLOUD.itf
Downloads: 160
dominike
dominike Average
This author is like an anonymous function, present but not directly identifiable. More details on this code architect as soon as they exit 'incognito' mode.
Author’s Profile

Comments

Brad
11 years ago
#

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 ]˙?

Nicolas
11 years ago
#

ITF files are made to be imported directly into the platform with the prorealtime tools embedded in. Sorry, it is x=10 not p. I fixed this syntax error in the code above.

ProRealCode ProRealCode
Loading...