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

Re: Show me - Highest High



PureBytes Links

Trading Reference Links

You are missing [1] at the end of highest(high,len1).  It should read:

IF currentbar >1 and price > Highest(High,Len1)[1]

This will now compare the current bar to the highest high of the last X bars
STARTING ONE BAR AGO.  Otherwise (if the current high is now the highest
high), you are asking TS to check if the current high is > than the current
high!!  A condition that will never be true!!

By the way, you are using "price" (the close) as the condition you are
checking for.  Your condition will only show those cases where the CLOSE is
higher than last X bars high.  But if the high goes higher than X bars high
(i.e. a breakout occurs) but closes lower ...then you will not see a plot.
If you meant this to happen, that's OK.  Otherwise substitute the word
"high" for "price" in the statement.

Simon.

At 12:26 14/06/99 EDT, you wrote:
>Am trying to plot a Paint bar ,  which plots the Highest high. 
>The code looks alright to me. But it doesnt Paint any bars. On going through 
>it visually, I see where many of the conditions are being met. 
>
>I took the code from the builtin Showme " Brkout of X bar High " 
>and changed it to a Paintbar indicator.
>
>Any suggestions.
>Michael
>=========================================
>Input: 
>Price(c),
>Len1(10);
>
>IF currentbar >1 and price > Highest(High,Len1)
>
> Then Begin
>  Plot1(High,"High");
>  Plot2(Low,"Low");
>  IF CheckAlert Then Alert = TRUE;
>End;
>
>