Bonjour à tous,
J’ai un souci avec un indicateur dont j’ai récupéré le code ici : https://www.prorealcode.com/prorealtime-indicators/scalper-trade-signals-john-carter/
J’ai fait des essais sur un graphe en 1 minute, pour voir si les signaux apparaissaient bien au fur et à mesure des bougies qui passent.
Le problème, c’est que parfois le signaux ne se déclenchent pas alors qu’ils devraient le faire (visuellement parlant), et pour vérifier ça, j’ai attendu que 2 heures s’écoulent,
puis j’ai supprimé l’indicateur et l’ai remis sur le graphique, et là les résultats sont différents ! Soit il manquait des signaux en live, et après actualisation ils apparaissent,
soit il y a carrément des différences entre les signaux (un coup ils y sont, la fois d’après ils n’y sont plus ou inversement), bref, c’est pas très net et surtout, je m’aperçois que
je rate des signaux en live, et pire encore, je viens de le faire il y a quelques minutes : je suis entré sur un signal, et un peu plus tard, en actualisant, le signal a disparu, et je me retrouve perdant :-(.
Est-ce que quelqu’un peut me dire pourquoi cet indicateur ne se réactualise pas bien, ou pourquoi certains signaux n’apparaissent pas de suite, mais apparaissent
si j’enlève puis remet l’indicateur sous mon graphique ?
Merci d’avance
(j’utilise PRT v.10.3 chez IG)
once rr=1
mb=average[20](typicalprice)
k=48
n=(k*2)-4
p=(n/2)-1
h1=DPO[n](high)
moyh=high-h1
hi=(moyh-moyh[1]+(high[p])/n)*n
hi=(round(hi*100))/100
l1=dpo[n](low)
moyl=low-l1
lo=(moyl-moyl[1]+(low[p])/n)*n
lo=(round(lo*100))/100
clo1=dpo[n](close)
moyc=close-clo1
clot=(moyc-moyc[1]+(close[p])/n)*n
clot=(round(clot*100))/100
cond1=(high>high[1] and high>high[2])
cond2=(cond1 and high>hi[46]) and (barindex>bari or rr=-1)
if cond1 and cond2 then
flagg=1
targeth=high
targetl=lo[46]
else
flagg=0
signa=mb
endif
for zz=0 to 45
if clot[45-zz]<targetl and hi[45-zz]<=targeth and flagg=1 then
signa=high+(averagetruerange[20](close))*.5
rr=1
bari=barindex+zz+2
break
elsif hi[45-zz]>targeth then
signa=mb
break
endif
next
condi=(low<low[1] and low<low[2]) and low<lo[46] and (barindex>bar or rr=1)
if condi then
fflag=1
target1=low
target2=hi[46]
else
fflag=0
siigna=mb
endif
for kk=0 to 45
if clot[45-kk]>target2 and lo[45-kk]>=target1 and fflag=1 then
siigna=low-(averagetruerange[20](close))*.5
rr=-1
bar=barindex+kk+2
break
elsif lo[45-kk]<target1 then
siigna=mb
break
endif
next
if barindex < 100 then
signa=undefined
siigna=undefined
endif
golong = (siigna < mb)
goshort = (signa > mb)*-1
return golong as "LONG",goshort as "SHORT",0