PureBytes Links
Trading Reference Links
|
You can include a reduced number of bars to look back if your symbol
has not traded for that long
period = min( 250, barcount-2); //used -2 as you need additional bar
for the ref(...,-1)
NH = C >= ref(HHV( Close, period),-1);
--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm
On 1/22/06, Terry <MagicTH@xxxxxxxxxxx> wrote:
> Highest function will work, but you will still want some kind of limit
> on number of bars, otherwise you'll get a trade on the 1st day the stock
> is available (since it will be an all-time high).
>
> xBuy = C == Highest(C); //All time High
> altBuy = C >= HHV(C,250);
>
> Buy = C == Highest(C) OR altBuy; //Buy at all time High OR X day High
> --
> Terry
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
> Behalf Of marketmonk777
> Sent: Saturday, January 21, 2006 14:14
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] 250 Day New Highs
>
> Hi folks,
>
> I noticed something interesting while scanning for 250 day new highs.
> It seems that my scan does not capture any new highs for which the
> stock has not traded a full 250 days. Take for example a recent IPO
> STP. It did not show up on my list.
>
> My line for looking for a new closing high is:
> NH = C >= HHV( Close, 250);
>
> How can I modify the code to capture these stocks that have not yet
> traded a full 250 days?
>
> Also, I was thinking about creating a scan that would locate "All
> Time" new highs.
>
> Regards,
>
> Dave
> MarketMonk777
> a.k.a. RedEyes
>
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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/
|