Tiens, essayes ça et dis moi si ça marche comme tu veux
// HEIKIN ASHI TRANSPARENTS ROBERTO V1 25.01.2022
// cul plat Nicolas 07.01.2022
defparam CALCULATEONLASTBARS = 1000
baseUP=0
baseDN=100
xClose = (open+high+low+close)/4
IF BarIndex=0 THEN
xOpen = open
xHigh = high
xLow = low
ELSe
xOpen = (xOpen[1] + xClose[1])/2
xHigh = Max(Max(high, xOpen), xClose)
xLow = Min(Min(low, xOpen), xClose)
ENDIF
green = xopen<xclose and xlow=xopen
red = xopen>xclose and xhigh=xopen
greensum = summation[5](xClose > xOpen) = 5
redsum = summation[5](xClose < xOpen) = 5
////////////////////////////////////////////////////
if green and not green[1] then
lastpointx = 1
IF lastpointx <> lastpointx[1] THEN
drawpoint(barindex,baseUP,5) coloured (9,82,40,255) // green
ENDIF
elsif red and not red[1] then
lastpointx = 2
IF lastpointx <> lastpointx[1] THEN
drawpoint(barindex,baseDN,5) coloured(200,0,0,255)// red
ENDIF
endif
/////////////////////////////////////////////////OK
if green > green [1] then
lastpointy = 1
IF lastpointy <> lastpointy[1] THEN
drawpoint(barindex,baseUP,3) coloured (255,255,240)// Ivoire
ENDIF
elsif red > red [1] then
lastpointy = 2
IF lastpointy <> lastpointy[1] THEN
drawpoint(barindex,baseDN,3) coloured (255,255,240)// Ivoire
ENDIF
endif
iRSI = RSI[14](close)
//IF close > open THEN
//if greensum then //green > green [1] then
//DrawCandle(xOpen,xHigh,xLow,xClose) coloured(0,255,0,0) //bordercolor(6,43,22) // vert clair bordure vert foncé
////ELSE
//elsif redsum then //red > red [1] then
//DrawCandle(xOpen,xHigh,xLow,xClose) coloured(255,0,255,0) //bordercolor(255,0,0) // rose magenta bordure rouge
//ENDIF
//DRAWPOINT(barindex, close, 2) coloured(255,0,0)
RETURN iRSI, 0, 100