OPEN-SOURCE SCRIPT
Volatility Breakout System [Fixed Risk]

[Description]
This is a trend-following breakout strategy designed to capture volatility expansion while filtering out low-momentum "chop." It is built on the philosophy that significant price moves are often preceded by a breakout of volatility bands (Keltner Channels) accompanied by Volume and Trend Strength (ADX).
Strategy Logic:
Volatility Breakout: The primary trigger is a candle closing outside the Keltner Channels. This indicates price is moving faster than the average range.
Trend Filter: Trades are only taken in the direction of the 200 EMA.
Momentum Filter (ADX): The ADX filter ensures we only enter when the trend strength is above a specific threshold (Default: 20). This prevents the strategy from buying tops or selling bottoms in ranging markets.
Volume Confirmation: A breakout without volume is often a fake-out. This script requires volume to be higher than the moving average.
Risk Management (Automated):
Stop Loss: Based on ATR (Average True Range) to adapt to current market volatility.
Trailing Stop: Once the trade moves in favor, a trailing stop is activated to lock in profits.
Breakeven: If price moves X% in favor, the Stop Loss is automatically moved to the entry price to protect capital.
Cooldown: Includes a safety mechanism to prevent over-trading immediately after a signal.
Backtesting Notes:
This script is set up with use_bar_magnifier=true. For accurate results, use this on higher timeframes (1H, 4H) or ensure you have a Premium account for intrabar inspection.
Inputs:
You can toggle the "Compounding" feature to test fixed cash vs. % equity growth.
Webhooks are fully configurable for alert automation.
This is a trend-following breakout strategy designed to capture volatility expansion while filtering out low-momentum "chop." It is built on the philosophy that significant price moves are often preceded by a breakout of volatility bands (Keltner Channels) accompanied by Volume and Trend Strength (ADX).
Strategy Logic:
Volatility Breakout: The primary trigger is a candle closing outside the Keltner Channels. This indicates price is moving faster than the average range.
Trend Filter: Trades are only taken in the direction of the 200 EMA.
Momentum Filter (ADX): The ADX filter ensures we only enter when the trend strength is above a specific threshold (Default: 20). This prevents the strategy from buying tops or selling bottoms in ranging markets.
Volume Confirmation: A breakout without volume is often a fake-out. This script requires volume to be higher than the moving average.
Risk Management (Automated):
Stop Loss: Based on ATR (Average True Range) to adapt to current market volatility.
Trailing Stop: Once the trade moves in favor, a trailing stop is activated to lock in profits.
Breakeven: If price moves X% in favor, the Stop Loss is automatically moved to the entry price to protect capital.
Cooldown: Includes a safety mechanism to prevent over-trading immediately after a signal.
Backtesting Notes:
This script is set up with use_bar_magnifier=true. For accurate results, use this on higher timeframes (1H, 4H) or ensure you have a Premium account for intrabar inspection.
Inputs:
You can toggle the "Compounding" feature to test fixed cash vs. % equity growth.
Webhooks are fully configurable for alert automation.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.