stockan – Oscillator Matrixstockan – Oscillator Matrix
A multi-layer RSI-based momentum & trend tool with signal smoothing, short-segment regression lines, fade-style histogram, reversal markers, and a blocky heat-bar.
stockan is designed to give you a crystal-clear view of short-term momentum shifts and trend bias all in one pane. It builds upon the classic 0–100 RSI by:
Smoothing it with a quick SMA to generate a clean crossover signal.
Drawing tiny linear-regression segments on both RSI and its signal line to highlight the slope (i.e. local trend direction) over a handful of bars.
Filling between RSI and signal in green/red so you can instantly see when momentum flips.
Plotting a soft-fade histogram of (RSI – signal), where stronger moves produce more opaque bars, while smaller divergences fade into the background.
Marking local peaks and troughs on the RSI curve with dots—perfect for fine-tuning entries or exits.
Rendering a bottom “heat” strip as blocky columns that switch from red to green once RSI crosses your chosen threshold, giving you a persistent bias indicator.
🔧Inputs & Settings
You can customize every aspect of stockan in the Indicator Settings:
Price Source (default = Close)
Choose which price series (Open, High, Low, Close, or a custom series) you want the RSI to use.
Oscillator Length (RSI) (default = 14)
The look-back period for the RSI calculation. Shorter values make the oscillator more sensitive.
Signal Smoothing (default = 3)
The length of the simple moving average applied to the RSI. Higher values produce slower, cleaner signals.
Trend-LR Length (default = 20)
Number of bars used in each linear-regression segment. Longer lengths smooth trends but react more slowly.
Heat Threshold (default = 50)
The cutoff level (on the 0–100 RSI scale) above which the bottom heat-blocks turn green.
Histogram Max for Fade (default = 20)
The absolute difference (RSI – signal) that maps to 100% opacity in the histogram. Smaller differences fade out; larger ones stand out.
🚀 How to Use stockan
Identify Momentum Shifts
Watch for the green/red fill to flip—when the RSI line crosses above its signal, green fill indicates building bullish momentum; red indicates bearish pressure.
Sense Short-Term Trend with Mini-Regression Lines
The tiny sloping segments on both RSI and signal lines give an immediate visual cue: upward-tilted segments = short-term uptrend, downward = downtrend.
Gauge Strength with the Fade-Style Histogram
Opaque bars mean strong momentum divergence; faint bars mean weak or consolidating moves. Use these to avoid low-conviction signals.
Fine-Tune Entries & Exits Using Reversal Dots
Gray dots mark local RSI highs (possible short setups), green dots mark local lows (possible long entries).
Confirm Bias with the Heat-Bar
A steady green row at the bottom tells you RSI has been above your threshold consistently—ideal for trend-following. A red row suggests caution or counter-trend trades.
🎯 Benefits
All-in-One Pane: No need to juggle RSI, MA, histogram and custom script separately.
Clean Visuals: Soft fades and blocky heat bars reduce clutter and highlight what matters.
Non-Repainting: Uses only closed-bar data; once a bar is closed, nothing moves or disappears.
Highly Customizable: Every length, threshold, color and transparency can be adjusted in Settings.
Lightweight & Self-Contained: Pure Pine v5—no external libraries, no proprietary code—fully compliant with TradingView’s policies.
Stockanindicator
Stockan Momentum MeterStockan Momentum Meter (SMM)
Advanced Momentum Acceleration Oscillator
Version: 1.0 | Category: Momentum Oscillator | Type: Open Source
Detailed Technical Specification
Key Features
Dual-Layer Momentum Calculation
Calculates momentum using double derivative of price (ROC of ROC)
First Layer: Standard Rate of Change (ROC)
Second Layer: Momentum of Momentum (ROC applied to first ROC)
Signal Smoothing System
EMA filtering of raw momentum values
Adaptive smoothing based on user-defined length
4-State Color Coding
Quadrant-based visualization system:
Strong Bullish (Green): Histogram > Threshold
Moderate Bullish (Blue): 0 < Histogram ≤ Threshold
Moderate Bearish (Orange): -Threshold ≤ Histogram < 0
Strong Bearish (Red): Histogram < -Threshold
Dynamic Threshold System
Adjustable baseline levels for sensitivity control
Symmetrical upper/lower boundaries
Detailed Working Mechanism
Calculation Pipeline
Raw Momentum (momo):
momo = ROC(ROC(close, length), length)
Measures acceleration/deceleration in price movements
Double derivation filters out noise while capturing momentum shifts
Smoothed Signal (ema_momo):
ema_momo = EMA(momo, length)
Creates reference line for momentum comparison
Reduces whipsaws in volatile markets
Histogram Value:
histogram = momo - ema_momo
Visualizes difference between raw and smoothed momentum
Positive values = accelerating momentum
Negative values = decelerating momentum
PARAMETER CONFIGURATION
Momentum Length (Default: 14)
Range: 1-100 | Controls historical window for momentum calculations
Base Line Threshold (Default: 0.0)
Range: 0-100 | Determines sensitivity for color changes
COLOR CODING SYSTEM
GREEN Signals:
Histogram value ABOVE threshold level = Strong bullish momentum
BLUE Signals:
Positive values BETWEEN 0 and threshold = Moderate bullish pressure
ORANGE Signals:
Negative values BETWEEN 0 and -threshold = Moderate bearish pressure
RED Signals:
Histogram value BELOW -threshold = Strong bearish momentum
Key Benefits for Traders
Early Reversal Detection
Identifies momentum exhaustion before price reversal occurs
Divergence Spotting
Clear visualization of:
Bullish divergence (Price ↓ + Histogram ↑)
Bearish divergence (Price ↑ + Histogram ↓)
Trend Strength Measurement
Histogram height indicates momentum intensity
Multi-Timeframe Compatibility
Works effectively on:
Scalping (1-15min)
Swing Trading (1H-4H)
Position Trading (Daily-Weekly)
Customizable Sensitivity
Adjust threshold levels for:
Day traders (higher threshold = fewer signals)
Long-term investors (lower threshold = more sensitivity)
Usage Scenarios
Bullish Signal
Green histogram crossing above threshold
Blue → Green color transition
Bearish Signal
Red histogram crossing below negative threshold
Orange → Red color transition
Confirmation Tool
Use with trend indicators (EMA, MACD):
Green histogram + Price above 200 EMA = Strong uptrend
Red histogram + Price below 200 EMA = Strong downtrend
KEY ADVANTAGES OVER POPULAR INDICATORS
Faster Signals vs RSI
Detects momentum shifts earlier through double ROC calculation
Clearer Visuals vs MACD
Four-color system replaces confusing line crossovers with instant visual cues
Better Filtering vs Stochastic
Dual-layer calculation reduces market noise more effectively
Custom Sensitivity
Adjustable threshold outperforms fixed settings in traditional oscillators
How to Use
Add to chart from TradingView Public Library
Default settings work for most timeframes
Adjust parameters based on:
Aggressive trading: Reduce length (10-12)
Conservative trading: Increase length (20-25)
Combine with:
Trendlines for breakout confirmation
Volume indicators for signal validation
Notes
Best Performance: Ranging markets with clear support/resistance
Risk Management: Use with stop-loss (2x ATR recommended)
Limitations: May give false signals during low-volume periods