PureBytes Links
Trading Reference Links
|
Hi,
I've got a headache from trying to get the following simple code to
work for the last 6 hours!
I want to get the high and low from the specified begin and end time!
(Test code simplified to only do the high)
I can isolate the time by
BOBeg<TimeNum() AND TimeNum()<BOEnd
but I can't get the right ORHigh value to stick through several days.
AA set to 15 min intervals
Run on last 3 days quotations
The program picks up the highest value from either the previous day or
start of the day at 9:30.
If they are both below BOBeg (10:30) then ORHigh gets set correctly
otherwise ORHigh has the wrong values.
Help!!!!
=========
//BOBeg = 093000;
BOBeg = 103000;
BOEnd = 113000;
//ORHigh=HighestSince(BOBeg<TimeNum() AND TimeNum()<BOEnd,High);
//ORHigh=ValueWhen(BOBeg<TimeNum() AND TimeNum()<BOEnd,
// HighestSince(BOBeg<TimeNum() AND TimeNum()<BOEnd,High));
//ORHigh=ValueWhen(BOBeg<TimeNum() AND TimeNum()<BOEnd,
// HighestSince(BOBeg<TimeNum(),High));
ORHigh=ValueWhen(BOBeg<TimeNum() AND TimeNum()<BOEnd,
HighestSince(Cross(BOBeg,TimeNum()),High));
Filter = 1;
AddColumn(BOBeg,"BOBeg",1.0);
AddColumn(TimeNum(),"Timenum()",1.0);
AddColumn(BOBeg<TimeNum() AND TimeNum()<BOEnd,"BOBeg<TimeNum() AND
TimeNum()<BOEnd",1.0);
AddColumn(BOEnd,"BOEnd",1.0);
AddColumn(H,"High");
AddColumn(HighestSince(BOBeg<TimeNum(),High),"HighestSince(BOBeg<TimeNum(),High)");
AddColumn(HighestSince(Cross(BOBeg,TimeNum()),High),"HighestSince(Cross(BOBeg,TimeNum()),High)");
AddColumn(ORhigh,"ORHigh");
=========
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/
|