Here's one developed by Dimitris (Explortion). Let me know how it works for you.
Dick H. t=20;x=DEMA(StochD(40),t); tA=50;xA=DEMA(StochD(40),tA); Buy=Ref(x,-1)==LLV(x,3)AND (PDI (14)>MDI(14)); Plot(50*Buy,"Buy",colorBrightGreen,2); Sell=Ref(x,-1)==HHV(x,3)AND (PDI (14)<MDI(14)); Plot(50*Sell,"Sell",colorRed,2); k1=BarsSince(Buy); k2=BarsSince(Sell); Plot((k2>k1)*10,"K2>K1",colorBrightGreen,2); Plot((k2<k1)*10,"K2<K1",colorRed,2); Coeff=2; trendbars=20;// calibrate here the start of variable smoothing t1=IIf(k2>k1 AND k2>trendbars,t+coeff*k1,IIf(k1>k2 AND k1>trendbars,t+coeff*k2,t)); x1=DEMA(StochD(40),t1); Plot(x1,"X1",(x1>Ref(x1,-1))*colorBrightGreen+(x1<Ref(x1,-1))*colorRed,8); Plot(x,"X",colorBlack,8); GraphXSpace=2; Filter = C <15 AND C >2 AND Volume > 100000 AND C> Ref(C,-1)AND NOT (IndustryID() == 34 OR IndustryID() ==36); Result = WriteIf(Buy,"Buy","Sell"); AddTextColumn( WriteIf(Buy, "Buy" , "Sell" ) , "TRADE" , 5 , IIf(Buy,colorYellow, colorWhite), IIf(Buy, colorDarkGreen, colorDarkRed) ); AddTextColumn(IndustryID(1) ," Industry Sector ", 25.0, colorWhite, colorBlue); AddColumn( Close, "Close", 1.2, IIf( ROC(C, 1 ) >= 0, colorDarkGreen,colorRed ),50 ); AddColumn(Ref(Close,-1),"Y-Close",1.2, IIf( ROC(Ref(C,-1),1)>=0,colorDarkGreen, colorRed ),50 ); AddColumn( ROC( Close, 1 ), "ROC(1)", 1.2, IIf( ROC(C, 1 ) >= 0,colorDarkGreen, colorRed)); AddColumn( Volume, "Volume", 8.0, IIf( ROC(V, 1 ) >= 0,colorDarkGreen, colorRed ) ); AddColumn(Ref(MA(V,21),-1), "10d Avg VOL", 8.0, colorWhite, colorBlue); AddColumn( (V/Ref(MA(V,21),-1))*100,"V%of10 dMA" ,3.0, colorLightYellow, colorDarkGrey); /*Target:-Medium term--this is not for v short term or intraday but for swing(!!)or position traders. buy when red becomes green and sell when green becomes red...excellent signal to judge the trend.*/ --- In amibroker@yahoogroups.com, "pradip_hardikar" <pradip.hardi...@...> wrote: > > Dear All , > > I want swing trading formula for AB. > > Please provide it > > Will the senior members help me ? > > pradip >