Gaussian Detrended Reversion

DraftVenture アップデート済   
This strategy, titled "Gaussian Detrended Reversion Strategy," aims to identify potential price reversals using the customized Gaussian Detrended Price Oscillator (GDPO) in combination with smoothed price cycles.

Key Elements of the Strategy:

GDPO Calculation: The strategy first calculates the Detrended Price Oscillator (DPO) by comparing the close price to an Exponential Moving Average (EMA) of a specified period. This calculation helps identify short-term price cycles by detrending the price data.

Gaussian Smoothing: The DPO values are then smoothed using the Arnaud Legoux Moving Average (ALMA), applying a Gaussian smoothing technique. This smoothed version of the DPO is intended to filter out noise and provide a clearer picture of price trends.

Entry and Exit Conditions: The strategy defines conditions for both long and short entry points as well as exit points. It looks for specific crossover events between the smoothed GDPO and its lagged version. The strategy enters a long position when the smoothed GDPO crosses above the lag and is negative, and exits the long position when the smoothed GDPO crosses below the lag or the zero line. Similarly, the strategy enters a short position when the smoothed GDPO crosses below the lag and is positive, and exits the short position when the smoothed GDPO crosses above the lag or the zero line.

Visualization: The smoothed GDPO and its lag are plotted on the chart using distinct colors. The zero line is also displayed as a reference point. Additionally, the chart background changes color when the strategy enters a long or short position. Cross markers are also plotted at the crossover points as exit cues.

Overall, this strategy aims to capture potential price reversals using the GDPO and Gaussian smoothing, with specific entry and exit conditions to guide trading decisions.
*Updated Labels for clarity*
  • Plotted an offset of the price line to create a leading indication on the oscillator


TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。