How to code new 4W highs 2 weeks back

Hello,
I’m a beginner in coding, can anyone please help me with the below?
Coding new 4 week highs that happened in the third last weekly bar.

This is the code I use to identify new 4W highs that happened in the previous week:

highesthigh(BACKTYPE=Weeks, BARS=4, INCBAR=False, SIGNALONLY=True)

But how do I find new 4W highs that happened in the third last weekly bar including the current weekly bar?

Hi,

You can use the TIMESINCESIGNAL() function to do this.

Here is an example:

V1 = High() == HIGHESTHIGH(BARS=4, INCBAR=True);
TIMESINCESIGNAL(V1) == 2

This shows where the current highest high value was from 2 bars before the current weekly chart.

Ex7

This was designed to run on a Weekly chart or Weekly Timeframe scan.