in that it filters out trends in prices to more easily identify
cycles. The indicator is an attempt to define cycles in a trend
by drawing a moving average as a horizontal straight line and
placing prices along the line according to their relation to a
moving average. It provides a means of identifying underlying
cycles not apparent when the moving average is viewed within a
price chart. Cycles of a longer duration than the Length (number
of bars used to calculate the Detrend Price Osc) are effectively
filtered or removed by the oscillator.
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
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.