I have the following question:
# How do I find "x" where "x" is the last value in the array "consecutivehigherhighs". The idea is to insert it under "totalconsecutivehigherhighs" as it is summation over "x" period where "x" is the last value of the array "consecutivehigherhighs".
rec higherhigh = if high > high[1] then 1 else 0;
rec consecutivehigherhighs = if higherhigh <> higherhigh[1] then 1 else consecutivehigherhighs[1] + 1;
def totalconsecutivehigherhighs = Sum(consecutivehigherhighs, x);
input Min = 1;
input Max = 3;
plot Scan = totalconsecutivehigherhighs >= Min and totalconsecutivehigherhighs <= Max;
# How do I find "x" where "x" is the last value in the array "consecutivehigherhighs". The idea is to insert it under "totalconsecutivehigherhighs" as it is summation over "x" period where "x" is the last value of the array "consecutivehigherhighs".
rec higherhigh = if high > high[1] then 1 else 0;
rec consecutivehigherhighs = if higherhigh <> higherhigh[1] then 1 else consecutivehigherhighs[1] + 1;
def totalconsecutivehigherhighs = Sum(consecutivehigherhighs, x);
input Min = 1;
input Max = 3;
plot Scan = totalconsecutivehigherhighs >= Min and totalconsecutivehigherhighs <= Max;