Finding stocks with 2 'highest's in a row?

Hi, I have been trying this for hours now and I am guessing this is very straightforward but I can't see it. I have noticed that stocks take a dive after reaching a new high so i want to see what happens if they go higher still for consecutive days.. I want to select for stocks that have a highest close ever yesterday, and then another today so...

Trigger = C == Highest(C) AND Ref(C,-1) == ???????

Is there a simple replacement for the ????????? i have tried using highest, HHV, highest since, etc. but am missing something.

Thanks in advance. James

Perhaps

Trigger = C == Highest(C) AND Ref( C == Highest(C) ,-1 );
1 Like

John, thank you. Knew it would be trivially simple. Didn't realise the ref function worked that way. James

1 Like