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

[amibroker] Re: Help With Code



PureBytes Links

Trading Reference Links

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 amibroker@xxxxxxxxxxxxxxx, NIFTY PLAYER <nifty46@xxx> 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 <norm1@xxx> wrote:
> 
> From: longarm61 <norm1@xxx>
> Subject: [amibroker] Help With Code
> To: amibroker@xxxxxxxxxxxxxxx
> 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
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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