Bonjour
Je cherche a affficher le plus haut et plus bas en fonction de x bars avant et apres de ce dernier.
Merci d avance
J’ ai recopier une partie du code de nicolas mais je ne sais pas comment l’afficher sur le graph
//PRC_Top Bottom | indicator
//08.10.2020
//Sharing ProRealTime knowledge
// — settings
per = 14 //Bottom Period
per2 = 14 //Top Period
// — end of settings
loc = low < lowest[per](low[1]) and low <= lowest[per](low[per])
if loc then
locstart=barindex
endif
bottom = barindex–locstart
loc2 = high > highest[per2](high[1]) and high >= highest[per2](high[per2])
if loc2 then
loc2start=barindex
endif
top = barindex–loc2start
J’ ai recopier une partie du code de nicolas mais je ne sais pas comment l’afficher sur le graph
//PRC_Top Bottom | indicator
//08.10.2020
//Sharing ProRealTime knowledge
// — settings
per = 8 //Bottom Period
// — end of settings
loc = low[9] < lowest[per](low[10]) and low <= lowest[per](low[1])
if loc then
locstart=barindex
endif
bottom = barindex–locstart
loc2 = high[9] > highest[per](high[10]) and high >= highest[per](high[1])
if loc2 then
loc2start=barindex
endif
top = barindex–loc2start
Maintenant comment l afficher sur l ecran ? ca devrait etre la barre avec le plus bas des 8 precedantes et suivantes
et inversement pour le plus haut
Chaque indicateur a besoin de RETOUR. Vous devez terminer l'indicateur.
si je savais je l’aurais fait, c’est pour ca que je demande de l aide, si nicolas pourrais regarder
Je pense que ce que tu recherches, c’est cet indicateur: https://www.prorealcode.com/prorealtime-indicators/pivot-support-resistance-zones/
soit choisir la quantité de bougies avant et après un point haut pour définir un “pivot” ou un “fractal”.
Merci c’est exactement cela
Une dernière petite question comment rendre les traits plus epais ?
avec l’instruction STYLE ajouté à la fin de DRAWSEGMENT, ici une ligne d’épaisseur 3 :
DEFPARAM CalculateOnLastBars = 1000
PivotBAR = 2 //2 bars AFTER pivot
LookBack = 4 //3 bars BEFORE pivot
BarLookBack = PivotBAR + 1
IF low[PivotBAR] < lowest[LookBack](low)[BarLookBack] THEN
IF low[PivotBAR] = lowest[BarLookBack](low) THEN
MySupport = BarIndex - PivotBAR
SupportPrice = low[PivotBAR]
ENDIF
ENDIF
IF high[PivotBAR] > highest[LookBack](high)[BarLookBack] THEN
IF high[PivotBAR] = highest[BarLookBack](high) THEN
MyResistance = BarIndex - PivotBAR
ResistancePrice = high[PivotBAR]//high[BarIndex - MyResistance]
ENDIF
ENDIF
DRAWSEGMENT(MyResistance,ResistancePrice,BarIndex,ResistancePrice) COLOURED(255,0,0,255) style(line,3)
DRAWSEGMENT(MySupport,SupportPrice,BarIndex,SupportPrice) COLOURED(0,128,0,255) style(line,3)
RETURN