Writing the Ichimoku indicator..
Forums › ProRealTime English forum › ProBuilder support › Writing the Ichimoku indicator..
- This topic has 36 replies, 7 voices, and was last updated 4 years ago by snucke.
-
-
10/02/2017 at 5:55 PM #48042
“Houston we have a problem..” 🙂
Nicolas, please help me! I’m going crazy with prt! 😀
with CS[26]
123456I = 26 //Chikou-Span Period (26)CS = close[I] //Chikou-SpanprezzoCSHigh= high[26]GRAPH CS[26] coloured(0,255,0) AS "CS26"GRAPH prezzoCSHigh coloured(0,0,255) AS "prezzoCSHigh"with CS[0]
123456I = 26 //Chikou-Span Period (26)CS = close[I] //Chikou-SpanprezzoCSHigh= high[26]GRAPH CS[0] coloured(0,255,0) AS "CS26"GRAPH prezzoCSHigh coloured(0,0,255) AS "prezzoCSHigh"The only solution that works..
1234prezzoCSHigh= high[26]CS = close[0]GRAPH CS[0] coloured(0,255,0) AS "CS26"GRAPH prezzoCSHigh coloured(0,0,255) AS "prezzoCSHigh"redefining the function..
10/02/2017 at 6:22 PM #4804910/02/2017 at 6:28 PM #4805303/26/2019 at 11:05 AM #94712The Chikou is the actual Close (the one from the current period), but it is plotted 26 bars in the past, that’s all. It is not possible to draw a curve in the past, you can try with dots or any ASCII char, but that’s not so important since you only want to get the good values for your strategy.
If this may still be of any help. Actually it is possible to use DRAWSEGMENT to link different points to achieve plotting CHIKOU like PRT do (still you cannot plot in the future), replace the DRAWTEXT line (line 23) with:
1drawsegment(barindex[26],close,barindex[27],close[1]) coloured(139,69,19,255)07/23/2019 at 1:51 PM #103247Hello Can we get the filling of the cloud / kumo by something other than color (small dots or small dashes like Metatrader but if Nicolas wants to place small hearts why not, small $ could also be adequate 😉 Thank you in advance for your answer (s)
07/23/2019 at 1:57 PM #103251Please speak English on this forum! (I translated it)
Thank you.
07/23/2019 at 2:50 PM #10325907/23/2019 at 3:02 PM #103262Kumo filled with barcharts and color change according to SpanA and SpanB position:
12345678910111213141516171819202122232425262728293031p1=9p2=26p4=26p3=52REM Tenkan-Sen = (Highest High + Lowest Low) / 2, for the past 9 daysUpper1 = HIGHEST[p1](HIGH)Lower1 = LOWEST[p1](LOW)Tenkan = (Upper1 + Lower1) / 2REM Kijun-Sen = (Highest High + Lowest Low) / 2, for the past 26 daysUpper2 = HIGHEST[p2](HIGH)Lower2 = LOWEST[p2](LOW)Kijun = (Upper2 + Lower2) / 2REM Senkou Span A = (Tenkan + Kijun) / 2, plotted 26 days ahead of todaySpanA = (Tenkan[p4] + Kijun[p4]) / 2REM Senkou Span B = (Highest High + Lowest Low) / 2, for the past 52 days, plotted 26 days ahead of todaySpanB = ((HIGHEST[p3](HIGH[p4])) + LOWEST[p3](LOW[p4])) / 2//fill the cloudr=255g=0if spanA>spanb thenr=0g=255endifdrawbarchart(spana,spanb,spanb,spana)coloured(r,g,0)Return SpanA AS "Span A" , SpanB AS "Span B"1 user thanked author for this post.
08/13/2019 at 4:38 PM #104683Thanks for the code @Nicolas and the neat “fill cloud” option.
How do I add: Bold or style(dottedline,2) to the Draw text line, tried a few times but can’t figure it out.
Also how do IG get their charts to plot forward Kumo/Clouds? (Pls see white IG image.)
(Please ignore Ichimoku Orig image in black, I found out that Span B was incorrectly formulated hence the inconsistent Kumo’s between the code here and an earlier code I was using from this forum).
Cheers
Bard08/21/2019 at 10:20 AM #10517608/24/2019 at 11:55 AM #105432Hi @Nicolas, thanks for the Drawtext link. I got the bold, 2 to work but that removes the $ signs. I also can’t add the style, dotted line, tried all kinds of combinations with brackets, commas but no dottedline and dollar signs…
I wanted a dotted Chikou line with “$$” signs, yeah I know, I’ve got good taste, what can I say?
Tasteful Chikou Line12drawtext("$$",barindex[26],close) coloured(255,255,0) //plot Chikou in the pastdrawsegment(barindex[26],close,barindex[27],close[1]) coloured(255,255,0)Also this Ichimoku doesn’t have forward plotting Kumo clouds whereas the Ichimoku standard indicator does, but that code is hidden. What code in the standard indicator is exactly allowing that forward plotting to occur?
Cheers
08/26/2019 at 3:10 PM #105587There are no styles available for DRAWSEGMENT, still.
It is not possible to plot in the future of the chart since coordinates are made from BARINDEX which are still not present in the future! 😐
1 user thanked author for this post.
08/31/2019 at 3:21 PM #10601308/31/2019 at 4:22 PM #10602108/29/2020 at 6:36 AM #142878 -
AuthorPosts
Find exclusive trading pro-tools on