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

[amibroker] Re: ADX based trading system


  • Date: Thu, 28 Jan 2010 18:35:20 -0000
  • From: "jilm_jones" <Jilm_Jones@xxxxxxxxx>
  • Subject: [amibroker] Re: ADX based trading system

PureBytes Links

Trading Reference Links

i think its right

//MACD

r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
m1 = MACD(r1, r2);
s1 = Signal(r1,r2,r3); 
//stochastic
periods = Param( "Periods", 15, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Dsmooth = Param( "%D avg", 3, 1, 200, 1 );
periods = Param( "Periods", 15, 1, 200, 1 );
k=StochK( periods , Ksmooth);
d=StochD( periods , Ksmooth, DSmooth );

//ADX
range = Param("Periods", 14, 2, 200, 1 );
ADvX=ADX( range);

tightstop=1;
Loosestop=2;
ApplyStop(stopTypeLoss,stopModePercent,IIf(advx>45,tightstop,Loosestop));

Buy=IIf(advx<20,k>d,IIf(advx>30,m1>s1,IIf(Cross(Advx,23) AND LLV(advx,BarsSince(Cross(23,advx)))<18,m1>s1,
IIf(Cross(27,advx) AND HHV(advx,BarsSince(Cross(advx,27))),k>d,0))));

Sell=IIf(advx<20,k<d,IIf(advx>30,m1<s1,IIf(Cross(Advx,23) AND LLV(advx,BarsSince(Cross(23,advx)))<18,m1<s1,
IIf(Cross(27,advx) AND HHV(advx,BarsSince(Cross(advx,27))),k<d,0))));
Short=Cover=0;
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

 



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

**** 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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/