High > the Highest close of the last 3 days.

Hello,

I have been attempting to create a Script that as a filter only allows stocks to pass that have the current High > the Highest close of the last 3 days.

None of my 3 lower Scripts below are valid.

HIGH() > HIGHESTHIGH(BARS=3) - my starting point

HIGH() > HIGHESCLOSE(BARS=3)

HIGH() > HIGHESTHIGH(CLOSE())(BARS=3)

HIGH() > HIGHESTHIGH(BARS=3)(CLOSE()

What do I need to change to obtain a valid Script?.

Thanks, Brad

Hi Brad,

The following should work:

V1 = CLOSE() ;
V2 = HIGHESTHIGH(V1, BARS=3, INCBAR=True);
High() > V2

This script does include the current bar in the 3 day look back. If you don’t want to include it change the last part of line 2 to INCBAR=False);

Ex3

Black Line = Highest Close in the last 3 bars (including current bar). Green shaded zone shows bars where the high is higher than the Black line.