OPEN-SOURCE SCRIPT

Slope Change Rate Volume Confirmation

313
Slope Change Rate Volume Confirmation (SCR)

█ OVERVIEW

This indicator identifies moments where the price trend is not just moving, but accelerating (i.e., the rate of change of the trend's slope is increasing or decreasing significantly), and crucially, whether this acceleration is confirmed by high volume. The core idea is that price acceleration backed by strong volume suggests higher conviction behind the move, potentially indicating the start or continuation of a strong thrust. Conversely, acceleration without volume might be less reliable.

It calculates the slope (velocity) of price movement, then the change in that slope (acceleration). This acceleration is normalized to a -100 to 100 range for consistent threshold application. Finally, it checks if significant acceleration coincides with volume exceeding its recent average.

█ HOW IT WORKS

The indicator follows these steps:

1. Slope Calculation (Velocity):
Calculates the slope of a linear regression line based on the input `Source` over the `Slope Calculation Length`. This represents the instantaneous rate of change or "velocity" of the price trend.
Pine Script®
// Calculate linear regression slope (current value - previous value) slope = ta.linreg(src, slopeLen, 0) - ta.linreg(src, slopeLen, 1)


2. Acceleration Calculation & Normalization:
Determines the bar-to-bar change in the calculated `slope` (`slope - slope[1]`). This raw change represents the "acceleration". This value is then immediately normalized to a fixed range of -100 to +100 using the internal `f_normalizeMinMax` function over the `Volume SMA Length` lookback period. Normalization allows the `Acceleration Threshold` input to be applied consistently.
Pine Script®
// Calculate slope change rate (acceleration) and normalize it // f_normalizeMinMax(source, length, newMin, newMax) accel = f_normalizeMinMax(slope - slope[1], volSmaLen, -100, 100)

*(Note: `f_normalizeMinMax` is a standard min-max scaling function adapted to the -100/100 range, included within the script's code.*)*

3. Volume Confirmation Check:
Calculates the Simple Moving Average (SMA) of volume over the `Volume SMA Length`. It then checks if the current bar's volume is significantly higher than this average, defined by exceeding the average multiplied by the `Volume Multiplier Threshold`.
Pine Script®
// Calculate average volume avgVolume = ta.sma(volume, volSmaLen) // Determine if current volume is significantly high isHighVolume = volume > avgVolume * volMultiplier


4. Confirmation Signals:
Combines the normalized acceleration and volume check to generate the final confirmation boolean flags:
Pine Script®
// Bullish: Price is accelerating upwards (accel > threshold) AND volume confirms confirmBullishAccel = accel > accelThreshold and isHighVolume // Bearish: Price is accelerating downwards (accel < -threshold) AND volume confirms confirmBearishAccel = accel < -accelThreshold and isHighVolume


█ HOW TO USE

  • Confirmation Filter: The primary intended use is to filter entry signals from another strategy. Only consider long entries when `confirmBullishAccel` is true, or short entries when `confirmBearishAccel` is true. This helps ensure you are entering during periods of strong, volume-backed momentum.
    Pine Script®
    // Example Filter Logic longEntry = yourPrimaryBuySignal and confirmBullishAccel shortEntry = yourPrimarySellSignal and confirmBearishAccel
  • Momentum Identification: High absolute values of the plotted `Acceleration` (especially when confirmed by the shapes) indicate strong directional conviction.
  • Potential Exhaustion/Divergence: Consider instances where price accelerates significantly (large absolute `accel` values) without volume confirmation (`isHighVolume` is false). This *might* suggest weakening momentum or potential exhaustion, although this requires further analysis.


█ INPUTS
  • Slope Calculation Length: Lookback period for the linear regression slope calculation.
  • Volume SMA Length: Lookback period for the Volume SMA and also for the normalization range of the acceleration calculation.
  • Volume Multiplier Threshold: Factor times average volume to define 'high volume'. (e.g., 1.5 means > 150% of average volume).
  • Acceleration Threshold: The minimum absolute value the normalized acceleration (-100 to 100 range) must reach to trigger a confirmation signal (when combined with volume).
  • Source: The price source (e.g., close, HLC3) used for the slope calculation.


█ VISUALIZATION

The indicator plots in a separate pane:
  • Acceleration Plot: A column chart showing the normalized acceleration (-100 to 100). Columns are colored dynamically based on acceleration's direction (positive/negative) and change (increasing/decreasing).
  • Threshold Lines: White horizontal dashed lines drawn at the positive and negative `Acceleration Threshold` levels.
  • Confirmation Shapes:
    • Green Upward Triangle (▲) below the bar when Bullish Acceleration is confirmed by volume (`confirmBullishAccel` is true).
    • Red Downward Triangle (▼) above the bar when Bearish Acceleration is confirmed by volume (`confirmBearishAccel` is true).


█ SUMMARY

The SCR indicator is a tool designed to highlight periods of significant price acceleration that are validated by increased market participation (high volume). It can serve as a valuable filter for momentum-based trading strategies by helping to distinguish potentially strong moves from weaker ones. As with any indicator, use it as part of a comprehensive analysis framework and always practice sound risk management.

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.