OPEN-SOURCE SCRIPT

Adaptive Momentum Velocity Ribbon

1 600
🔶 OVERVIEW
Risk management is the backbone of successful trading, but static trailing stops often fail to account for the "momentum" of a move. The Kinetic Trailing Stop & Targets is an adaptive volatility-based system designed to breathe with the market.

Unlike standard ATR trailing stops that move at a fixed distance, this indicator uses a "kinetic" engine. It calculates the relationship between price momentum and current volatility to determine how aggressively the stop should follow price. When momentum is high, the stop "tightens" to protect profits; during quiet periods, it expands to avoid being "stopped out" by minor noise.

🔶 THE KINETIC ENGINE: HOW IT WORKS
The indicator relies on a multi-layered calculation to determine the stop-loss placement:

  • Dynamic Volatility Ratio: The tool tracks the current ATR relative to its 50-bar high. This creates a "Volatility Ratio" that dictates the width of the buffer.
  • Momentum-Responsive Stepping: The stop doesn't just trail; it "steps." If the price makes a significant move (measured by a Momentum Score), the stop reacts kinetically, jumping closer to price to lock in gains.
  • The Guard Distance: To prevent the stop from becoming too tight and causing "premature exits," a minimum Guard Distance is maintained, ensuring price always has a statistically significant "air gap" to fluctuate within.


🔶 AUTOMATED TARGET MILESTONES
A standout feature of this tool is the Target Level System. The moment a trend flips (indicated by the diamond shapes), the indicator marks that price as the "Trend Origin."

  • Fixed Percentage Scaling: The indicator projects horizontal milestones (e.g., +2%, +4%, +6%) from the origin point.
  • Historical Milestone Logging: When price hits a target, a dashed line and label are permanently fixed to the chart, allowing you to see exactly where profit-taking opportunities occurred.
  • Active Target Tracking: The dashboard displays the next upcoming target and exactly what percentage "distance" remains until it is hit.


🔶 VISUAL FEATURES
  • Trend-Colored Candles: The entire chart's aesthetic shifts based on the trend. Bullish trends are painted in teal/green, while bearish trends shift to pink/red.
  • Flip Diamonds: High-visibility markers appear the moment a trend reversal is confirmed, signaling a shift in the stop-loss orientation.
  • Dynamic Cloud Fill: A gradient fill between the price and the stop line provides a visual representation of the "risk zone."


🔶 INDICATOR SETTINGS
  • ATR Smoothing Length: Adjusts the lookback for volatility. Longer lengths result in a smoother, slower-moving stop.
  • Sensitivity: Controls the "Kinetic" response. Higher sensitivity makes the stop jump more aggressively during momentum spikes.
  • Band Multiplier & Guard Distance: These two settings define the "outer" and "inner" limits of your stop-loss width.
  • Level Spacing (%): Set the distance between your target milestones (e.g., set to 1.0 for every 1% move).


🔶 TRADING UTILITY
  • Trend Following: Use the Kinetic Stop to ride long-term trends without getting shaken out by volatility spikes.
  • Scaling Out: Use the automated Target Levels as objective signals to scale out of a position (e.g., close 25% of the trade at each milestone).
  • Volatility Filter: By observing the distance between the price and the stop, you can visualize "volatility expansion"—if the gap is widening, the market is becoming more chaotic.


🔶 CONCLUSION
The Kinetic Trailing Stop & Targets [ChartPrime] is a professional-grade risk management suite. By combining momentum-aware trailing logic with fixed percentage targets, it provides traders with a clear, objective roadmap for both staying in a trade and knowing exactly when to exit.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.