timeframe(60 minutes, updateonclose)
once indH = 0
once indvH = 0
supportH, resistanceH, lasthighH, lastlowH = CALL "K-ZONES"
$resistanceH[indvH] = resistanceH
$lasthighH[indvH] = lasthighH
indvH = indvH +1
$supportH[indH] = supportH
$lastlowH[indH] = lastlowH
indH = indH +1
timeframe(30 minutes, updateonclose)
once indM30 = 0
once indvM30 = 0
supportM30, resistanceM30, lasthighM30, lastlowM30 = CALL "K-ZONES"
$resistanceM30[indvM30] = resistanceM30
$lasthighM30[indvM30] = lasthighM30
indvM30 = indvM30 +1
$supportM30[indM30] = supportM30
$lastlowM30[indM30] = lastlowM30
indM30 = indM30 +1
timeframe(default)
if indM30 >0 and islastbarupdate then
for j = 0 to indM30
haut = $supportM30[j]
bas = $lastlowM30[j]
DrawText("#haut# (ZONE M30)",barindex+50,$supportM30[j],SansSerif,Standard,10)coloured(102,102,102)
DrawText("#bas# (ZONE M30)",barindex+50,$lastlowM30[j],SansSerif,Standard,10)coloured(102,102,102)
if close > $supportM30[j] then
drawrectangle(barindex,$supportM30[j],barindex - 300,$lastlowM30[j]) coloured(0,255,0,50) bordercolor(0,150,150,70)
else
drawrectangle(barindex,$supportM30[j],barindex - 300,$lastlowM30[j]) coloured(255,0,0,50) bordercolor(0,150,150,70)
endif
next
endif
if indH >0 and islastbarupdate then
for i = 0 to indH
haut = $supportH[i]
bas = $lastlowH[i]
DrawText("#haut# (ZONE H1)",barindex+50,$supportH[i],SansSerif,Standard,10)coloured(102,102,102)
DrawText("#bas# (ZONE H1)",barindex+50,$lastlowH[i],SansSerif,Standard,10)coloured(102,102,102)
if close > $supportH[i] then
drawrectangle(barindex,$supportH[i],barindex - 300,$lastlowH[i]) coloured(0,15,0,50) bordercolor(0,150,150,70)
else
drawrectangle(barindex,$supportH[i],barindex - 300,$lastlowH[i]) coloured(15,0,0,50) bordercolor(0,150,150,70)
endif
next
endif