thanks fella but surely that's the same thing?

Cheers,
Rich

--- In [email protected], "MAVIRK" <mvir...@...> wrote:
>
> b = ref(stochk(3,2),-1) < 50; //and stochk(3,2) > 50;
> 
> 
> From: foxblade2000invest 
> Sent: Friday, February 27, 2009 5:21 PM
> To: [email protected] 
> Subject: [amibroker] simple system coding help....
> 
> 
> Could anyone help.
> 
> I'm playing with the following idea. The system should buy if the 
cci 
> is above zero, the stochk has risen since yesterday and was below 
50 
> yesterday, and the close should be above the open.
> 
> My code is as follows;
> 
> a=CCI(40)>0;
> b=50>Ref(StochK(3,2),-1);
> d=StochK(3,2)>Ref(StochK(3,2),-1);
> e=C>O;
> 
> Buy=a AND b AND d AND e;
> BuyPrice=C;
> Sell=BarsSince(Buy)==1;
> 
> Short = 0;
> 
> Cover = 0;
> 
> Buy=ExRem(Buy,Sell);
> Sell=ExRem(Sell,Buy);
> 
> The problem is that when backtested, trades are clearly taken when 
> the stoch if falling and was above 50 yesterday (breaking the 
rules). 
> The only rules being observed are that the cci is positive and the 
> close is higher than the open (a and e).
> 
> Can anyone suggest what basic mistakes I'm making?
> 
> All contributions welcome.
> 
> Cheers,
> Rich
>


Reply via email to