Thanks for the help, however it doesn't appear to be doing what I want. I get 
zero buys and there should be many.

Again, just in case I wasn't clear (and I'm backtesting with 1-minute data), I 
want to:

Buy if current high is higher than the high at 9:30
AND current high is LOWER than YESTERDAY'S CLOSE
AND time is between 9:31 and 9:45.

So, for example, if the price at 9:36 exceeds the high at 9:30, but is lower 
than the closing price of yesterday, I would get a buy.

Anyone?

Grant

  


--- In [email protected], NIFTY PLAYER <nift...@...> wrote:
>
> 
> HELLO SIR TRY THIS
>  
> HIGHTIME= Cross(TimeNum(),93000);
> AFTERHIGH = TimeNum()>=93000;
> NDAY = Day()!= Ref(Day(), -1);
> HIGHDAY = HighestSince(NDAY,H,1);
> LOWYES =LowestSince(NDAY,L,1);
> OURBUY = ValueWhen(HIGHTIME,HIGHDAY,1);
> Buy= Cross(C,OURBUY) AND AFTERHIGH;
>  WITH REGARDS  NIFTY46(DHIRAJ SOOD)
> 
> --- On Wed, 4/1/09, longarm61 <no...@...> wrote:
> 
> From: longarm61 <no...@...>
> Subject: [amibroker] Help With Code
> To: [email protected]
> Date: Wednesday, April 1, 2009, 12:03 PM
> 
> 
> 
> 
> 
> 
> Hi, I could use a push in the right direction here. This is what I'm trying 
> to do (working with 1-minute bars):
> 
> Buy if High is higher than High of 9:30 bar
> AND High is lower than YESTERDAY'S CLOSE 
> AND time is between 9:31 and 9:45 (this I can do)
> 
> Sorry, if this is newbish. Thanks in advance for any help.
> 
> Grant
>


Reply via email to