Ichimoku chart modification

Dear Members , I am new to this forum .... i am using Amibroker 5.6 vertion
i am using Ichimoku Trading Method ...
i want some AFL code help from members ....

Details i am posting in chart ..
please click on Ichimoku chart for details ...

please click on above given chart link .... and after open chart ...for better view please click on that chart ....

Thank you very much ....

1 Like

@C_RMS73 you have not included your code so how can anyone help you alter it? But more importantly, you have not included your attempts at coding a solution and then asking for help.

This forum has many helpful members but they tend to want to see you make an effort at solving your problem and then asking for help to make corrections to your efforts. If you just throw out a problem and say “hey you guys spend your free time working on a solution for me and I will not make any effort myself” then your request will likely go unanswered.


AmiBroker 5.6? Hasn’t he said he was new?

I guess he mentioned like new to the forum.

Ichimoku AFL

TenkanPer = Param("Tenkan-Sen Period",8,1,100,1);
TenkanCol = ParamColor("Tenkan-Sen Color",colorRed);
TenkanSty = ParamStyle("Tenkan-Sen Style",styleLine | styleThick);
Tenkan = ( HHV(H,TenkanPer) + LLV(L,TenkanPer) ) / 2;
KijunPer = Param("Kijun-Sen Period",21,1,100,1);
KijunCol = ParamColor("Kijun-Sen Color",colorBlue);
KijunSty = ParamStyle("Kijun-Sen Style",styleLine | styleThick);
Kijun = ( HHV(H,KijunPer) + LLV(L,KijunPer) ) / 2;
_SECTION_BEGIN("Chikou Span");
ChikouShft = Param("Chikou Span Shift",21,1,100,1);
ChikouCol = ParamColor("Chikou Span Color",colorViolet);
ChikouSty = ParamStyle("Chikou Span Style",styleLine | styleNoLabel);
Chikou = C;
SenkouKumoShft = Param("Senkou-Kumo Shift",21,0,100,1);
_SECTION_BEGIN("Senkou Span A");
SenkouACol = ParamColor("Senkou Span A Color",colorSeaGreen);
SenkouASty = ParamStyle("Senkou Span A Style",styleLine);
SenkouA = ( Tenkan + Kijun ) / 2;
Plot(SenkouA,"Senkou A",SenkouACol,SenkouASty,Null,Null,SenkouKumoShft) ;
_SECTION_BEGIN("Senkou Span B");
SenkouBPer = Param("Senkou Span B Period",42,1,200,1);
SenkouBCol = ParamColor("Senkou Span B Color",colorPink);
SenkouBSty = ParamStyle("Senkou Span B Style",styleLine);
SenkouB = ( HHV(H,SenkouBPer) + LLV(L,SenkouBPer) ) / 2;
Plot(SenkouB,"Senkou B",SenkouBCol,SenkouBSty,Null,Null,SenkouKumoShft) ;
KumoUpCol = ParamColor("Kumo UP Color",colorSeaGreen);
KumoDnCol = ParamColor("Kumo DN Color",colorPink);
PlotOHLC(SenkouA,SenkouA,SenkouB,SenkouB,"",IIf(SenkouA>SenkouB,KumoUpCol,KumoDnCol),styleCloud | styleNoLabel,Null,Null,SenkouKumoShft);

1 Like

Sorry for digging this old thread. I've an issue in displaying the kumo. With this code leading kumo is partially visible as the number of bars on the right are less then the actual senkoukumoshift value. Any clues how to fix this ?



Just add some additional blank bars:


Thanks a ton @beppe

Works like a charm :wink:

could you please provide the full code after the amendment?

In fact , I did not get how to carry out the amendment as suggested by @beppe.

Hi @santy,

Kindly find my code below. As far as the original question goes you can keep pressing the END key to add more margin on the right to view the leading Senkou Span.

Alternatively there is a setting in Tools > Preferences > Charting and adjust the "Blank Bars in the right margin" Setting.


// Parameters
tenkan_p = param("Tenkan-sen Period", 9, 2, 200, 1, 0);
tenkan_c = paramcolor("Tenkan-sen Color", colorblue);
tenkan_s = paramstyle("Tenkan-sen Style", styleline | stylethick);

kijun_p = param("Kijun-sen Period", 26, 2, 200, 1, 0);
kijun_c = paramcolor("Kijun-sen Color", colorred);
kijun_s = paramstyle("Kijun-sen Style", styleline | stylethick);

senkou_a_c = paramcolor("Senkou Span A Color", colorbrightgreen);
senkou_a_s = paramstyle("Senkou Span A Style", styleline | stylethick);

senkou_b_p = param("Senkou Span B Period", 52, 2, 200, 1, 0);
senkou_b_c = paramcolor("Senkou Span B Color", colorpink);
senkou_b_s = paramstyle("Senkou Span B Style", styleline | stylethick);

senkou_p = param("Sekou Displacement", 26, 0, 200, 1, 0);

kumo_a_c = paramcolor("Kumo A Color", colorblend(senkou_a_c, colorwhite, 0.6));
kumo_b_c = paramcolor("Kumo B Color", colorblend(senkou_b_c, colorwhite, 0.4));
kumo_s = paramstyle("Kumo Style", stylecloud, stylecloud);

chikou_p = param("Chikou Displacement (-ve)", 26, 2, 200, 1, 0);
chikou_c = paramcolor("Lagging Color", colorgreen);
chikou_s = paramstyle("Lagging Style", styleline | stylethick);
chikou_p *= -1;

// Calculations
tenkan_a = (hhv(h, tenkan_p) + llv(l, tenkan_p)) / 2;
kijun_a = (hhv(h, kijun_p) + llv(l, kijun_p)) / 2;
senkou_a_a = (tenkan_a + kijun_a) / 2;
senkou_b_a = (hhv(h, senkou_b_p) + llv(l, senkou_b_p)) / 2;
chikou_a = c;
kumo_c = iif(senkou_a_a > senkou_b_a, kumo_a_c, kumo_b_c);

// Plots
plot(tenkan_a,"Tenkan-sen", tenkan_c, tenkan_s);
plot(kijun_a, "Kijun-sen", kijun_c, kijun_s);
plot(senkou_a_a, "Senkou Span A", senkou_a_c, senkou_a_s, 0, 0, senkou_p);
plot(senkou_b_a, "Senkou Span B", senkou_b_c, senkou_b_s, 0, 0, senkou_p);
plot(c, "Chikou Span", chikou_c, chikou_s, 0, 0, chikou_p);
plotohlc(senkou_a_a, senkou_a_a, senkou_b_a, senkou_b_a, "Kumo", kumo_c, kumo_s, 0, 0, senkou_p);




Thanks for your help and quick reply.