Can help me with this ichimoku afl code

Hello World!
I have some issue to debug this afl code because lagging line in this code only display {EMPTY} in the chart, can you fix or debug that.
This is the code
Ichimoku
P1 = Param("Conversion Period", 9, 2, 200, 1, 0);
C1 = ParamColor("Conversion Color", colorBlue);
CL = (HHV(H,P1)+LLV(L,P1))/2;

P2 = Param("Base Period", 26, 2, 200, 1, 0);
C2 = ParamColor("Base Color", colorRed);
BL = (HHV(H,P2)+LLV(L,P2))/2;

C3 = ParamColor("Leading A Color", colorBrightGreen);
LSA = (CL+BL)/2;

P4 = Param("Leading B Span", 52, 2, 200, 1, 0);
C4 = ParamColor("Leading B Color", colorPink);
LSB = (HHV(H,P4)+LLV(L,P4))/2;

P3 = Param("Leading Span Displacement", 26, 2, 200, 1, 0);

P5 = Param("Lagging Displacement", -26, 2, 200, 1, 0);
C5 = ParamColor("Lagging Color", colorGreen);

Plot(CL,"Tenkan-sen (Conversion Line)", C1, styleLine);
Plot(BL, "Kijun-sen (Base Line)", C2, styleLine);
Plot(LSA, "Senkou Span A (Leading Span A)", C3, styleLine, 0, 0, P3);
Plot(LSB, "Senkou Span B (Leading Span B)", C4, styleLine, 0, 0, P3);
Plot(C, "Chikou Span (Lagging Span)", C5, styleLine, 0, 0, P5);
PlotOHLC (LSA,LSA,LSB,LSB,"Cloud",IIf(LSA>LSB,ColorBlend(C3, colorWhite, 0.6),
ColorBlend(C4,colorWhite, 0.4)),styleCloud, 0, 0, P3);

@sopiansahrin, please, take a look at this previous thread.
I think it will help you understand what's going on.

Thank you for the response, and then I can fix that problem,..

Untitled

And now how to make ichimoku chart title appear below the price chart title, not beside the price chart title..
can you help me or have a reference about how to modify chart title..

1 Like

See here for example on modifying Title.

1 Like

Thank you..
god bless you

Why do people thank other people posting links but not the ones who took time creating linked post?
I never understood that. Similar for people copy&pasting code from other sources and then saying "Here is my code". Weird Internet logic. It probably requires some higher God like intellect I do not have to understand. :woozy_face:

2 Likes

Thank you for that critical...

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.