[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Swing Trading Formula



PureBytes Links

Trading Reference Links

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@xxxxxxxxxxxxxxx, "pradip_hardikar" <pradip.hardikar@xxx> wrote:
>
> Dear All ,
> 
> I want swing trading formula for AB. 
> 
> Please provide it 
> 
> Will the senior members help me ?
> 
> pradip
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/