OPEN-SOURCE SCRIPT

Fat Tony's Composite Momentum Histogram (v01)

221
Fat Tony's Composite Momentum Histogram (v01)

Overview

Fat Tony's Composite Momentum Histogram (v01) is a sophisticated momentum oscillator that combines four powerful technical analysis components into a single, unified signal. Unlike traditional single-indicator approaches, this tool synthesizes Williams %R, Stochastic, MACD Histogram, and Rate of Change to provide a comprehensive view of momentum across multiple timeframes and calculation methods.

The indicator displays as a histogram that oscillates between -150 and +150, with overbought/oversold zones clearly marked at +100/-100. When momentum crosses above the oversold level with sufficient volume, a green triangle appears below the histogram signaling a potential long entry. Conversely, when momentum crosses below the overbought level, a red triangle appears above signaling a potential short entry.

What Makes This Different

Multi-Component Synthesis: Rather than relying on a single momentum calculation, this indicator averages four complementary momentum measures, each capturing different aspects of price action:

Williams %R captures overbought/oversold conditions
Stochastic tracks momentum relative to recent price range
MACD Histogram shows trend strength and potential reversals
Rate of Change measures velocity of price movement, normalized by volatility
Intelligent Volume Weighting: The indicator amplifies signals when volume confirms the move. Recent volume is compared to a 20-bar average using a logarithmic scale, preventing extreme spikes from distorting the signal while still rewarding genuine volume-backed momentum.
Adaptive Normalization: The MACD component uses a 200-bar standard deviation to adaptively scale itself, ensuring the indicator remains responsive across different market conditions and volatility regimes.
Volume Filtering: Optional minimum volume threshold (5-bar average) prevents false signals during low-liquidity periods when price moves may not be meaningful.

Key Features

Composite Signal: Combines four momentum indicators into one cohesive oscillator
Volume Confirmation: Optional volume weighting amplifies signals backed by strong participation
Trend Filter: Optional EMA-200 filter to trade only with the dominant trend
Visual Clarity: Color-coded histogram (blue for positive, orange for negative, red/green at extremes)
Automatic Alerts: Built-in alerts for entry and exit signals
Customizable Thresholds: Adjust overbought/oversold levels to match your trading style
ROC Toggle: Enable/disable the Rate of Change component based on your preference
Debug Mode: View individual component plots for fine-tuning and validation
Settings & Customization
Momentum Settings
Length (default: 14): Primary calculation period for Williams %R and Stochastic
MACD Fast (default: 12): Fast EMA period for MACD calculation
MACD Slow (default: 26): Slow EMA period for MACD calculation
MACD Signal (default: 9): Signal line period for MACD
ROC Length (default: 10): Lookback period for Rate of Change calculation
MACD StDev Length (default: 200): Period for adaptive MACD normalization
Levels
Overbought Level (default: 100): Threshold for short signals
Oversold Level (default: -100): Threshold for long signals
Volume Settings
Enable Volume Weighting (default: ON): Amplifies signals when volume confirms
Volume Sensitivity (default: 1.5): Controls strength of volume impact (0.5-3.0)
Min Avg Volume (default: 50,000): Minimum 5-bar average volume to trigger signals
Components
Include ROC Component (default: ON): Adds Rate of Change to the composite
Enable Trend Filter (default: OFF): Only signals aligned with EMA-200 trend
Show Component Plots (default: OFF): Display individual components for analysis
How to Use
Basic Signal Interpretation:
Green triangle below histogram = Long signal (momentum crossing up through oversold)
Red triangle above histogram = Short signal (momentum crossing down through overbought)
Histogram color indicates momentum direction and strength
Background shading highlights extreme overbought/oversold zones
Entry Strategy:
Wait for the histogram to enter oversold territory (below -100) for longs, or overbought (above +100) for shorts
Look for the entry signal (triangle) when momentum crosses back through the threshold
Confirm the signal occurs with adequate volume (if volume filter is enabled)
Consider the trend filter if trading with the dominant direction only
Exit Strategy:
Optional exit signals appear when momentum crosses the zero line against your position
Consider taking profits at extreme opposite readings (e.g., long exit when reaching +100)
Use price action, support/resistance, or your own risk management for final exits
Fine-Tuning:
Shorter Length settings (8-10): More responsive, more signals, potentially more noise
Longer Length settings (18-21): Smoother signals, fewer false positives, slower response
Higher Volume Sensitivity: Requires stronger volume confirmation
Lower Overbought/Oversold Levels (±80): More frequent signals
Enable Trend Filter: Reduces signals but improves win rate by trading with trend
Best Practices
Combine with Price Action: Use this indicator to confirm what you're seeing on the price chart, not as a standalone system
Respect the Volume Filter: Low-volume signals are often false moves; the volume confirmation is there for a reason
Don't Chase: Wait for signals at extreme levels; entries in the middle zone tend to whipsaw
Use Multiple Timeframes: Check that momentum aligns across your trading timeframe and a higher timeframe
Backtest Your Settings: Default parameters work well on many instruments, but optimization for your specific market and timeframe can improve results
Technical Details
The indicator normalizes each component to a -50 to +50 range before averaging, ensuring equal weighting regardless of the raw scale differences between Williams %R, Stochastic, MACD, and ROC. The MACD component uses a hyperbolic tangent function for smooth, bounded normalization. Volume weighting applies a logarithmic scale to prevent extreme outliers from dominating the calculation while still capturing genuine volume surges.

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

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.