The return points are calculated as follows:
high > last 3 highs and close above highest low
low < last 3 lows and closes below lowest high
The direction of higher timeframes fractals tend to be more durable and reliable. This indicator helps to find the alignment of different timeframes, so that you can look for trade opportunities in the same direction as the higher timeframes and improve your chances.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
Another awesome indicator. It would be amazing if you can add trend lines as per your Zigzag indicator @xdecow .
Thank you for the indicator though. :)