Skip to main content

Posts

Showing posts from December, 2017

52 weeks high momentum strategy.

52 weeks high momentum strategy. (FTWHMS) Strategy is to buy stocks which have closed at 52 weeks high and which has the characteristics of a possible bullish run identified by momentum indicators like RS and RSI. Volumes and key MAs are also used as important indicators to figure out the stocks. Exploration can be used to filter stocks and can be sorted based on momentum scores in descending order. Momenutm scores are a function of relative strength and price change with respect to 12 periods back. The top 5 stocks can be explored further for investments. This is a long only strategy. Weekly chart gives better results than daily charts. I am posting the AFL code for the above strategy , a sample chart screenshot and the last 7 years backtesting results on weekly charts of nse listed stocks. Though backtesting result appears faily decent I am not commenting anything further on it as the result does not guarantee any future returns. Please note to us...

z Signals

//Dummy system to generate some signals (Do NOT trade!) Short = Cover = 0; ZC = Zig(C,1); Buy = T1 = Ref(ZC,1)>ZC; Sell = T1 = Ref(ZC,1)<ZC; BuyPrice = ZC; SellPrice = ZC; Equity(1); // plotting prices at the correct level Plot(C,"Close",colorBlack,styleBar); PlotShapes( IIf(Buy, shapeSmallCircle, shapeNone),colorBrightGreen, 0, BuyPrice, 0 ); PlotShapes( IIf( Sell, shapeSmallCircle, shapeNone),colorRed, 0 ,SellPrice, 0 ); FirstVisibleBar = Status( "FirstVisibleBar" ); Lastvisiblebar = Status("LastVisibleBar"); for( b = Firstvisiblebar; b <= Lastvisiblebar AND b < BarCount; b++) { if( Buy[b] ) PlotText("\n Buy\n "+NumToStr(BuyPrice[b],1.2),b,BuyPrice[b],colorWhite); else if( Sell[b] ) PlotText("\n Sell\n "+NumToStr(SellPrice[b],1.2),b,SellPrice[b],colorYellow); }

Wilders Psar Supertrend Intraday

PM1 = Param("MA1",7.5,1,1500,1); PM2 = Param("MA2",11,1,1500,1); M1 = Wilders(Close,PM1); M2 = Wilders(Close,PM2); A = Cross(M1,M2); B = Cross(M2,M1); Hor1=Param(" LEFT/RIGHT",1,1,1660,1); Ver1=Param(" UP DOWN",35,1,830,1); FS1=Param(" Font Size",15,11,100,1); GfxSelectFont("Tahoma", FS1, 200 ); GfxSetBkColor(colorBlack); GfxSetTextColor(colorGold); //GfxTextOut("EMA "+ PM1 + " "+ Prec(M1,2),Hor1,Ver1); GfxSetTextColor(colorGreen); //GfxTextOut("EMA "+ PM2 + " "+ Prec(M2,2),Hor1,Ver1+25); Plot(M1," EMA: "+pm1,ParamColor("FAST EMA COLOR",colorBrightGreen)); Plot(M2," EMA: "+pm2,ParamColor("SLOW EMA COLOR",colorRed)); PlotShapes(IIf(A,shapeUpArrow,shapeNone),colorBrightGreen,0,L,Offset= -30); PlotShapes(IIf(B,shapeDownArrow,shapeNone),colorRed,0,H,Offset = -30); Filter = (A == 1) OR (B == 1); AddColumn(A,"BUY/SELL",1,IIf(A,colorGreen,color...

Wilders Most Succesful Intraday Intraday

PM1 = Param("MA1",7.5,1,1500,1); PM2 = Param("MA2",11,1,1500,1); M1 = Wilders(Close,PM1); M2 = Wilders(Close,PM2); A = Cross(M1,M2); B = Cross(M2,M1); Hor1=Param(" LEFT/RIGHT",1,1,1660,1); Ver1=Param(" UP DOWN",35,1,830,1); FS1=Param(" Font Size",15,11,100,1); GfxSelectFont("Tahoma", FS1, 200 ); GfxSetBkColor(colorBlack); GfxSetTextColor(colorGold); //GfxTextOut("EMA "+ PM1 + " "+ Prec(M1,2),Hor1,Ver1); GfxSetTextColor(colorGreen); //GfxTextOut("EMA "+ PM2 + " "+ Prec(M2,2),Hor1,Ver1+25); Plot(M1," EMA: "+pm1,ParamColor("FAST EMA COLOR",colorBrightGreen)); Plot(M2," EMA: "+pm2,ParamColor("SLOW EMA COLOR",colorRed)); PlotShapes(IIf(A,shapeUpArrow,shapeNone),colorBrightGreen,0,L,Offset= -30); PlotShapes(IIf(B,shapeDownArrow,shapeNone),colorRed,0,H,Offset = -30); Filter = (A == 1) OR (B == 1); AddColumn(A,"BUY/SELL",1,IIf(A,colorGreen,c...

All in 1

//Faulal _SECTION_BEGIN( "Chart Settings" ); SetChartOptions( 0, chartShowArrows | chartShowDates ); SetChartBkColor( ParamColor( "Outer Panel", colorPaleBlue ) ); SetChartBkGradientFill( ParamColor( "Upper Chart", 1 ), ParamColor( "Lower Chart", 23 ) ); _SECTION_END(); _SECTION_BEGIN( "Pilihan Charts" ); TSFC = ParamToggle( "TSFC", "Hide|Show", 0 ); TREND = ParamToggle( "TREND", "Hide|Show", 0 ); CHART = ParamToggle( "CHART", "Hide|Show", 0 ); SR = ParamToggle( "SR" , "Hide|Show", 0 ); SILVER = ParamToggle( "SILVER", "Hide|Show", 0 ); NICK_MA = ParamToggle( "NICK_MA", "Hide|Show", 0 ); ZIGZAG = ParamToggle( "ZIGZAG", "Hide|Show", 0 ); STREND = ParamToggle( "SUPER TREND", "Hide|Show", 0 ); TSR = ParamToggle( "TSR", "Hide|Show", 0 ); BOLLINGER = ParamTogg...