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

Re: Indicator syntax help request



PureBytes Links

Trading Reference Links

Steve,
     If you are doing a profit system test try substituting opt1 for
LookBack then copy the actual PctChg formula in the PEAK function.
Set opt1 for whatever you want in the optimization part of the system
test.

JimG
----- Original Message -----
From: Steve Park <spark@xxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: Thursday, December 17, 1998 10:44 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?
>
>