PureBytes Links
Trading Reference Links
|
OK, I figured out that won't work. HighestBars finds the value of the
highest bar in the array. In other words, it would be great for
finding all time highs. To do what I was trying to do, you need to
find the HHV say over the last 40 days and compare that to the HHV
over the last 252 days. If the 40 day as of yesterday is less than
the 252 day as of yesterday, and today is a new 52 week high, then I
believe you have made sure that the stock hasn't made a new 52 week
high in 40 days. If you wanted to test for a flat base, you could
then find the LLV over 40 days and test that it was not less than the
HHV over the same period by say 20% or some other threshold. Thanks
for the help,
Bret
--- In amibroker@xxxxxxxxxxxxxxx, "Quad Rate Serial Abby"
<quad_pumped_abby@xxxx> wrote:
>
> Thanks Clement. I had that same statement embedded in an "iif"
> statement and tried to simplify it.
>
> Bret
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Clement Chin" <clement@xxxx> wrote:
> > I think something like this will do...
> >
> > Buy_requirement=H>ref(HHV(H,40),-1);
> >
> >
> >
> >
> > -----Original Message-----
> > From: Quad Rate Serial Abby [mailto:quad_pumped_abby@x...]
> > Sent: Monday, February 07, 2005 11:41 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Question on HighestBars
> >
> >
> >
> > Does this code work to ensure that there has not been a new high in
> > the last 40+ bars prior to the last close?
> >
> > HB = Ref ( HighestBars ( H ), -1 );
> > Buy_Requirement = IIf ( HB >= 40, 1, 0 );
> >
> > I'm not sure I'm seeing this work right in all instances.
> >
> > Thanks,
> >
> > Bret
> >
> >
> >
> >
> >
> >
> > 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 --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/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/
|