But, instead of scoring trend based on how many moving averages are aligned, we are considering upside score. Higher scores are assigned for slower moving averages and lower scores for faster moving averages to give more stress to long term trend.
Buy/Sell conditions are based on moving average crossover on the upside score sum of Loopback days.
This is a very rough idea which seems to have been working ok on long only trades. Can be further improved.
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.
Join tradingview: https://www.tradingview.com/gopro/?share_your_love=sudh