[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] HHV(close,n)



PureBytes Links

Trading Reference Links

Hi Preston

> Just curious, would the alert function work in this case?
>

No I don't think so. The Alert() function is only useful for extending
binary values (0 or 1) and can't be applied to prices. Also, LastValue is
the only function that I'm aware of that converts a variable into a usable
constant.

Slightly off topic, I've recently stumbled upon a method of delaying a price
but without incurring the cumulative N/A effect that using Ref() causes. The
format is,

ValueWhen(1+delay,1,"price"). The equivalent of Ref(C,-1) is
ValueWhen(2,1,C).

There is a down side with this where a zero will be returned if no data is
available, but that can be managed easily enough. Notice that in the
following code there are 5 bars N/A for one signal and 15 bars for the
other. I've already been able to make use of this feature in TE

pds:=5;
x:=ValueWhen(pds+1,1,C);
y:=ValueWhen(pds+1,1,x);
z:=ValueWhen(pds+1,1,y); z;
x:=Ref(C,-pds);
y:=Ref(x,-pds);
z:=Ref(y,-pds); z+1;

Roy

> --- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx>
> wrote:
> > kut2k2
> >
> > > I thought I'd better reply for the benefit of you and others:
> > > LastValue(A) does apply the value of A 100 bars ago to any
> required
> > > function also 100 bars ago. But it does not retain that value for
> > > future reference because the entire array of LastValue(A) is
> changed
> > > with every new bar of data. LastValue(A+PREV-PREV) does retain
> past
> > > values *if* it exists. Unfortunately what I want to do gives error
> > > messages for LastValue(A+PREV-PREV). I am very disappointed that
> > > MetaStock spent thousands of code lines on garbage like Gann
> angles
> > > yet something truly useful like a real dynamic time-period goes
> > > lacking. :-(
> >
> > I agree that a dynamic time period would be extremely useful.
> However it
> > appears that that is not to be. I know that the "LastValue(A+PREV-
> PREV)"
> > work around does not work for every situation but sometimes the
> errors seen
> > when attempting to use it can still be resolved.
> >
> > I think I've had an error when the returned value was not an
> integer, and
> > the solution was to use Int(). Also, I think a value of zero will
> usually
> > give an error, and the solution can be as simple as adding one (+1).
> >
> > Please feel free to contact me privately if you would like me to
> explore
> > other possible solutions for what you want to do.
> >
> > Roy
>
>
>
> To unsubscribe from this group, send an email to:
> equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/