or overlay this on price chart-

a=LastValue(Month())-2;

b=Month()!=Ref(Month(),-1);

bi=BarIndex();

d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));

e=*BarCount*-d;

f=LastValue(HHV(*H*,e));

PlotText("2 month high"+f,d,f,*colorRed*);


On Mon, Jun 21, 2010 at 12:08 PM, Inquisitive Voyager <
[email protected]> wrote:

>
> try this in commentary-
>
>
> a=LastValue(Month())-2;
>
> b=Month()!=Ref(Month(),-1);
>
> bi=BarIndex();
>
> d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));
>
> d=*BarCount*-d;
>
> e=LastValue(HHV(*C*,d));
>
> WriteVal(e);
>   On Mon, Jun 21, 2010 at 4:49 AM, Steve_Almond 
> <[email protected]>wrote:
>
>>
>>
>> I want to find the highest closing price for a stock in the last month and
>> the one before that (say highest for May and for April).
>> I thought I could use something like:
>>
>> HHV(C,Ref(Month(),-1))
>>
>> but it seems only to return a recent high value.
>>
>> Can someone point me in the right direction?
>>
>> Thanks,
>>
>> Steve
>>
>> 
>>
>
>

Reply via email to