PureBytes Links
Trading Reference Links
|
Im looking into trend following systems and I found
one in a book on the subject. I got the code below out
of Mike Covels Trend Following book and modified the
position sizing slightly. Id try it using long only,
otherwise it will blow up. Not impressive at all, for
stocks.
COL1 = ATR(15);
COL2 = Close > HHV(Ref(H,-1),89) + .01;
COL3 = Close < LLV(Ref(L,-1),13) -.01;
COL4 = Close < LLV(Ref(L,-1),89) -.01;
COL5 = Close > HHV(Ref(H,-1),-13) +.01;
Buy = COL2;
Short = COL4;
Sell = COL3;
Cover = COL5;
MaxTrade = 5;
B = (Equity() * .015)/COL1;
PositionSize = - Min(MaxTrade, B);
SetTradeDelays (1,1,1,1);
RoundLotSize = 1;
SetOption( "CommissionMode", 3 ); //3 - $ per
share/contract
SetOption( "CommissionAmount",.002); // - amount of
commission in modes 1..3
SetOption( "initialequity", 100000 );
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|