Logic to count higer high, lower high and vice versa.


i wish to check if a line, ma or any indicator is making higher high, low or lower high, low.

What should be the logic to check it ? will it be same for all TF or different ???

perhaps in my logic it just gets caught in lowest time frame.



depends on how you do it, but if you don't specify timeframe it will work for all.

It should be something like this:

int high = High[1];
for(int i = 2; i < Bars; i++) {
        if(High[i] > high)
                high = High[i];

this works for all timeframes