This is John F. Ehlers "Sine Wave Indicator" on the book "Cybernetic Analysis for Stocks and Futures". When red crosses under blue there is a resistance and the price should fall and when red crosses over blue there is a support and the price should rise, but, the market is always right, if instead of turning down on the resistance it surpasses it there is a trend up, if instead of turning up on the the support it falls through it there is a trend down.
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 publications is governed by House rules. You can favorite it to use it on a chart.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.