OPEN-SOURCE SCRIPT
Adaptive Channel Reaction

Adaptive Channel Reaction (ACR) is a price-channel analysis indicator designed to identify structured support and resistance channels from confirmed swing points and evaluate price reactions around those boundaries.
The indicator is intended to help traders study channel behavior, lower-boundary reactions, upper-boundary reactions, structural breaks, and potential continuation after an upside channel breakout. It is an indicator, not an automated trading strategy, and it does not predict future price movement.
How it works
ACR builds channels from the two most recently confirmed swing highs and swing lows. In Parallel mode, the boundaries are calculated from the slopes of the swing structures. In Range mode, horizontal support and resistance boundaries are used instead.
Candidate channels are filtered using several structural checks:
- Minimum channel width relative to ATR.
- Geometric agreement between the upper and lower boundaries.
- A channel-quality calculation based on geometry and independent price reactions near both boundaries.
- Touch separation logic to reduce repeated counting of adjacent candles as separate reactions.
ATR is used as a volatility-normalization mechanism so that channel width, penetration limits, break buffers, and reaction tolerances adapt to the instrument being analyzed.
Entry logic
The lower section of an active channel is treated as a reaction area rather than as one exact price.
Three entry-confirmation modes are available:
- Confirmed Rejection — requires price to interact with the lower reaction area, remain within the allowed penetration distance, close back inside the channel, and satisfy the configured lower-wick requirement.
- Close Back Inside — requires interaction with the lower area and a close back inside the channel.
- Touch Only — the most permissive mode and reacts to a qualified lower-area interaction.
Optional bullish-candle and EMA filters are available. They are disabled by default and are not required by the core channel logic.
Exit logic
ACR provides three exit modes:
- Adaptive — evaluates upper-channel rejection while allowing a sufficiently strong upside breakout to remain active. If the breakout subsequently fails and price closes back inside the channel by the configured amount, an exit can be generated.
- Upper Rejection — exits after a qualified rejection near the upper channel boundary.
- Upper Line Touch — exits when price reaches the upper boundary.
The Adaptive mode is designed to distinguish between a simple reaction at channel resistance and an expansion move through the upper boundary.
Channel breaks
Channel breaks are not based solely on an intrabar penetration. The indicator evaluates confirmed closes outside the channel using an ATR-based buffer.
Normal breaks can require multiple consecutive closes and directional follow-through. A substantially deeper ATR-based break can bypass the normal confirmation sequence so that unusually strong structural failures are not ignored.
Channel strength
In addition to the geometric relationship between the channel boundaries, ACR evaluates independent interactions with the upper and lower sides of the structure.
A cooldown between counted reactions helps prevent several neighboring candles from artificially inflating the channel-strength calculation. The weaker side of the channel limits the reaction-quality component, so a structure that is respected repeatedly on only one side does not automatically receive a maximum reaction score.
Channel lifetime
Channels are not intended to remain active indefinitely. The script can retire structures that become excessively old, remain without relevant interaction for too long, or expand to an excessive width relative to ATR.
Finished channels can remain visible for historical context. Active-channel projection is visual only and does not create historical trading signals.
Confirmed swings and visual behavior
The script uses confirmed swing points. Because a swing requires bars to form on both sides before confirmation, channel identification includes an unavoidable confirmation delay.
Channel lines may visually begin from their structural swing anchors to make the price structure easier to interpret. However, BUY, SELL, and BREAK conditions are evaluated only after the channel has actually been confirmed. Historical line placement should therefore not be interpreted as evidence that the channel was known at the earlier anchor bars.
Main inputs
Users can configure:
- Channel type
- Swing length
- Geometry tolerance
- Minimum channel quality
- ATR-normalized minimum width
- Reaction-strength weighting
- Touch tolerance and touch count
- Lower reaction zone
- Maximum lower-boundary penetration
- Rejection-wick requirements
- Optional bullish-candle and EMA filters
- Adaptive exit behavior
- Break buffers and confirmation requirements
- Channel lifetime
- Historical channel display and visual projection
Alerts
Alert conditions are provided for:
- BUY
- SELL
- BREAK
Optional alert() messages are also available for webhook-based workflows. Users should configure and test their own alert and automation setup before relying on it.
Originality
ACR is not a simple fixed-width channel or a standard moving-average crossover system. Its purpose is to combine confirmed swing geometry, volatility-normalized channel validation, independent boundary-reaction scoring, lower-channel rejection logic, adaptive breakout handling, and confirmed channel-break logic into one price-structure workflow.
The channel-quality model is designed to evaluate not only whether two boundaries can mathematically be drawn, but also whether price has demonstrated meaningful interaction with both sides of the structure.
Limitations
- Confirmed pivots introduce delay because swing points cannot be identified until subsequent bars have formed.
- Channel analysis is inherently sensitive to the selected swing length and market structure.
- A channel that worked historically may fail when volatility or market regime changes.
- BUY, SELL, and BREAK markers are analytical conditions, not guaranteed trade outcomes.
- The indicator does not account for commissions, slippage, liquidity, position sizing, or portfolio risk.
- This is an indicator, not a backtested strategy, so its markers should not be interpreted as strategy-performance statistics.
- Historical visual channel extensions do not imply that the structure was available to the indicator before confirmation.
ACR is intended to support independent technical analysis and risk management. It does not forecast future prices or guarantee profitable outcomes.
The indicator is intended to help traders study channel behavior, lower-boundary reactions, upper-boundary reactions, structural breaks, and potential continuation after an upside channel breakout. It is an indicator, not an automated trading strategy, and it does not predict future price movement.
How it works
ACR builds channels from the two most recently confirmed swing highs and swing lows. In Parallel mode, the boundaries are calculated from the slopes of the swing structures. In Range mode, horizontal support and resistance boundaries are used instead.
Candidate channels are filtered using several structural checks:
- Minimum channel width relative to ATR.
- Geometric agreement between the upper and lower boundaries.
- A channel-quality calculation based on geometry and independent price reactions near both boundaries.
- Touch separation logic to reduce repeated counting of adjacent candles as separate reactions.
ATR is used as a volatility-normalization mechanism so that channel width, penetration limits, break buffers, and reaction tolerances adapt to the instrument being analyzed.
Entry logic
The lower section of an active channel is treated as a reaction area rather than as one exact price.
Three entry-confirmation modes are available:
- Confirmed Rejection — requires price to interact with the lower reaction area, remain within the allowed penetration distance, close back inside the channel, and satisfy the configured lower-wick requirement.
- Close Back Inside — requires interaction with the lower area and a close back inside the channel.
- Touch Only — the most permissive mode and reacts to a qualified lower-area interaction.
Optional bullish-candle and EMA filters are available. They are disabled by default and are not required by the core channel logic.
Exit logic
ACR provides three exit modes:
- Adaptive — evaluates upper-channel rejection while allowing a sufficiently strong upside breakout to remain active. If the breakout subsequently fails and price closes back inside the channel by the configured amount, an exit can be generated.
- Upper Rejection — exits after a qualified rejection near the upper channel boundary.
- Upper Line Touch — exits when price reaches the upper boundary.
The Adaptive mode is designed to distinguish between a simple reaction at channel resistance and an expansion move through the upper boundary.
Channel breaks
Channel breaks are not based solely on an intrabar penetration. The indicator evaluates confirmed closes outside the channel using an ATR-based buffer.
Normal breaks can require multiple consecutive closes and directional follow-through. A substantially deeper ATR-based break can bypass the normal confirmation sequence so that unusually strong structural failures are not ignored.
Channel strength
In addition to the geometric relationship between the channel boundaries, ACR evaluates independent interactions with the upper and lower sides of the structure.
A cooldown between counted reactions helps prevent several neighboring candles from artificially inflating the channel-strength calculation. The weaker side of the channel limits the reaction-quality component, so a structure that is respected repeatedly on only one side does not automatically receive a maximum reaction score.
Channel lifetime
Channels are not intended to remain active indefinitely. The script can retire structures that become excessively old, remain without relevant interaction for too long, or expand to an excessive width relative to ATR.
Finished channels can remain visible for historical context. Active-channel projection is visual only and does not create historical trading signals.
Confirmed swings and visual behavior
The script uses confirmed swing points. Because a swing requires bars to form on both sides before confirmation, channel identification includes an unavoidable confirmation delay.
Channel lines may visually begin from their structural swing anchors to make the price structure easier to interpret. However, BUY, SELL, and BREAK conditions are evaluated only after the channel has actually been confirmed. Historical line placement should therefore not be interpreted as evidence that the channel was known at the earlier anchor bars.
Main inputs
Users can configure:
- Channel type
- Swing length
- Geometry tolerance
- Minimum channel quality
- ATR-normalized minimum width
- Reaction-strength weighting
- Touch tolerance and touch count
- Lower reaction zone
- Maximum lower-boundary penetration
- Rejection-wick requirements
- Optional bullish-candle and EMA filters
- Adaptive exit behavior
- Break buffers and confirmation requirements
- Channel lifetime
- Historical channel display and visual projection
Alerts
Alert conditions are provided for:
- BUY
- SELL
- BREAK
Optional alert() messages are also available for webhook-based workflows. Users should configure and test their own alert and automation setup before relying on it.
Originality
ACR is not a simple fixed-width channel or a standard moving-average crossover system. Its purpose is to combine confirmed swing geometry, volatility-normalized channel validation, independent boundary-reaction scoring, lower-channel rejection logic, adaptive breakout handling, and confirmed channel-break logic into one price-structure workflow.
The channel-quality model is designed to evaluate not only whether two boundaries can mathematically be drawn, but also whether price has demonstrated meaningful interaction with both sides of the structure.
Limitations
- Confirmed pivots introduce delay because swing points cannot be identified until subsequent bars have formed.
- Channel analysis is inherently sensitive to the selected swing length and market structure.
- A channel that worked historically may fail when volatility or market regime changes.
- BUY, SELL, and BREAK markers are analytical conditions, not guaranteed trade outcomes.
- The indicator does not account for commissions, slippage, liquidity, position sizing, or portfolio risk.
- This is an indicator, not a backtested strategy, so its markers should not be interpreted as strategy-performance statistics.
- Historical visual channel extensions do not imply that the structure was available to the indicator before confirmation.
ACR is intended to support independent technical analysis and risk management. It does not forecast future prices or guarantee profitable outcomes.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.