INVITE-ONLY SCRIPT
已更新 Pro Bollinger Bands Strategy [Breno]

This strategy excels in highly volatile financial instruments, including cryptocurrencies, high-beta stocks, commodity futures, and certain exchange-traded funds (ETFs) that exhibit clear mean-reversion characteristics around their Bollinger Bands. The system's ability to utilize scaling (position averaging) and an ATR-based stop loss makes it particularly effective in markets with significant price swings, allowing the trader to capture profits from price extremes while managing increased volatility-related risk.
Core Strategy Logic
This Strategy implements a comprehensive trend-following and mean-reversion strategy primarily leveraging the Bollinger Bands (BB) indicator for entry and exit signals, complemented by an Average True Range (ATR)-based Stop Loss mechanism and an optional EMA filter. It is designed with robust features for capital management, including configurable leverage and a sophisticated position averaging (scaling) system.
Key Features and Customization
Bollinger Bands & Filters -
Risk and Capital Management -
Core Strategy Logic
This Strategy implements a comprehensive trend-following and mean-reversion strategy primarily leveraging the Bollinger Bands (BB) indicator for entry and exit signals, complemented by an Average True Range (ATR)-based Stop Loss mechanism and an optional EMA filter. It is designed with robust features for capital management, including configurable leverage and a sophisticated position averaging (scaling) system.
- Long Entry: A long position is initiated when the closing price crosses over the Lower Bollinger Band (ta.crossover(close,lowerBB)). This signals a potential mean-reversion opportunity following a price dip.
- Short Entry: A short position is initiated when the closing price crosses under the Upper Bollinger Band (ta.crossunder(close,upperBB)). (Note: Short entries are disabled by default in the script inputs).
- Exit Conditions (Profit Target): Long positions aim to exit upon interaction with the Upper Bollinger Band. Users can select from three exit methods:
- "Close When Touch": Exits when close≥upperBB.
- "Close Above then Below": Exits when the previous close was above the upper band, and the current close is below it (a reversal signal).
- "High Above": Exits when high>upperBB. The strategy features an optional profitOnly setting, which restricts all exits to only occur if the trade is currently in profit (i.e., close is above the strategy.position_avg_price for longs).
- "Close When Touch": Exits when close≥upperBB.
Key Features and Customization
Bollinger Bands & Filters -
- Customizable BB Parameters: The Length and Deviation of the Bollinger Bands are fully adjustable, allowing users to fine-tune the sensitivity of the entry and exit signals.
- Optional EMA Filter: An optional EMA Filter can be enabled to align entries with the prevailing trend, where a Long entry is only permitted if close≥EMA(EmaFilterRange).
Risk and Capital Management -
- Equity Allocation: Position size is dynamically calculated based on a Percentage of Equity (capitalPerc) combined with the set Leverage multiplier.
- Dynamic Stop Loss (ATR-Based):
An optional Stop Loss (SL) is calculated using a multiple (slAtrInput) of the Average True Range (ATR).
The SL is set relative to the entry price upon trade activation, providing a volatility-adjusted risk management layer. - Position Averaging (Scaling): The script supports the addition of multiple units (pyramiding) to an existing position based on three user-selected criteria:
- "No": No averaging.
- "Percent": Adds to the position if the price has dropped by a set percentage (addPct) from the average price.
- "ATR": Adds to the position if the current price is significantly below a calculated ATR-based support level from the average price.
- "No": No averaging.
發行說明
This strategy excels in highly volatile financial instruments, including cryptocurrencies, high-beta stocks, commodity futures, and certain exchange-traded funds (ETFs) that exhibit clear mean-reversion characteristics around their Bollinger Bands. The system's ability to utilize scaling (position averaging) and an ATR-based stop loss makes it particularly effective in markets with significant price swings, allowing the trader to capture profits from price extremes while managing increased volatility-related risk.Core Strategy Logic
This Strategy implements a comprehensive trend-following and mean-reversion strategy primarily leveraging the Bollinger Bands (BB) indicator for entry and exit signals, complemented by an Average True Range (ATR)-based Stop Loss mechanism and an optional EMA filter. It is designed with robust features for capital management, including configurable leverage and a sophisticated position averaging (scaling) system.
- Long Entry: A long position is initiated when the closing price crosses over the Lower Bollinger Band (ta.crossover(close,lowerBB)). This signals a potential mean-reversion opportunity following a price dip.
- Short Entry: A short position is initiated when the closing price crosses under the Upper Bollinger Band.
- Exit Conditions (Profit Target): Long positions aim to exit upon interaction with the Upper Bollinger Band. Users can select from three exit methods:
- "Close When Touch": Exits when close≥upperBB.
- "Close Above then Below": Exits when the previous close was above the upper band, and the current close is below it (a reversal signal).
- "High Above": Exits when high>upperBB. The strategy features an optional profitOnly setting, which restricts all exits to only occur if the trade is currently in profit.
- "Close When Touch": Exits when close≥upperBB.
Key Features and Customization
Bollinger Bands & Filters -
- Customizable BB Parameters: The Length and Deviation of the Bollinger Bands are fully adjustable, allowing users to fine-tune the sensitivity of the entry and exit signals.
- Optional EMA Filter: An optional EMA Filter can be enabled to align entries with the prevailing trend, where a Long entry is only permitted if close≥EMA(EmaFilterRange).
Risk and Capital Management -
- Equity Allocation: Position size is dynamically calculated based on a Percentage of Equity combined with the set Leverage multiplier.
- Dynamic Stop Loss (ATR-Based):
An optional Stop Loss (SL) is calculated using a multiple (slAtrInput) of the Average True Range (ATR).
The SL is set relative to the entry price upon trade activation, providing a volatility-adjusted risk management layer. - Position Averaging (Scaling): The script supports the addition of multiple units (pyramiding) to an existing position based on three user-selected criteria:
- "No": No averaging.
- "Percent": Adds to the position if the price has dropped by a set percentage (addPct) from the average price.
- "ATR": Adds to the position if the current price is significantly below a calculated ATR-based support level from the average price.
- "No": No averaging.
僅限邀請腳本
僅作者批准的使用者才能訪問此腳本。您需要申請並獲得使用許可,通常需在付款後才能取得。更多詳情,請依照作者以下的指示操作,或直接聯絡brenosilver。
TradingView不建議在未完全信任作者並了解其運作方式的情況下購買或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
Become a member of our Patreon to get Full access to all our private scripts:
https://patreon.com/BrenoAlphaScripts?utm_medium=unknown&utm_source=join_link&utm_campaign=creatorshare_creator&utm_content=copyLink
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
僅限邀請腳本
僅作者批准的使用者才能訪問此腳本。您需要申請並獲得使用許可,通常需在付款後才能取得。更多詳情,請依照作者以下的指示操作,或直接聯絡brenosilver。
TradingView不建議在未完全信任作者並了解其運作方式的情況下購買或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
Become a member of our Patreon to get Full access to all our private scripts:
https://patreon.com/BrenoAlphaScripts?utm_medium=unknown&utm_source=join_link&utm_campaign=creatorshare_creator&utm_content=copyLink
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。