PureBytes Links
Trading Reference Links
|
here is what i came up with and i would appreciate it if anyone could help me just a little more... when this is put on the chart it works for the first couple of bars but then doesn't "reset" to continue to count the new highs.
What i'm looking for is an indicator that will count the number of higher highs (a high higher than the prior bar but not necessarily consecutive to the last higher high) in a set number of bars.
Input: N(5);
Variables: HHigh(0), NHigh(0), HCount(0);
if High > HHigh then begin
HHigh = High;
NHigh = 1;
end else NHigh = 0;
HCount = Summation(NHigh, N);
plot1(HCount,"HCount");
|