PureBytes Links
Trading Reference Links
|
Hello Steve,
Try this and see if it will work:
Peak(1,H,LastValue(PctChg));
Best wishes,
Adam Hefner.
e-mail: VonHef@xxxxxxxxxx
_____________________
-----Original Message-----
From: Steve Park <spark@xxxxxxxxxx>
To: metastock@xxxxxxxxxxxxx <metastock@xxxxxxxxxxxxx>
Date: Thursday, December 17, 1998 10:22 PM
Subject: Indicator syntax help request
>Is there any way to get around not being able to
>use "variables" in indicator parameter lists? For
>instance, if I do the following:
>
>Lookback:=Input("Time Periods",2,200,10);
>
>PctChg:=If(Lookback<=30,3,
> If(Lookback>30 AND Lookback<=100,
> 3+((Lookback-30)/10),
> 10+((Lookback-100)/20)));
>
>Peak(1,H,PctChg);
>
>I get a message from Indicator Builder that says that
>I can't use a "variable" (PctChg) in the Peak function.
>You'll notice that PctChg only uses Lookback, which
>doesn't change from bar to bar, so it stays constant.
>I'm not clear as to why this doesn't work, but if it's OK
>if I do:
>
>PctChg:=Input("Percent Change",3,50,3);
>
>Peak(1,H,PctChg);
>
>Is this a feature?
>
>
|