OPEN-SOURCE SCRIPT
Velocity Acceleration Momentum [VAM]

Velocity Acceleration Momentum [VAM]
Overview
VAM is a multi-layered momentum indicator that measures how fast price is moving (Velocity), whether that speed is increasing or decreasing (Acceleration), and how strong the underlying trend is (ADX). Rather than just telling you the direction of price, VAM tells you the quality and phase of the move you're in.
How It's Calculated
Velocity measures the percentage rate of change of price over a lookback period (default: 14 bars), then smooths it with a 3-period EMA. It answers: "How fast is price moving relative to where it was?"
Acceleration is the change in Velocity over a secondary smoothing window (default: 5 bars), also EMA-smoothed. It answers: "Is momentum speeding up or slowing down?"
Signal Line is an EMA of Velocity (default: 9 bars) — similar in concept to the MACD signal line. When Velocity crosses above/below the Signal Line, it can indicate momentum shifts.
ADX Histogram uses Pine's built-in DMI/ADX calculation. When DI+ > DI−, bars plot positively (green); when DI− > DI+, bars plot negatively (red). The color opacity is gradient-mapped to ADX strength — vivid bars mean a strong trend, faded bars mean a weak/ranging market.
Reading the Velocity Line Colors (Regime Detection)
The Velocity line changes color based on the combination of Velocity and Acceleration:
ColorConditionMeaning🟢 LimeVelocity > 0, Acceleration > 0Rocket — momentum is up and accelerating🟡 YellowVelocity > 0, Acceleration < 0Topping — still positive but losing steam🔴 RedVelocity < 0, Acceleration < 0Freefall — momentum is down and worsening🟠 OrangeVelocity < 0, Acceleration > 0Bottoming — still negative but recovering
How to Trade With It
High level Buy when Velocity Line Green 🟢sell when Velocity drops hard and is Red 🔴
+
ADX BARS TELL YOU THE TREND AND THE TREND STRENTH (COMBINE THIS AND THE VELOCITY LINE)
+
ACCELERATION PUROPLE AND YELLOW WAVE TELLS YOU SHARP DROPS OR ADVANCES IN ACCELERATION
Trend Entries: Look for the Velocity line turning Lime (🟢) with the ADX histogram printing vivid green bars above the +25 line. This is the highest-confidence long setup — price is accelerating upward with confirmed trend strength.
Caution / Exit Signals: When Velocity turns Yellow (🟡) and sharply drops, momentum is fading even if price is still rising. Consider tightening stops or taking partial profits.
Short / Bearish Bias🔴 : Red Velocity + vivid red ADX bars below −25 signal a strong downtrend in Freefall. Avoid longs; look for short setups.
Potential Reversals: Orange Velocity (Bottoming) combined with ADX bars beginning to fade and shift green can be an early signal that a bottom is forming — useful for scaling into longs cautiously.
Signal Line Crosses: When the Velocity line crosses above the white Signal Line, momentum is picking up. Crosses below suggest weakening. Best used as a confirmation filter, not a standalone trigger.
The ±25 Reference Lines mark the ADX threshold commonly used to separate trending (above) from ranging (below) markets. ADX histogram bars inside the ±25 zone suggest low trend conviction — reduce position sizing or wait for confirmation.
Inputs
Source — Price input (default: Close)
Velocity Length — Lookback period for rate-of-change calculation (default: 14)
Acceleration Smooth — Smoothing window for acceleration (default: 5)
Signal Line Length — EMA period for the signal line (default: 9)
ADX Length — Period for DMI/ADX calculation (default: 14)
Show Signal Line — Toggle the white signal line on/off
Show Zone Backgrounds — Toggle ADX-strength background shading
Show ADX Histogram — Toggle the ADX directional histogram
Overview
VAM is a multi-layered momentum indicator that measures how fast price is moving (Velocity), whether that speed is increasing or decreasing (Acceleration), and how strong the underlying trend is (ADX). Rather than just telling you the direction of price, VAM tells you the quality and phase of the move you're in.
How It's Calculated
Velocity measures the percentage rate of change of price over a lookback period (default: 14 bars), then smooths it with a 3-period EMA. It answers: "How fast is price moving relative to where it was?"
Acceleration is the change in Velocity over a secondary smoothing window (default: 5 bars), also EMA-smoothed. It answers: "Is momentum speeding up or slowing down?"
Signal Line is an EMA of Velocity (default: 9 bars) — similar in concept to the MACD signal line. When Velocity crosses above/below the Signal Line, it can indicate momentum shifts.
ADX Histogram uses Pine's built-in DMI/ADX calculation. When DI+ > DI−, bars plot positively (green); when DI− > DI+, bars plot negatively (red). The color opacity is gradient-mapped to ADX strength — vivid bars mean a strong trend, faded bars mean a weak/ranging market.
Reading the Velocity Line Colors (Regime Detection)
The Velocity line changes color based on the combination of Velocity and Acceleration:
ColorConditionMeaning🟢 LimeVelocity > 0, Acceleration > 0Rocket — momentum is up and accelerating🟡 YellowVelocity > 0, Acceleration < 0Topping — still positive but losing steam🔴 RedVelocity < 0, Acceleration < 0Freefall — momentum is down and worsening🟠 OrangeVelocity < 0, Acceleration > 0Bottoming — still negative but recovering
How to Trade With It
High level Buy when Velocity Line Green 🟢sell when Velocity drops hard and is Red 🔴
+
ADX BARS TELL YOU THE TREND AND THE TREND STRENTH (COMBINE THIS AND THE VELOCITY LINE)
+
ACCELERATION PUROPLE AND YELLOW WAVE TELLS YOU SHARP DROPS OR ADVANCES IN ACCELERATION
Trend Entries: Look for the Velocity line turning Lime (🟢) with the ADX histogram printing vivid green bars above the +25 line. This is the highest-confidence long setup — price is accelerating upward with confirmed trend strength.
Caution / Exit Signals: When Velocity turns Yellow (🟡) and sharply drops, momentum is fading even if price is still rising. Consider tightening stops or taking partial profits.
Short / Bearish Bias🔴 : Red Velocity + vivid red ADX bars below −25 signal a strong downtrend in Freefall. Avoid longs; look for short setups.
Potential Reversals: Orange Velocity (Bottoming) combined with ADX bars beginning to fade and shift green can be an early signal that a bottom is forming — useful for scaling into longs cautiously.
Signal Line Crosses: When the Velocity line crosses above the white Signal Line, momentum is picking up. Crosses below suggest weakening. Best used as a confirmation filter, not a standalone trigger.
The ±25 Reference Lines mark the ADX threshold commonly used to separate trending (above) from ranging (below) markets. ADX histogram bars inside the ±25 zone suggest low trend conviction — reduce position sizing or wait for confirmation.
Inputs
Source — Price input (default: Close)
Velocity Length — Lookback period for rate-of-change calculation (default: 14)
Acceleration Smooth — Smoothing window for acceleration (default: 5)
Signal Line Length — EMA period for the signal line (default: 9)
ADX Length — Period for DMI/ADX calculation (default: 14)
Show Signal Line — Toggle the white signal line on/off
Show Zone Backgrounds — Toggle ADX-strength background shading
Show ADX Histogram — Toggle the ADX directional histogram
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.