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

Re: Intraday indicator for MSPro: Intra PriHiLoClo



PureBytes Links

Trading Reference Links

Here is Intra PriHiLoClo with a few minor variable name changes.
All else is the same.   I THINK if you import it will overwrite
the original.

Regards,
Ken
mailto:divenfish@xxxxxxxxxxxxx


           Intra PriHiLoClo

{Plots prior day's H, L, and C on today's  intraday chart.}

{Default value of the start bar hour/minute is for a 5 minute
  chart of a market  that opens at 9:30}

MktHour:=
Input("Enter start bar hour",
          1,24,9);

MktMinute:=
Input("Enter start bar minute",
          00,59,35);

DispHi:=
Input("Display prior day's High? 1= Yes, 0= No",
          0,1,1);

DispLo:=
Input("Display prior day's Low? 1= Yes, 0= No",
          0,1,1);

MktStart:= Hour()=MktHour AND
                  Minute()=MktMinute;

yestMktEnd:= Ref(MktStart,1);

yestClo:= CLOSE;
yestHi:= HighestSince(1,MktStart,H);
yestLo:= LowestSince(1,MktStart,L);

x:=If(yestMktEnd=1,yestClo,
      ValueWhen(1,yestMktEnd=1,yestClo));

y:=If(yestMktEnd=1,yestHi,
        ValueWhen(1,yestMktEnd,yestHi));

z:=If(yestMktEnd=1,yestLo,
        ValueWhen(1,yestMktEnd,yestLo));


x;
If(DispHi=1,y,x);
If(DispLo=1,z,x)