To see how far the price is from the average
link tma all in one
At the end, everytime prices return back to average values, and prices can move away until some distance. We can buy or sell with mixed prices, that can provide us better buy or sell average cost.
You can use this indicator in your interested stock market..
With checking historical behaviour of the related stock market,
you can make balance on the indicator setting.
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.