Merci Nicolas. J’ai intégré mais tombe sur un os. Dans le screen shot attaché (Graphique Mn5) on visualise 3 signaux qui ne devraient pas apparaitre après implémentation de la condition sur pivot (2 signaux haussiers et 1 signal baissier. Voir histogrammes au dessus du graphique Mn5). Je ne comprends pas ou est le bug dans le code ? merci d’avance. Code ci-après
atr10=averagetruerange[10]
//point pivot en UT 1 heure
timeframe(1 hour,updateonclose)
PivotH1 = (High[1] + Low[1] + Close[1] + Open[0])/4
once histoup = 0
once histodown = 0
once histoupconti = 0
once histodownconti = 0
timeframe(default)
If Low[0]<ExponentialAverage[7] and High[0]>ExponentialAverage[7] and close>PivotH1 and close>open then
DRAWARROWDOWN(barindex[0],low+atr10/2) coloured(255,0,0)
histoup=1
else
histoup=0
endif
timeframe(default)
If High[0]>ExponentialAverage[7] and High[0]>ExponentialAverage[20] and close<PivotH1 and close<open then
DRAWARROWDOWN(barindex[0],low+atr10/2) coloured(255,0,0)
histodown=-1
else
histodown=0
endif
return histoup coloured(127,255,0) style(histogram), histodown coloured(255,0,0) style(histogram), histoupconti coloured (0,255,255) style(histogram), histodownconti coloured (255,0,255) style(histogram), 0 as “0”