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

RE: [amibroker] Bullish Percent Index Code #1



PureBytes Links

Trading Reference Links

The trade sounds like finishes on an applystop which is weird. Other
than that you would never sell with
Sell=Cross(Ref(ATR(21),-1),C);

As it is asking for the atr(21) which would currently be in the cents to
be greater than close ( which is currently around $9)

Do you mean
Sell=Cross(Ref(H-ATR(21),-1),C);?

-----Original Message-----
From: bruiserbbq [mailto:bruiserbbq@xxxxxxxxxxxx] 
Sent: Thursday, 1 July 2004 10:29 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] What's wrong with this backtest?


Hi gang, I'm still having trouble with my backtest. It's only giving 
me one day open and the next day close even though the backtest is 
over 1000 days.

Ticker	Trade		Date	     Price	Ex. date    Ex. Price
		
CTX	Long (n-bar)	10/01/2001   2.15	10/01/2001	2.15


Here's the code I'm using:

cond1 = ADX(14) > 20;
cond2 = High > Ref(HHV(H,30),-1);
cond3 = Volume > 200000;
cond4 = Close > 0.15;

Filter = cond1 AND cond2 AND Cond3 AND Cond4;

Buy = cond1 AND cond2 AND Cond3 AND Cond4;

Sell=Cross(Ref(ATR(21),-1),C);

PlotShapes( shapeUpArrow * Buy, colorGreen );
PlotShapes( shapeDownArrow * Sell, colorRed );

AddColumn(Buy,"Buy");
AddColumn(Sell,"Sell");
AddColumn(Open,"Open",1.3);
AddColumn(Close,"Close",1.3);
AddColumn( ADX(14), "ADX", 1.2 );
AddColumn(Volume,"Volume",1.0);	



Thanks in advance
Dumb O'l Bruiser	




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



 



------------------------ 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/