je pense que c'est cela que tu désires
IF barindex = 0 THEN
initialization = 2
lineR3 = undefined
lineR2 = undefined
lineR1 = undefined
linePP = undefined
lineS1 = undefined
lineS2 = undefined
lineS3 = undefined
ELSE
IF hour[1] <> hour THEN
prevmax = newmax
prevmin = newmin
prevclose = newclose
newmax = high
newmin = low
newclose = close
initialization = max(0, initialization - 1)
ELSE
newmax = MAX(newmax, high)
newmin = MIN(newmin, low)
newclose = close
IF initialization = 0 THEN
pivot = (prevmax + prevmin + prevclose) / 3
lineR2 = pivot + (prevmax - prevmin)
lineR1 = (2 * pivot) - prevmin
lineR3 = lineR1 + (prevmax - prevmin)
linePP = pivot
lineS1 = (2 * pivot) - prevmax
lineS2 = pivot - (prevmax - prevmin)
lineS3 = lineS1 - (prevmax - prevmin)
ENDIF
ENDIF
ENDIF
return lineR3 coloured(0,102,0) AS "R3-60", lineR2 coloured(0,204,0) AS "R2-60", lineR1 coloured(51,255,51) AS "R1-60", linePP coloured(0,0,255) AS "PP-60", lineS1 coloured(255,153,204) AS "S1-60", lineS2 coloured(204,102,0) AS "S2-60", lineS3 coloured(255,0,51) AS "S3-60"