OPEN-SOURCE SCRIPT

Buy and Sell with Oscillator Divergence

Aktualisiert
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.
Versionshinweise
Added a check for volume and relative volatility to filter out signals which happen during low volatility sessions.
Versionshinweise
-Made some cosmetic changes.
-Added additional BUY, SELL signals to compare divergence between two consecutive BUY or two consecutive SELL signals.
Versionshinweise
- Fixed some bug in the logic to filter out unnecessary signals.
multitimeframeOscillatorsTrend Analysis

Open-source Skript

Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun das Script auch andere Trader verstehen und prüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?

Haftungsausschluss