OPEN-SOURCE SCRIPT
Aggiornato

Stoch Quad Oscillator

100
📘 Stoch Quad Oscillator – User Guide
✅ Purpose
The Stoch Quad Oscillator is a multi-timeframe stochastic oscillator tool that helps traders detect oversold and overbought conditions, momentum shifts, and quad rotation signals using four distinct stochastic configurations. It includes visual cues, customizable parameters, and background highlights to improve decision-making during trend reversals or momentum surges.

🛠️ Inputs & Parameters
⏱ Timeframe
Timeframe for Stochastic Calculation: Defines which chart timeframe to use for stochastic calculations (default is "1" minute). This enables multi-timeframe analysis while on a lower timeframe chart.

📈 Stochastic Parameters
Four different stochastic configurations are used:

Label %K Length %D Smoothing Notes
K9 D3 9 3 Fastest, short-term view
K14 D3 14 3 Moderately short-term
K40 D4 40 4 Medium-term trend view
K60 D10 60 10 Long-term strength

Smoothing Type: Choose between SMA or EMA to control how smoothed the %D line is.

🎯 Levels
Overbought Level: Default 80

Oversold Level: Default 20

These are used to indicate overextended price conditions on any of the stochastic plots.

🔄 Quad Rotation Detection Settings
When enabled, the script detects synchronized oversold/overbought conditions with strong momentum using all 4 stochastic readings.

Enable Quad Rotation: Toggles detection on or off

Slope Calculation Bars: Number of bars used to calculate slope of %D lines

Slope Threshold: Minimum slope strength for signal (higher = stronger confirmation)

Oversold Quad Level: Total of all four stochastic values that define a quad oversold zone

Overbought Quad Level: Total of all four stochastic values that define a quad overbought zone

Oversold Quad Highlight Color: Background color when oversold quad is triggered

Overbought Quad Highlight Color: Background color when overbought quad is triggered

Slope Averaging Method: Either Simple Average or Weighted Average (puts more weight on higher timeframes)

Max Signal Bar Window: Defines how recent the signal must be to be considered valid

📊 Plots & Visual Elements
📉 Stochastic %D Lines
Each stochastic is plotted separately:

K9 D3 – Red

K14 D3 – Orange

K40 D4 – Fuchsia

K60 D10 – Silver

These help visualize short to long-term momentum simultaneously.

📏 Horizontal Reference Lines
Overbought Line (80) – Red

Oversold Line (20) – Green

These help you identify threshold breaches visually.

🌈 Background Highlighting
The indicator provides background highlights to mark potential signal zones:

✅ All Oversold or Overbought Conditions

When all four stochastics are either above overbought or below oversold:

Bright Red if all are overbought

Bright Green if all are oversold

🚨 Quad Rotation Signal Zones (if enabled)

Triggered when:

The combined sum of all four stochastic levels is extremely low/high (below/above oversoldQuadLevel or overboughtQuadLevel)

The average slope of the 4 %D lines is sharply positive (> slopeThreshold)

Highlights:

Custom Red Tint = Strong overbought quad signal

Custom Green Tint = Strong oversold quad signal

These zones can indicate momentum shifts or reversal potential when used with price action or other tools.

⚠️ Limitations & Considerations
This indicator does not provide trade signals. It visualizes conditions and potential setups.

It is best used in confluence with price action, support/resistance levels, and other indicators.

False positives may occur in ranging markets. Reduce reliance on slope thresholds during low volatility.

Quad signals rely on slope strength, which may lag slightly behind sudden reversals.

🧠 Tips for Use
Combine with volume, MACD, or PSAR to confirm direction before entry.

Watch for divergences between price and any of the stochastics.

Use on higher timeframes (e.g., 5m–30m) to filter for swing trading setups; use shorter TFs (1m–5m) for scalping signals.

Adjust oversoldQuadLevel and overboughtQuadLevel based on market conditions (e.g., in trending vs ranging markets).
Note di rilascio
Changes Made:
Added quadRotationBullish and quadRotationBearish logic using separate slope directions.

Updated bgcolor calls for clear signal visualization.

Cleaned up logic naming for clarity.

📘 Stoch Quad Oscillator – User Guide
✅ Purpose
The Stoch Quad Oscillator is a multi-timeframe stochastic oscillator tool that helps traders detect oversold and overbought conditions, momentum shifts, and quad rotation signals using four distinct stochastic configurations. It includes visual cues, customizable parameters, and background highlights to improve decision-making during trend reversals or momentum surges.

🛠️ Inputs & Parameters
⏱ Timeframe
Timeframe for Stochastic Calculation: Defines which chart timeframe to use for stochastic calculations (default is "1" minute). This enables multi-timeframe analysis while on a lower timeframe chart.

📈 Stochastic Parameters
Four different stochastic configurations are used:

Label %K Length %D Smoothing Notes
K9 D3 9 3 Fastest, short-term view
K14 D3 14 3 Moderately short-term
K40 D4 40 4 Medium-term trend view
K60 D10 60 10 Long-term strength

Smoothing Type: Choose between SMA or EMA to control how smoothed the %D line is.

🎯 Levels
Overbought Level: Default 80

Oversold Level: Default 20

These are used to indicate overextended price conditions on any of the stochastic plots.

🔄 Quad Rotation Detection Settings
When enabled, the script detects synchronized oversold/overbought conditions with strong momentum using all 4 stochastic readings.

Enable Quad Rotation: Toggles detection on or off

Slope Calculation Bars: Number of bars used to calculate slope of %D lines

Slope Threshold: Minimum slope strength for signal (higher = stronger confirmation)

Oversold Quad Level: Total of all four stochastic values that define a quad oversold zone

Overbought Quad Level: Total of all four stochastic values that define a quad overbought zone

Oversold Quad Highlight Color: Background color when oversold quad is triggered

Overbought Quad Highlight Color: Background color when overbought quad is triggered

Slope Averaging Method: Either Simple Average or Weighted Average (puts more weight on higher timeframes)

Max Signal Bar Window: Defines how recent the signal must be to be considered valid

📊 Plots & Visual Elements
📉 Stochastic %D Lines
Each stochastic is plotted separately:

K9 D3 – Red

K14 D3 – Orange

K40 D4 – Fuchsia

K60 D10 – Silver

These help visualize short to long-term momentum simultaneously.

📏 Horizontal Reference Lines
Overbought Line (80) – Red

Oversold Line (20) – Green

These help you identify threshold breaches visually.

🌈 Background Highlighting
The indicator provides background highlights to mark potential signal zones:

✅ All Oversold or Overbought Conditions

When all four stochastics are either above overbought or below oversold:

Bright Red if all are overbought

Bright Green if all are oversold

🚨 Quad Rotation Signal Zones (if enabled)

Triggered when:

The combined sum of all four stochastic levels is extremely low/high (below/above oversoldQuadLevel or overboughtQuadLevel)

The average slope of the 4 %D lines is sharply positive (> slopeThreshold)

Highlights:

Custom Red Tint = Strong overbought quad signal

Custom Green Tint = Strong oversold quad signal

These zones can indicate momentum shifts or reversal potential when used with price action or other tools.

⚠️ Limitations & Considerations
This indicator does not provide trade signals. It visualizes conditions and potential setups.

It is best used in confluence with price action, support/resistance levels, and other indicators.

False positives may occur in ranging markets. Reduce reliance on slope thresholds during low volatility.

Quad signals rely on slope strength, which may lag slightly behind sudden reversals.

🧠 Tips for Use
Combine with volume, MACD, or PSAR to confirm direction before entry.

Watch for divergences between price and any of the stochastics.

Use on higher timeframes (e.g., 5m–30m) to filter for swing trading setups; use shorter TFs (1m–5m) for scalping signals.

Adjust oversoldQuadLevel and overboughtQuadLevel based on market conditions (e.g., in trending vs ranging markets).

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.