Thank you for the explanation rsb_44.
--- In equismetastock@yahoogroups.com,
"rsb_44"
<rsb_44@xxx> wrote:
>
> N and I are counters for "for next" loops. The loops are
controlling the look back periods Bars)
> N3 takes on successive even values between 2 and 50
>
> (HHV(H, 2) - LLV(L, 2)) /2; That's the average barly high low
spread for
each nth period.
>
>
>
> --- In equismetastock@yahoogroups.com,
"formulaprimer"
<formulaprimer@> wrote:
> >
> > Inputs:
> >
> > Price((H+L)/2),
> > Lookback(60);
> > Arrays:
> > H[190](0), H1[100](0), H2[100](0), H3[100](0), H4[100](0),
HAvg[100](0);
> > For I = 1 to 50 Begin
> > N = 2*I;
> > N3 = (Highest(High, N) - Lowest(Low, N)) / N;
> > HH = High;
> > LL = Low;
> > For count = 0 to N/2 - 1 begin
> > If High[count] > HH then HH = High[count];
> > If Low[count] < LL then LL = Low[count];
> > End;
> > N1 = (HH - LL)/(N / 2);
> > HH = High[N/2];
> > LL = Low[N/2];
> > For count = N/2 to N - 1 begin
> > If High[count] > HH then HH = High[count];
> > If Low[count] < LL then LL = Low[count];
> > End;
> > N2 = (HH - LL)/(N / 2);
> > If N1 > 0 and N2 > 0 and N3 > 0 then Dimen = (Log(N1
+ N2) -
Log(N3)) / Log(2);
> > H = 2*(1 / Dimen - .5);
> > H = 1.25*(H - .5) + .6;
> > HAvg = (H + H1 + H2 + H3 + H4) / 5;
> > If HAvg > 1 then HAvg = 1;
> > If HAvg < 0 then HAvg = 0;
> > H4 = H3;
> > H3 = H2;
> > H2 = H1;
> > H1 = H;
> > End;
> > For I = 2 to 50 Begin
> > N = 2*I - 1;
> > HAvg = (HAvg[N - 1] + HAvg[N + 1]) / 2;
> > End;
> >
> > PlotLen = Lookback;
> > If Plotlen > 99 Then PlotLen = 99;
> > For I = 8 to PlotLen Begin
> >
> >
> > If HAvg >= .5 Then Begin
> > Color1 = 255*(2 - 2*HAvg);
> > Color2 = 255*(2*HAvg - 1);
> > Color3 = 0;
> > End
> > Else If HAvg < .5 Then Begin
> > Color1 = 255*(2*HAvg);
> > Color2 = 0;
> > Color3 = 255*(1 - 2*HAvg);
> > End;
> >
>