This indicator measures the vertical distance form the current close to the MA of your choice. I find that it does not work best as an oscillator, but it works well for providing early signals for taking profits when trend continuating. For example, if you go short due to a retracement to the MA (of your choice) take profits when a bearish trendline is broken (signalling the start of a bullish correction) that corresponds to the highs of the chart. The logic behind this indicator is that the breakouts of trendlines of an assets difference from an MA will precede corresponding breakouts of trendlines drawn on raw price. Kind of like Momentum, except it takes trend into account. Momentum has the same leading feature when it comes to drawing trendlines , but trendlines will be harder to draw due to the Momentum indicators oscillatory behavior.
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.