// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("Stochastic Slow"); periods = Param( "Periods", 20, 1, 200, 1 ); Ksmooth = Param( "%K avg", 12, 1, 200, 1 ); Plot( StochK( periods , Ksmooth), "%K"+_PARAM_VALUES(), ParamColor( "%K color", colorCycle ), ParamStyle("%K style") ); K = StochK( periods , Ksmooth); Dsmooth = Param( "%D avg", 10, 1, 200, 1 ); Plot( StochD( periods , Ksmooth, DSmooth ), "%D"+_PARAM_VALUES(), ParamColor( "%D color", colorCycle ), ParamStyle("%D style",styleDashed) ); D = StochD( periods , Ksmooth, DSmooth ); y0=LastValue(Trough(StochD(periods , Ksmooth, DSmooth ),1,2)); y1=LastValue(Trough(StochD(periods , Ksmooth, DSmooth ),1,1)); x0=BarCount - 1 - LastValue(TroughBars(StochD(periods , Ksmooth, DSmooth ),1,2)); price_start=Close[x0]; x1=BarCount - 1 - LastValue(TroughBars(StochD(periods , Ksmooth, DSmooth ),1,1)); price_end=Close[x1]; Line = LineArray( x0, y0, x1, y1, 0 ); Plot( Line, "Support line", colorYellow ); Buy = y1>y0 AND price_endprice_start1; //PlotShapes(shapeSmallCircle * Sell, colorRed,0,Line); PlotShapes(shapeDownTriangle * Sell, colorRed,0,LastPointSell); AlertIf(Sell,"","",2); _SECTION_END(); _SECTION_BEGIN("ZIG-ZAG"); P = ParamField( "ZIG Price field" ); change = Param("% change",1,0.1,25,0.1); Plot( Zig(P, change), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("style",styleOwnScale) ); _SECTION_END();