OPEN-SOURCE SCRIPT

Buy and Sell with Oscillator Divergence

已更新
This exploratory script provides a graphical representation of "Peaks" and "Dips" during market expansion, where traders are likely to take part of their profits. One possible use is with a contrarian entry strategy: selling when buyers have finished taking their profits and buying when sellers have finished taking their profits. This is achieved by comparing the strength of an existing trend by analysing the price and any given oscillator between two consecutive peaks or dips for regular divergences.

The script combines Bollinger Band expansion to detect extreme points. It then compares a single oscillator of choice (e.g., RSI, CCI, Stoch RSI, or MACD) to determine whether the value of the oscillator between two Bollinger Band extremes is increasing or decreasing, thereby detecting possible divergence with the price. Additionally, there is an option to include any other oscillator of choice as an input source for the oscillator, provided that it is loaded on the chart.

In an uptrend, if the price continues to peak higher while the oscillator peaks lower, it indicates signs of bullish exhaustion. Conversely, in a downtrend, if the price keeps dipping lower while the oscillator dips higher, it signals bearish exhaustion.

The above can be used in conjunction with price action analysis to identify entry or exit points near key areas of support or resistance. The script is intended for exploratory and educational purposes, is a work in progress, it requires further tunning, and does not constitute financial advice.
發行說明
Added a check for volume and relative volatility to filter out signals which happen during low volatility sessions.
發行說明
-Made some cosmetic changes.
-Added additional BUY, SELL signals to compare divergence between two consecutive BUY or two consecutive SELL signals.
發行說明
- Fixed some bug in the logic to filter out unnecessary signals.
multitimeframeOscillatorsTrend Analysis

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明