Bonjour à tous
Je tente de me créer un indicateur qui me colore les bougies en fonction de la position de close par rapport a son positionnement par rapport a 2 moyennes mobiles mais aussi en fonction des positions de cette même moyenne mobiles
Ce sont mes conditions en C1,C2 , ….C6
Et avoir une couleur différentes pour chaque condition
Ci dessous je que j’ai tenté de faire, mais cela ne fonctionne pas, j’ai déjà une erreur au niveau des conditions.
Merci de me donner un coup de main a modifier ce code pour le rendre fonctionnel ?
Merci
Colour = 0
a = average[50]
b = average[200]
c1 = close > a > b
c2 = a > close > b
c3 = a > b > close
c4 = b > a > close
c5 = b > close > a
c6 = close > b > a
if c1 Then
DRAWCANDLE(open, high, low, close)COLOURED(0,255,0)//vert
colour=1
elsif c2 then
DRAWCANDLE(open, high, low, close)COLOURED(255,255,0)//jaune
colour=2
elsif c3 then
DRAWCANDLE(open, high, low, close)COLOURED(253,63,146)//rose
colour=3
elsif c4 then
DRAWCANDLE(open, high, low, close)COLOURED(255,0,0)//rouge
colour=4
elsif c5 then
DRAWCANDLE(open, high, low, close)COLOURED(37,253,233)//bleu cyan
colour=5
elsif c6 then
DRAWCANDLE(open, high, low, close)COLOURED(121,28,248)//bleu
colour=6
endif
RETURN colour