PureBytes Links
Trading Reference Links
|
This returns 0 if the look ahead number exceeds then number of bars that
actually exists.
For instance, if the trigger date is 11/20 and I use:
LookHigh = ref( hhv( h, 10 ), 10 ) * ( barindex() < barcount-11 );
LookHigh returns 0 for the 11/20 bar. In this case, I'd prefer if it simply
find the low of the existing bars following 11/20.
If I just simply use:
LookHigh = ref( hhv( h, 10 ), 10 )
It behaves a bit better, but I noticed that at some point, as I continue to
increase the look ahead number (i.e. make it 100), the LookHigh value
changes. This makes sense in most case, but in the above example, assuming
11/20 as the trigger date, it should be a constant value for anything beyond
a look ahead number of 6, since there are only trading 6 bars following
11/20. This does not happen however, it almost looks like it is looking
back in this case.
A bit confused on this, but trying to figure out why this is...
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Graham
Sent: Tuesday, November 29, 2005 12:27 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Looking ahead
sorry made a mess of that, -10 instead of 10 for the ref
LookHigh = ref( hhv( h, 10 ), 10 );
LookHigh = ref( hhv( h, 10 ), 10 ) * ( barindex() < barcount-11 );
--
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 11/29/05, Graham <kavemanperth@xxxxxxxxx> wrote:
> I find the best to use is
> LookHigh = ref( hhv( h, 10 ), -10 );
> this looks at the 10th bar into the future, for the HHV of 10 bars
> after today ( today is not included in the HHV)
>
> If you want to make certain that you exclude the end of the chart add
> a condition
> LookHigh = ref( hhv( h, 10 ), -10 ) * ( barindex() < barcount-11 );
>
> --
> 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 11/29/05, dimension@xxxxxxxxxxxxx <dimension@xxxxxxxxxxxxx> wrote:
> >
> >
> >
> > Hi,
> >
> > Given a "trigger date/bar", how can I look ahead two weeks from that
bar/date and determine what the low was within those two weeks, providing
there exists data in that look ahead time frame? Is there something like
LLV and HHV for looking ahead? (I tried using a negative number to no
avail).
> >
> >
> >
> > thanks
> >
>
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
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.7/182 - Release Date: 11/24/2005
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.7/182 - Release Date: 11/24/2005
------------------------ 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/
|