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

Re: Indicator syntax help request



PureBytes Links

Trading Reference Links

Thanks to everyone that chimed in with a solution.

I wasn't doing a system test, so I used Adam's workaround.
It did the trick.

-----Original Message-----
From: Von Hef <VonHef@xxxxxxxxxx>
To: metastock@xxxxxxxxxxxxx <metastock@xxxxxxxxxxxxx>
Date: Thursday, December 17, 1998 10:49 PM
Subject: Re: Indicator syntax help request


>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?
>>
>>
>
>