Hey everybody,
I try to move the Ichimoku future cloud to the left, so that the future cloud is directly under the latest candle.
Normaly the Ichimoku cloud is 26 periods in the future. I want it 0 periods in the future. Is that possible?
In the “normal” PRT-indikator Ichimoku I can not find any possibility the move the cloud.
I took the code from Nicolas for the Ichimoku, but there is some different problem. I dont see the future cloud …
Can anyone help me to move the future cloud under the last candle?
Ichimoku Code from Nicolas
p1=9
p2=26
p4=26
p3=52
REM Tenkan-Sen = (Highest High + Lowest Low) / 2, for the past 9 days
Upper1 = HIGHEST[p1](HIGH)
Lower1 = LOWEST[p1](LOW)
Tenkan = (Upper1 + Lower1) / 2
REM Kijun-Sen = (Highest High + Lowest Low) / 2, for the past 26 days
Upper2 = HIGHEST[p2](HIGH)
Lower2 = LOWEST[p2](LOW)
Kijun = (Upper2 + Lower2) / 2
REM Senkou Span A = (Tenkan + Kijun) / 2, plotted 26 days ahead of today
SpanA = (Tenkan[p4] + Kijun[p4]) / 2
REM Senkou Span B = (Highest High + Lowest Low) / 2, for the past 52 days, plotted 26 days ahead of today
SpanB = ((HIGHEST[p3](HIGH[p4])) + LOWEST[p3](LOW[p4])) / 2
//plot chikou in the past:
drawtext("♥",barindex[26],close) coloured(255,0,0)
Return SpanA AS "Span A" , SpanB AS "Span B", Tenkan, Kijun
Thank you Brisvegas!!
Can you tell me how to get the indicator directly into the window with the chart?
I have the Ichimoku now in a separate window.
@Danielbanker. Would it be possible for you to post the final code? Thank you
Ofcourse! It’s this one:
p1=9
p2=26
p4=0
p3=52
REM Tenkan-Sen = (Highest High + Lowest Low) / 2, for the past 9 days
Upper1 = HIGHEST[p1](HIGH)
Lower1 = LOWEST[p1](LOW)
Tenkan = (Upper1 + Lower1) / 2
REM Kijun-Sen = (Highest High + Lowest Low) / 2, for the past 26 days
Upper2 = HIGHEST[p2](HIGH)
Lower2 = LOWEST[p2](LOW)
Kijun = (Upper2 + Lower2) / 2
REM Senkou Span A = (Tenkan + Kijun) / 2, plotted 26 days ahead of today
SpanA = (Tenkan[p4] + Kijun[p4]) / 2
REM Senkou Span B = (Highest High + Lowest Low) / 2, for the past 52 days, plotted 26 days ahead of today
SpanB = ((HIGHEST[p3](HIGH[p4])) + LOWEST[p3](LOW[p4])) / 2
//plot chikou in the past:
//drawtext("♥",barindex[26],close) coloured(255,0,0)
Return SpanA AS "Span A" , SpanB AS "Span B", Tenkan, Kijun