Bonjour, serait il possible d’avoir un screener à partir de cet indicateur qui recenserait les “drawarrowup” et les drawarrowdown?
merci d’avance.
//PRC_SuperTrend Extended | indicator
//31.10.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
//multiplier=2.236
//period=66
//type=1 //1 = use ATR , 2 = Use standard deviation , 3 = Use standard error
//midperiod=10
// --- end of settings
type=max(1,type)
if type=1 then
moy=averagetruerange[period](close)
elsif type=2 then
moy=std[period](close)
elsif type=3 then
moy=ste[period](close)
endif
price=(highest[midperiod](high)+lowest[midperiod](low))/2
up=price+multiplier*moy
dn=price-multiplier*moy
once trend=1
if close>up[1] then
trend=1
elsif close<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=price+multiplier*moy
endif
if flagh=1 then
dn=price-multiplier*moy
endif
if trend=1 then
mysupertrend=dn
offset=moy
color1=0
color2=191
color3=255
else
mysupertrend=up
offset=-moy
color1=255
color2=69
color3=0
endif
drawcandle(mysupertrend,mysupertrend+offset,mysupertrend,mysupertrend+offset) coloured(color1,color2,color3,50)bordercolor(100,100,100,0)
if trend=1 and trend[1]<>1 then
drawarrowup(barindex,mysupertrend) coloured(color1,color2,color3)
endif
if trend=-1 and trend[1]<>-1 then
drawarrowdown(barindex,mysupertrend) coloured(color1,color2,color3)
endif
return mysupertrend coloured (color1,color2,color3) as "SuperTrend Extended 1", mysupertrend+offset coloured (color1,color2,color3) as "SuperTrend Extended 2"
Ci-joint le screener pour le Supertrend Extended. Dans la colonne de tri, “signal” retourne un 1 pour signal haussier et -1 pour un signal baissier :
//PRC_SuperTrend Extended | screener
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
multiplier=2.236
period=66
type=1 //1 = use ATR , 2 = Use standard deviation , 3 = Use standard error
midperiod=10
// --- end of settings
type=max(1,type)
if type=1 then
moy=averagetruerange[period](close)
elsif type=2 then
moy=std[period](close)
elsif type=3 then
moy=ste[period](close)
endif
price=(highest[midperiod](high)+lowest[midperiod](low))/2
up=price+multiplier*moy
dn=price-multiplier*moy
once trend=1
if close>up[1] then
trend=1
elsif close<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=price+multiplier*moy
endif
if flagh=1 then
dn=price-multiplier*moy
endif
//drawcandle(mysupertrend,mysupertrend+offset,mysupertrend,mysupertrend+offset) coloured(color1,color2,color3,50)bordercolor(100,100,100,0)
signal=0
if trend=1 and trend[1]<>1 then
signal=1
//drawarrowup(barindex,mysupertrend) coloured(color1,color2,color3)
endif
if trend=-1 and trend[1]<>-1 then
signal=-1//drawarrowdown(barindex,mysupertrend) coloured(color1,color2,color3)
endif
screener[signal<>0](signal)
Désolé, mais lors de la création de l'écran, cette erreur m'a donné …. Qui peut m'aider à réparer …. Cantone di Grazie
En effet “price” est désormais un mot réservé par le langage de programmation, voici une version corrigée de ce screener:
//PRC_SuperTrend Extended | screener
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
multiplier=2.236
period=66
type=1 //1 = use ATR , 2 = Use standard deviation , 3 = Use standard error
midperiod=10
// --- end of settings
type=max(1,type)
if type=1 then
moy=averagetruerange[period](close)
elsif type=2 then
moy=std[period](close)
elsif type=3 then
moy=ste[period](close)
endif
iprice=(highest[midperiod](high)+lowest[midperiod](low))/2
up=iprice+multiplier*moy
dn=iprice-multiplier*moy
once trend=1
if close>up[1] then
trend=1
elsif close<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=price+multiplier*moy
endif
if flagh=1 then
dn=price-multiplier*moy
endif
//drawcandle(mysupertrend,mysupertrend+offset,mysupertrend,mysupertrend+offset) coloured(color1,color2,color3,50)bordercolor(100,100,100,0)
signal=0
if trend=1 and trend[1]<>1 then
signal=1
//drawarrowup(barindex,mysupertrend) coloured(color1,color2,color3)
endif
if trend=-1 and trend[1]<>-1 then
signal=-1//drawarrowdown(barindex,mysupertrend) coloured(color1,color2,color3)
endif
screener[signal<>0](signal)
Merci beaucoup maintenant ça marche vraiment bien……