// Downloaded From https://www.WiseStockTrader.com ////////Start of AFL///////// /* A bullish Signal occurs when the Tenkan-Sen (RED line) crosses the Kijun-Sen (BLUE line) from below. Conversely, a bearish Signal is issued when the Tenkan-Sen crosses the Kijun-Sen from above. Support AND resistance levels are shown as Kumo (OR clouds). The Kumo can also be used to help identify the prevailing trend of the market. if the price line is above the Kumo, the prevailing trend is said to be up, while if the price is below the Kumo, the prevailing trend is said to be down. The default colour here for the clouds is light blue - but the hue, etc, parameters can be adjusted to suit the user's display. The theory is that the bullish signals are strong when the TL,SL Cross occurs above the cloud; it is medium within the cloud, AND weak if it occurs below the cloud. These are shown here as green solid up arrows, Conversely, the bearish signals are said to be strong when the Cross is below the cloud AND weak when above. These signals are plotted as down red arrows OR triangles, OR brown hollw down arrows. As an attempt at clarity on a cluttered Plot, all Signal arrows, etc are plotted within the clouds (rather than near the candles as is normal). The user can also toggle between a candle Plot OR a line Plot of the Close price, to reduce the clutter somewhat. A final feature of the Ichimoku chart is the VIOLET line, OR Chikou Span (OR Lagging Span). It is said that this line indicates the strength of the Buy OR Sell Signal. if the Chikou Span is below the closing price AND a Sell Signal occurs, then the strength is with sellers, otherwise it is a weak Sell Signal. Conversely, if a Buy Signal occurs AND the Chikou Span is above the price, then there is strength to the upside. These considerations could be coupled with the other signals, if desired, but this has NOT been done here. Final Comment: This program produces quite a pretty graph - but I have NOT so far been impressed with the signals! I have seen many weak signals followed by strong moves AND strong signals followed by weak moves. Typical of technical analysis I guess. if anyone finds the Ichimoku approach useful I would be keen to hear about it. */ SL = ( HHV( H, 26 ) + LLV( L, 26) )/2;// standard, base, or kijun-sen line TL = ( HHV( H, 9 ) + LLV( L, 9 ) )/2;// turning, conversion, or tenkan-senline DL = Ref( C, 25 ); // delayed close price, or chikou span Span1 = Ref( ( SL + TL )/2, -25 ); //Span1 and Span2 define the clouds Span2 = Ref( (HHV( H, 52) + LLV(L, 52))/2, -25); CStyle = ParamToggle("Showcandles?","N|Y");//Choose Candle or Line for Price Plot //hue = Param("Hue",140,0,255,1); //sat = Param("Sat",100,0,255,1); //bri = Param("bri",220,0,255,1); hue = Param("Hue",10,0,255,1); sat = Param("Sat",10,0,255,1); bri = Param("bri",20,0,255,1); MaxGraph = 8; Refline = (Span1 + Span2)/2; Graph0 = Refline; Graph0Style = 16;//No line plotted, used as a reference line for arrows etc. if(Cstyle ) Plot(C,"Price",colorBlack,styleCandle); else PlotOHLC(O,H,L,C,"Price",IIf(C>O,colorGreen,colorRed),styleCandle); //Plot(Close,"Close",colorBlack,styleThick); Plot(SL,"SL",colorBlue,styleThick); Plot(TL,"TL",colorRed,styleThick); Plot(DL,"DL",colorViolet,styleLine); PlotOHLC(Span1,Span1,Span2,Span2,"Cloud",ColorHSB(Hue,sat,bri),styleCloud); above = IIf(TL>Span1 AND TL>Span2,1,0); within = IIf((TL>Span1 AND TLSpan2) ,1,0); below = IIf(TL