PureBytes Links
Trading Reference Links
|
tobtrade
Code from Corey Saxe to the rescue again
HHV(H,LastValue(Min(Cum(1),500)+PREV-PREV));
This has two PREV's in it so you would need to restrict your exploration to
just over 500 (or risk taking forever). Using "Minimum" periods would give
the HIGH for the most recent bar - you no longer have any mechanism to force
a 500 bar scan.
Roy
----- Original Message -----
From: "tobtrade2001" <tobtrade2001@xxxxxxxxx>
To: <Metastockusers@xxxxxxxxxxxxxxx>
Sent: Sunday, September 21, 2003 4:43 AM
Subject: [Metastockusers] Data Array Question
> Here's what I'd like to do...
>
> If there are less than 500 data points in the array, I'd like to
> find the highest high in the array, if there are more than 500 data
> points, I'd like to find the highest high in the last 500...sounds
> fairly simple but MetaStock keeps choking on symbols with less than
> 500 data points...I've tried various coding including
>
> x:=cum(1);
> if(x<=500,highest(h),hhv(h,500)
>
> and
>
> x:=isundefined(hhv(h,500));
> if(x,highest(h),hhv(h,500)
>
> without joy...so...how do I avoid getting error messages for symbols
> with less data then I'm calling in the formula?
>
> Any suggestions?
>
>
>
> To unsubscribe from this group, send an email to:
> Metastockusers-unsubscribe@xxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
ReplayTV: CNet Ranked #1 over Tivo!
Instant Replay & Pause live TV.
Special Sale: 50% off!
http://us.click.yahoo.com/UUMW7B/.5qGAA/ySSFAA/zMEolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|