OPEN-SOURCE SCRIPT
Dynamic Trendlines & Breakouts [identityKa]

Overview
The Dynamic Trendlines & Breakouts [identityKa] is an automated structural analysis tool designed to remove human subjectivity from drawing trendlines. By utilizing mathematical pivot extremes, the script identifies the dominant market geometry in real-time. More importantly, it incorporates a Smart Volume Filter to distinguish between genuine structural breakouts and low-volume retail traps (fakeouts).
Core Engine Mechanics
The indicator operates on two primary algorithmic pillars:
Dynamic Coordinate Mapping: The script calculates the most recent pivot highs and pivot lows based on a user-defined lookback sensitivity. It then draws precision-extended dashed lines connecting these coordinates, forming dynamic Resistance (Upper Line) and Support (Lower Line) boundaries.
Volume-Confirmed Breakouts: The script continuously monitors the closing price relative to these extended lines. However, a crossover is not enough. If the "Volume Confirmation" feature is active, the engine checks a 20-period Simple Moving Average of the volume. A Bullish "B" (Buy) or Bearish "S" (Sell) label is only printed if the breakout candle is accompanied by above-average institutional volume, significantly increasing the probability of trend continuation.
HUD Dashboard & AI Proximity Logic
The integrated on-chart panel tracks the last confirmed breakout state and utilizes an ATR-based proximity sensor to generate the AI Suggestion:
Dangerous: Displayed actively whenever the current price is within a 0.5 Average True Range (ATR) distance of either the upper or lower trendline. This alerts the trader that the price is actively testing a major structural boundary, making new entries highly risky until a clear bounce or volume-confirmed breakout occurs.
LONG / SHORT: Triggered when the last structural breakout was Bullish (LONG) or Bearish (SHORT), provided the price is safely trending away from the immediate resistance/support lines.
How to Use It
This tool is ideal for momentum and breakout traders. When the price approaches a trendline (AI Suggestion reads "Dangerous"), prepare for a setup. Do not front-run the breakout. Wait for the engine to print the "B" or "S" label, confirming that both the structural level has been breached and the volume supports the move. Once confirmed, trade in the direction of the new momentum.
The Dynamic Trendlines & Breakouts [identityKa] is an automated structural analysis tool designed to remove human subjectivity from drawing trendlines. By utilizing mathematical pivot extremes, the script identifies the dominant market geometry in real-time. More importantly, it incorporates a Smart Volume Filter to distinguish between genuine structural breakouts and low-volume retail traps (fakeouts).
Core Engine Mechanics
The indicator operates on two primary algorithmic pillars:
Dynamic Coordinate Mapping: The script calculates the most recent pivot highs and pivot lows based on a user-defined lookback sensitivity. It then draws precision-extended dashed lines connecting these coordinates, forming dynamic Resistance (Upper Line) and Support (Lower Line) boundaries.
Volume-Confirmed Breakouts: The script continuously monitors the closing price relative to these extended lines. However, a crossover is not enough. If the "Volume Confirmation" feature is active, the engine checks a 20-period Simple Moving Average of the volume. A Bullish "B" (Buy) or Bearish "S" (Sell) label is only printed if the breakout candle is accompanied by above-average institutional volume, significantly increasing the probability of trend continuation.
HUD Dashboard & AI Proximity Logic
The integrated on-chart panel tracks the last confirmed breakout state and utilizes an ATR-based proximity sensor to generate the AI Suggestion:
Dangerous: Displayed actively whenever the current price is within a 0.5 Average True Range (ATR) distance of either the upper or lower trendline. This alerts the trader that the price is actively testing a major structural boundary, making new entries highly risky until a clear bounce or volume-confirmed breakout occurs.
LONG / SHORT: Triggered when the last structural breakout was Bullish (LONG) or Bearish (SHORT), provided the price is safely trending away from the immediate resistance/support lines.
How to Use It
This tool is ideal for momentum and breakout traders. When the price approaches a trendline (AI Suggestion reads "Dangerous"), prepare for a setup. Do not front-run the breakout. Wait for the engine to print the "B" or "S" label, confirming that both the structural level has been breached and the volume supports the move. Once confirmed, trade in the direction of the new momentum.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.