C’est pour moi effectivement deux sujets différents et désolé si je ne les ai pas mis au bon endroit?!?…c’est effectivement un sujet ProBuilder…encore désolé!
J’aimerais dans ce cas là…(je suis actuellement en plein visionnage de la formation avancées) pouvoir prolonger le segment jusqu’à la dernière barre tant qu’il n’est pas cassé par le prix et le supprimer si c’est le cas!
Merci d’avance!
//---external parameters
//startbar = 0
cp = 20
once lastpoint = 0
//---major zigzag points
if high[cp] >= highest[2*cp+1](high) then
LH = 1
else
LH = 0
endif
if low[cp] <= lowest[2*cp+1](low) then
LL = -1
else
LL = 0
endif
if LH = 1 then
TOPy = high[cp]
TOPx = barindex[cp]
endif
if LL = -1 then
BOTy = low[cp]
BOTx = barindex[cp]
endif
if LH>0 and (lastpoint=-1 or lastpoint=0) then
DRAWSEGMENT(TOPx,TOPy, barindex,TOPy) coloured(255,0,0)
drawtext("Résistance_H1=#topy# ",topx,TOPy+90,SansSerif,Bold,12) coloured(255,0,0)
lastpoint = 1
endif
if LL<0 and (lastpoint=1 or lastpoint=0) then
DRAWSEGMENT(BOTx,BOTy, barindex,BOTy) coloured(0,0,255)
drawtext("Support_H1=#boty# ",botx,BOTy-90,SansSerif,Bold,12) coloured(0,0,255)
lastpoint = -1
endif
//---mino zigzag points
if high[round(cp/2)] >= highest[cp+1](high) then
LLH = 1
else
LLH = 0
endif
if low[round(cp/2)] <= lowest[cp+1](low) then
LLL = -1
else
LLL = 0
endif
if LLH = 1 then
LTOPy = high[round(cp/2)]
LTOPx = barindex[round(cp/2)]
endif
if LLL = -1 then
LBOTy = low[round(cp/2)]
LBOTx = barindex[round(cp/2)]
endif
if LLH>0 then
DRAWSEGMENT(LTOPx,LTOPy, barindex+1,LTOPy) coloured(255,0,0)
drawtext("#ltopy#",ltopx,ltopy+40,dialog,standard,10) coloured(255,0,0)
endif
if LLL<0 then
DRAWSEGMENT(LBOTx,LBOTy, barindex+1,LBOTy) coloured(0,0,255)
drawtext("#lboty#",LBOTx,lboty-40,dialog,standard,10) coloured(0,0,255)
//DRAWTEXT("_____________",LBOTx,LBOTy-140,Dialog,Bold,20) coloured(0,255,0)
endif
RETURN