OPEN-SOURCE SCRIPT
已更新 Breakout Follow Trend [Strategy]

An automated trading system based on the Breakout Follow Trend strategy — specifically optimized for Gold (XAUUSD). This system trades Bollinger Band breakouts confirmed by Volume and filtered by EMA 200, leveraging pure mathematical statistics for rule-based execution.
source:
https://github.com/jzd101/breakout-follow-101
source:
https://github.com/jzd101/breakout-follow-101
版本注释
An automated trading system based on the Breakout Follow Trend strategy — specifically optimized for Gold (XAUUSD). This system trades Bollinger Band breakouts confirmed by Volume and filtered by EMA 200, leveraging pure mathematical statistics for rule-based execution.Source:
https://github.com/jzd101/breakout-follow-101
版本注释
Add compounding/fixed balance toggle, daily loss limit tracking, and expanded weekend trading blocks across all platforms.版本注释
Premium Visuals: TradingView version includes minimalist TP/SL boxes and entry lines that match native platform aesthetics, with zero text clutter.版本注释
### 📝 Change Log & Release Notes* **v1.08 — Optional Time Filter Toggle**
* Added **Enable Time Filter** toggle switch, allowing users to choose between restricted hourly trading sessions or 24/7 continuous market scanning.
* Optimized default trading session hours specifically for Gold (XAUUSD 15m) market dynamics.
* **v1.07 — EMA Body Overlap Filter & Cooldown Extension**
* Added **EMA Body Overlap Filter**: Blocks new trade entries if the signal candle's range (High/Low) straddles the 200 EMA, effectively filtering out false breakouts during market consolidation.
* Extended **Cooldown Bars** duration to 9 bars following position closure to prevent over-trading in choppy market conditions.
* **v1.06 — Cooldown Bars System & Profit Lock Fine-Tuning**
* Introduced **Cooldown Bars After Close/SL/TP**: Enforces a mandatory waiting period (in bars) before allowing new trade entries after any position closes.
* Fine-tuned **SL Move on Profit** default parameters for faster breakeven and profit protection.
* **v1.05 — Advanced SL Move on Profit (Trailing Lock)**
* Implemented automated **SL Move on Profit**: Shifts Stop Loss to lock in a percentage of target profit once price reaches a predefined Risk:Reward threshold (e.g., 0.2 RR trigger).
* Added visual chart styling: Chart boxes and SL/TP labels dynamically update colors upon trailing stop activation.
* **v1.04 — Visual History Persistence & On-Chart Dashboard**
* Added persistent **Trade History Visuals**: Closed trades retain entry/SL/TP boxes and outcome labels directly on the chart for easy visual backtesting review.
* Introduced an **On-Screen Dashboard Table**: Displays real-time strategy statistics including Realized Daily P&L, Active Orders, Cooldown Status, and Trading Session state.
* **v1.03 — Dynamic Risk Management & Daily Loss Limits**
* Implemented **Daily Loss Limit %**: Halts new entries for the remainder of the trading day if realized daily losses breach the predefined percentage threshold (1.0%).
* Supported both **Compounding Risk** (calculated from live equity) and **Fixed Balance** position sizing models.
* **v1.02 — Volume Filter & Indicator Refinements**
* Introduced **Volume Filter**: Validates breakout momentum by requiring volume to exceed its 15-period Moving Average.
* Refined Bollinger Bands and ATR calculation formulas for enhanced precision.
* **v1.01 — Pine Script v6 Upgrade & MT5 Parity**
* Upgraded strategy codebase to **Pine Script v6**.
* Implemented robust **NaN-Guards & Safety Validations** to ensure rock-solid indicator calculation stability.
* Achieved 100% mathematical and logic parity with the MetaTrader 5 (MQL5) EA implementation.
* **v1.00 — Core Strategy Initial Release**
* Initial release of the **Breakout Follow Trend** strategy.
* Primary trend direction filtered by **200 EMA**.
* Volatility breakout entries triggered by **Bollinger Bands (15, 1.5)**.
* Risk-managed Stop Loss and Take Profit calculated using **ATR (18, 2.0)** with a **2.2 Risk:Reward Ratio**.
---
### 📌 Core Strategy Highlights
- **Trend Filter**: 200 EMA + EMA Body Overlap Filter
- **Volatility & Entry**: Bollinger Bands (15, 1.5) Breakout + Volume MA (15) Filter
- **Dynamic Position Sizing**: Risk-based lot sizing (1.6% per trade) scaled by ATR distance
- **Profit Protection**: Automated SL Move on Profit (Trailing Breakeven / Lock-in)
- **Risk Controls**: Max Realized Daily Loss Limit (1.0%) + Compounding / Fixed Capital Modes
- **Chop Protection**: Post-trade Cooldown Bars (9 bars)
- **Session Control**: Customizable Trading Hours + Automated Weekend Exit (Friday 23:45)
Source: https://github.com/jzd101/breakout-follow-101
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。