OPEN-SOURCE SCRIPT

Stochastic Divergence with lookback

The Stochastic Divergence indicator is an adaptation of the standard Stochastic Oscillator. It incorporates elements of divergence detection, which is a concept often applied to various oscillators including RSI and Stochastic. The code has been optimized and organized for clarity and efficiency, with non-essential visual elements like background shading removed.

Key Features and Improvements:

1. Customizable Divergence Detection:
- Added Lookback Right and Lookback Left parameters for divergence calculation.
- This addresses the "repainting" issue present in some indicators where signals appear several candles after the actual divergence occurs.
- By setting Lookback Right to 1, users can get divergence signals on the very next candle after the divergence occurs, improving timeliness of signals.

2. Stochastic Overbought and Oversold Signals:
- Incorporates traditional Stochastic overbought and oversold levels.
- Added alerts for when the Stochastic crosses these levels, providing potential trade entry or exit signals.

3. Stochastic Crossover Signals:
- Detects and alerts when the Stochastic %K line crosses the %D line.
- These crossovers can indicate potential trend reversals or continuations.

4. Multiple Alert Types:
- Divergence alerts (bullish and bearish)
- Overbought and oversold alerts
- Stochastic %K and %D crossover alerts

5. Customizable Settings:
- Users can adjust Stochastic parameters, MA types, divergence settings, and trigger lines to suit their trading style.

OscillatorsPivot points and levels

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm