Bonjour,
Je cherche de l’aide car je suis un peu a cours d’idée : je cherche pour mon indicateur ichimoku de range a indiquer cette foi sles bornes de mon range par un rectangle, mais malheureusement je n’arrive pas a mettre de couleur au sein du rectangle.
Voici mon code :
Tenkansen1 = (highest[9](high)+lowest[9](low))/2
Kijunsen1 = (highest[26](high)+lowest[26](low))/2
SSpanA = (tenkansen1+kijunsen1)/2
SSpanB = (highest[52](high)+lowest[52](low))/2
// CROISEMENT SSA et SSB
TWIST=(SSpanA[1] < SSpanB[1] and SSpanA > SSpanB) or (SSpanA[1] > SSpanB[1] and SSpanA < SSpanB)
if inRange = 1 and (BorneSup < close or BorneInf > close) then
inRange=0
endif
if twist then
if SSpanB < close and SSpanB > SSpanA then
objectif = SSpanB - (close - SSpanB)
drawarrowdown(barindex,objectif) coloured(255,0,0)
drawsegment(barindex,objectif,barindex+26,objectif) coloured(255,0,0)
elsif SSpanB > close and SSpanB < SSpanA then
objectif = SSpanB + (SSpanB - close)
drawarrowup(barindex,objectif) coloured(0,255,0)
drawsegment(barindex,objectif,barindex+26,objectif) coloured(0,255,0)
endif
if inRange <> 1 then
inRange=1
rangeStart=barindex
BorneSup=highest[52](high)
BorneInf=lowest[52](low)
endif
endif
if PlusHautAvecMeche <> highest[52](high) and inRange <> 1 then
PlusHautAvecMeche=highest[52](high)
lastChangeHigh=barindex
endif
if PlusBasAvecMeche <> lowest[52](low) and inRange <> 1 then
PlusBasAvecMeche=lowest[52](low)
lastChangeLow=barindex
endif
if lastChangeLow > lastChangeHigh then
lastChange=lastChangeHigh
else
lastChange=lastChangeLow
endif
x=highest[52](close)
y=highest[52](open)
if (x>y) then
PlusHautSansMeche=x
else
PlusHautSansMeche=y
endif
x=lowest[52](close)
y=lowest[52](open)
if (x>y) then
PlusBasSansMeche=y
else
PlusBasSansMeche=x
endif
if inRange = 1 then
if rangeStart=barindex then
DRAWRECTANGLE(lastChange,BorneSup,barindex,BorneInf) coloured(0,0,200,100)
else
DRAWRECTANGLE(barindex-1,BorneSup,barindex,BorneInf) coloured(0,0,200,100)
endif
endif
return highest[52](high) coloured(245,182,66) AS "Ichimoku Highest",lowest[52](Low) coloured(245,182,66) AS "Ichimoku Lowest",PlusHautSansMeche coloured(245,182,66) as "Plus Haut Sans Meche", PlusBasSansMeche coloured(245,182,66) as "Plus Bas Sans Meche"