OPEN-SOURCE SCRIPT
已更新 Gaussian Channel Strategy – GC + Kijun + VAPI Gate

Gaussian Channel Strategy – Description
This strategy combines multiple technical tools into a rules-based trading system designed for crypto and other volatile markets. The main components are:
- **Gaussian Channel (GC):** Acts as the core trend filter. When price is above the Gaussian filter, conditions favor longs; when below, shorts are favored. The channel bands (high/low) also provide visual guidance of volatility and dynamic support/resistance.
- **Kijun-Sen (Ichimoku baseline, period 120):** Serves as a secondary trend filter. Long trades are only considered if price is above the Kijun-Sen, shorts only if price is below.
- **VAPI (Volume Accumulation Percentage Indicator):** Adds a volume confirmation layer. Long setups require positive accumulation, while short setups require negative accumulation. This helps to filter out low-volume and false signals.
- **Risk Management (ATR):** Stop-losses are set at 3× the ATR distance from entry, dynamically adjusting to volatility. Position sizing is calculated as a percentage of account equity at risk per trade.
- **Take Profit & Trailing Exit:** Positions are split into two legs. Leg A (30% of size) takes fixed profit at 0.75× the stop-loss distance (RR 0.75). Leg B (70% of size) uses a trailing stop that follows price with an ATR-based buffer, aiming to capture extended moves.
- **Trade Management:** Long and short entries are triggered only when all three conditions (GC, Kijun, VAPI) align. Exits are handled automatically through fixed TP, SL, and trailing stops.
Overall, the strategy seeks to balance safety and trend-following by combining a smooth Gaussian filter with trend/volume confirmation and adaptive risk management.
This strategy combines multiple technical tools into a rules-based trading system designed for crypto and other volatile markets. The main components are:
- **Gaussian Channel (GC):** Acts as the core trend filter. When price is above the Gaussian filter, conditions favor longs; when below, shorts are favored. The channel bands (high/low) also provide visual guidance of volatility and dynamic support/resistance.
- **Kijun-Sen (Ichimoku baseline, period 120):** Serves as a secondary trend filter. Long trades are only considered if price is above the Kijun-Sen, shorts only if price is below.
- **VAPI (Volume Accumulation Percentage Indicator):** Adds a volume confirmation layer. Long setups require positive accumulation, while short setups require negative accumulation. This helps to filter out low-volume and false signals.
- **Risk Management (ATR):** Stop-losses are set at 3× the ATR distance from entry, dynamically adjusting to volatility. Position sizing is calculated as a percentage of account equity at risk per trade.
- **Take Profit & Trailing Exit:** Positions are split into two legs. Leg A (30% of size) takes fixed profit at 0.75× the stop-loss distance (RR 0.75). Leg B (70% of size) uses a trailing stop that follows price with an ATR-based buffer, aiming to capture extended moves.
- **Trade Management:** Long and short entries are triggered only when all three conditions (GC, Kijun, VAPI) align. Exits are handled automatically through fixed TP, SL, and trailing stops.
Overall, the strategy seeks to balance safety and trend-following by combining a smooth Gaussian filter with trend/volume confirmation and adaptive risk management.
版本注释
Summary of New ChangesThe updated Gaussian Channel Strategy introduces several important enhancements:
1. Default Inputs Aligned to Optimized Settings
• Gaussian Poles = 4, Sampling Period = 144, ATR Length = 11
• SL = 4.5 × ATR, TP RR = 3.5, Risk = 3% of Equity
• Kijun-Sen = 130, VAPI Length = 10, Allocation 75% Fixed TP / 25% Trailing
2. Extra Percentage-Based Take Profit
• A new exit condition closes both long and short trades if price moves a fixed percentage from the entry price.
• Adjustable separately for longs and shorts (e.g., +10% above entry for longs, –10% below entry for shorts).
• This runs in parallel with existing RR-based TP, ATR-based stop-loss, and trailing stop.
3. Clearer Chart Signals
• Entry signals are marked separately for longs and shorts.
• Different shapes and colors are used for exits:
• Green circle = RR Take Profit
• Blue diamond = Extra % Take Profit
• Orange triangle = Trailing Stop
• Red X = Stop Loss
• This makes it easy to identify which condition closed a position when reviewing historical trades.
4. Bug Fixes and Stability
• Corrected Gaussian Channel filter calculation (removed invalid tuple indexing).
• Improved plotting so that channels and fills remain anchored when scrolling or zooming.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。