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

Re: Please help my indicator.



PureBytes Links

Trading Reference Links

At 11:11 AM -0700 12/9/99, Brent wrote:

>I wanted an indicator that would plot (in subgraph 1) the Highest High or
>the Lowest low beginning with a specified date, in other words the Highest
>from Date. This function gives me the HighestSoFar even before the Date,
>despite trying to make it begin from the date. Thanks.
>
>Brent
>
>Input: ndate(numericsimple);
>Var: sbar(0);
>if C>0 then HighestFromDate=C;
>
>if date = ndate then
>        sbar = currentbar;
>if sbar <> 0 then begin
>
>if H > HighestSoFar(H)[1] then
>      HighestFromDate=H
>else
>      HighestFromDate=HighestSoFar(H)[1];
>
>end


This is code for an Indicator (not a function) that will plot the highest high and lowest low since the date specified as an input. Set this so that Plot1 and Plot2 plot as points (not lines). (Not tested but should be about right.)

----

Input: nDate(990901);

Vars: HHigh(-99999), LLow(99999);

if Date >= nDate then begin
   HHigh = iff(High > HHigh, High, HHigh);
   LLow  = iff(Low  < LLow,  Low,  LLow);
   Plot1(HHigh, "HHigh");
   Plot2(LLow,  "LLow");
end

----

Bob Fulks