Ho importato dalla libreria l’indicatore in oggetto (che allego) di Nicolas, ma non ho capito come utilizzarlo in un trading system.
Grazie
//PRC_Another ATR trailing stop | indicator
//24.09.2019
//Nicolas @ http://www.prorealcode.com
//Sharing ProRealTime knowledge
// — settings
p=14 //ATR period
mult=2 //multiplier
mode=1 //trailing stop mode (0=straight line
// — end of settings
atr = AverageTrueRange[p](close) * mult
once trend=1
if trend=1 then
hh=max(hh,close)
ll=hh
if atr<atr[1] then
hhlevel=hh-atr
if hhlevel>ts then
ts=hhlevel
endif
endif
r=0
g=168
else
ll=min(ll,close)
hh=ll
if atr<atr[1] then
lllevel=ll+atr
if lllevel<ts then
ts=lllevel
endif
endif
r=255
g=0
endif
if close crosses over ts then
trend=1
if mode>0 then
ts=ll
endif
elsif close crosses under ts then
trend=-1
if mode>0 then
ts=hh
endif
endif
return ts coloured(r,g,0) style(line,3)