Thank you, would really appreciate that. I did some further research on the topic and want to enhance my spec as follows:
After identifying the first swing high/low using the below code:
//Identify the 1st swing high or low
If high[4] > highest[4](high) and high[4] > highest[4](high)[5] Then
SwingHigh = high[4] //(4 lower highs on left and 4 lower highs on right)
ElsIf low[4] < lowest[4](low) and low[4] < lowest[4](low)[5] Then
SwingLow = low[4] //(4 lower lows on left and 4 lower lows on right)
EndIf
Let me explain using the following example;
Starting with the swing low fractal as 1 draw the numbers 1, 9, 17, 26, 33, 42 just below the corresponding candle low in the color red.
Since we have started with a swing low fractal, we are now looking for two more swing low fractals up to and equal to bar 42 of the red swing low number series.
The same process for the above would be repeated for the following 2 fractals, except using the color blue for the next one and the color green for the last one (also drawn below the lows of the corresponding bars).
We are now looking for the first swing high fractal after the 42nd bar of the first red number series of the swing low numbers.
This will be our 1st swing high and will be indicated by the number 1 in red just above the high of the corresponding bar, do the same again for bars number 9, 17, 26, 33 and 42.
We are now looking for two more swing high fractals again only up to and equal to bar 42 of the red swing high number series.
The following two swing high number series will be marked exactly the same as the first one except using the color blue for the next one and the color green for the last one (also drawn above the lows of the corresponding bars).
We are now going to repeat the whole process all over again, looking for the first swing low after the 42nd bar of the red swing high number series etc. etc.
I have attached a crude picture drawn in MS paint to give you an idea of what I am looking for (the numbers aren’t exactly aligned due to their size).
Thanks for your assistance!