Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Fractal Price with TSF for Amibroker (AFL)
Hi,
This AFL tracks the Closing Price using fractal for easy visualization. The Time Series Forecast provided prediction for next day trend.
Similar Indicators / Formulas
Indicator / Formula
_SECTION_BEGIN("Background_Setting"); SetChartBkGradientFill( ParamColor("BgTop", colorBlack), ParamColor("BgBottom", colorBlack),ParamColor("titleblock",colorDarkTeal )); _SECTION_END(); _SECTION_BEGIN("Price Fractal"); Plot( C, "Close", ParamColor("Color", colorGreen ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); _SECTION_END (); _SECTION_BEGIN("Fractal"); UpFractal= ValueWhen( (Ref(H,-2) >= Ref(H, -3)) AND (Ref(H,-2) >= Ref(H, -1)) AND (Ref(H,-2) >= H), Ref(H,-2)); DownFractal= ValueWhen( (Ref(L,-3) <= Ref(L, -4)) AND (Ref(L,-3) <= Ref(L, -2)) AND (Ref(L,-3) <= Ref(L, -1)) AND (Ref(L,-3) <= L), Ref(L,-3)); //tick tick=IIf( C<=200,1, IIf(C>=200 AND C<=500,5, IIf(C>=500 AND C<=2000,10, IIf(C>=2000 AND C<=5000,25, IIf(C>5000,50,0))) )); Plot(Ref(UpFractal, 2), "Up Fractal", ParamColor("resistance",colorBlue), ParamStyle("Up Fractal Style", styleLine|styleNoTitle)); Plot(Ref(DownFractaL,3), "Down Fractal",ParamColor("suport",colorRed), ParamStyle("Down Fractal Style", styleLine|styleNoTitle)); SetChartOptions( 0,chartShowArrows|chartShowDates ); Title = EncodeColor( colorGrey50) + Name()+ " "+Date()+ " O " + "= "+O+ " H "+"= "+H+ " L "+"= "+L+ " C "+"= "+C+ " Change "+"= "+ WriteVal(ROC( C,1),1.2) + " % "; _SECTION_END( ); _SECTION_BEGIN ("Time Series"); Ts = Param("Length",5, 2, 100, 1); TSFtrend = TSF (Close, Ts); //SetChartOptions(1,chartShowArrows | chartShowDates); Plot( TSFtrend, "Time Series Forecast", colorYellow, styleLine, Null, Null, 0, 2); TSFdir = LastValue (ROC (TSFtrend, 2, 0)); //WriteVal(TSFtrend,1.20); printf("TSF ROC = " + WriteVal( ROC(TSFtrend,2,0), 1.2)); _N(Title = Title + WriteIf(TSFdir > 0, EncodeColor (colorAqua), EncodeColor(colorOrange)) + "\n\nTime Series Forcast ROC= " + WriteVal ( TSFdir, 1.2)); _SECTION_END ();
2 comments
Leave Comment
Please login here to leave a comment.
Back
error on line 57
please replace line 57 by the following :
Plot( TSFtrend, “Time Series Forecast”, colorYellow, styleLine, Null, Null,2);