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

RE: [amibroker] Re: StyleCandle with AddToComposite Indices Builder



PureBytes Links

Trading Reference Links

At the risk of being short down in flames. :-)

I discovered a problem in my own code of one of my systems so I decided to
test a very simple idea to see why it was happening.

The Buy rule is buy when todays open is equal to yesterdays low or high
price.

Sell day after entry.

The following code produces open positions that go for months, most that are
only one day and millions entries are never when open opens at low or high.



EqualOpenLow= IIf(Open = Ref(Low,-1),1,0);
EqualOpenHigh= IIf(Open = Ref(High,-1),1,0);

Buy = EqualOpenLow;
Sell = BarsSince(Buy==1);
SetTradeDelays(0,0,0,0);


Short = EqualOpenHigh;
Cover = BarsSince(Short==1);
SetTradeDelays(0,0,0,0);



Result on DD for period 16/01/2001 to 18/6/2004 is;

Entry 4/10/2002 and exit 11/12/2003






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/