This ProBuilder code snippet demonstrates how to extend the Senkou Span A and Senkou Span B lines of the Ichimoku Kinko Hyo indicator into the future of a chart. This is particularly useful for visualizing potential support and resistance areas ahead of the current price.
defparam drawonlastbaronly=true
ssa = SenkouSpanA[9,26,52]
ssb = SenkouSpanB[9,26,52]
//--- ichimoku parameters
p1=9
p2=26
p3=52
p4=0
// --- tenkan=(highest[p1](high)+lowest[p1](low))/2
kijun=(highest[p2](high)+lowest[p2](low))/2
SpanA=(tenkan[p4]+kijun[p4])/2
SpanB=(highest[p3](high[p4])+lowest[p3](low[p4]))/2
if islastbarupdate then
for i = 1 to 26 do
drawsegment(barindex+i,spana[26-i],barindex+i-1,spana[26-i+1])
drawsegment(barindex+i,spanb[26-i],barindex+i-1,spanb[26-i+1])
next
endif
return ssa,ssb
The code snippet above is structured to perform the following operations:
This technique is useful for traders and analysts who use the Ichimoku Kinko Hyo method for trend identification and to gauge future areas of support and resistance on a chart.
Check out this related content for more information:
https://www.prorealcode.com/topic/projection-de-senkou-span-a-ssa/#post-216497
Visit Link