Ok,
I provided a solution in post 150428. But, that one did not include the
current, evolving monthly high. Easily remedied as follows:
months = Month();
newMonth = months != Ref(months, -1);
runningHigh = HighestSince(newMonth, Close);

Plot(Close, "Price", colorDarkGrey, styleBar);
Plot(newMonth, "", colorLightGrey, styleOwnScale | styleHistogram |
styleNoLabel);
Plot(runningHigh, "Highest", colorBlue, styleDashed);

Filter = 1;

AddColumn(runningHigh, "Current");

for (i = 1; i <= 12; i++) {
    AddColumn(ValueWhen(newMonth, Ref(runningHigh, -1), i), "" + i + "
Months Ago");
}
Change the middle condition of the for loop (e.g. i <= 2) to track back
as many months as you're interested in.
Mike
--- In [email protected], "Steve_Almond" <m...@...> wrote:
>
> Mike,
>
> I'm looking for several individual values:
>
> 1. the highest for June
>
> 2. the highest for May
>
> 3. the highest for April
>
> That would be 3 values in all.
>
> Steve
>
>
>
> --- In [email protected], "Mike" sfclimbers@ wrote:
> >
> > Are you looking for 2 values, or just 1?
> >
> > In other words, are you looking for the highest value for the month
of April and the separate highest value for the month of May? Or, are
you looking for the single highest value for the 2 month period spanning
April through May?
> >
> > Mike
> >
> > --- In [email protected], "Steve_Almond" <me@> 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