OPEN-SOURCE SCRIPT
ที่อัปเดต: Bollinger Bands Reversal Strategy Analyzer

█ OVERVIEW
The Bollinger Bands Reversal Overlay is a versatile trading tool designed to help traders identify potential reversal opportunities using Bollinger Bands. It provides visual signals, performance metrics, and a detailed table to analyze the effectiveness of reversal-based strategies over a user-defined lookback period.
█ KEY FEATURES
Bollinger Bands Calculation
Reversal Signals
Trade Direction
Performance Metrics
Visual Signals
Performance Table
Time Filtering
Customizable Display
█ PURPOSE
The Bollinger Bands Reversal Overlay is designed to:
█ IDEAL USERS
The Bollinger Bands Reversal Overlay is a versatile trading tool designed to help traders identify potential reversal opportunities using Bollinger Bands. It provides visual signals, performance metrics, and a detailed table to analyze the effectiveness of reversal-based strategies over a user-defined lookback period.
█ KEY FEATURES
Bollinger Bands Calculation
- The indicator calculates the standard Bollinger Bands, consisting of:
A middle band (basis) as the Simple Moving Average (SMA) of the closing price.
An upper band as the basis plus a multiple of the standard deviation.
A lower band as the basis minus a multiple of the standard deviation.
- Users can customize the length of the Bollinger Bands and the multiplier for the standard deviation.
Reversal Signals
- The indicator identifies potential reversal signals based on the interaction between the price and the Bollinger Bands.
- Two entry strategies are available:
- Revert Cross: Waits for the price to close back above the lower band (for longs) or below the upper band (for shorts) after crossing it.
- Cross Threshold: Triggers a signal as soon as the price crosses the lower band (for longs) or the upper band (for shorts).
- Revert Cross: Waits for the price to close back above the lower band (for longs) or below the upper band (for shorts) after crossing it.
Trade Direction
- Users can select a trade bias:
- Long: Focuses on bullish reversal signals.
- Short: Focuses on bearish reversal signals.
- Long: Focuses on bullish reversal signals.
Performance Metrics
- The indicator calculates and displays the performance of trades over a user-defined lookback period (barLookback).
- Metrics include:
Win Rate: The percentage of trades that were profitable.
Mean Return: The average return across all trades.
Median Return: The median return across all trades.
- These metrics are calculated for each bar in the lookback period, providing insights into the strategy's performance over time.
Visual Signals
- The indicator plots buy and sell signals on the chart:
- Buy Signals: Displayed as green triangles below the price bars.
- Sell Signals: Displayed as red triangles above the price bars.
- Buy Signals: Displayed as green triangles below the price bars.
Performance Table
- A customizable table is displayed on the chart, showing the performance metrics for each bar in the lookback period.
- The table includes:
- Win Rate: Highlighted with gradient colors (green for high win rates, red for low win rates).
- Mean Return: Colored based on profitability (green for positive returns, red for negative returns).
- Median Return: Colored similarly to the mean return.
- Win Rate: Highlighted with gradient colors (green for high win rates, red for low win rates).
Time Filtering
- Users can define a specific time window for the indicator to analyze trades, ensuring that performance metrics are calculated only for the desired period.
Customizable Display
- The table's font size can be adjusted to suit the user's preference, with options for "Auto," "Small," "Normal," and "Large."
█ PURPOSE
The Bollinger Bands Reversal Overlay is designed to:
- Help traders identify high-probability reversal opportunities using Bollinger Bands.
- Provide actionable insights into the performance of reversal-based strategies.
- Enable users to backtest and optimize their trading strategies by analyzing historical performance metrics.
█ IDEAL USERS
- Swing Traders: Looking for reversal opportunities within a trend.
- Mean Reversion Traders: Interested in trading price reversals to the mean.
- Strategy Developers: Seeking to backtest and refine Bollinger Bands-based strategies.
- Performance Analysts: Wanting to evaluate the effectiveness of reversal signals over time.
เอกสารเผยแพร่
Improved buy and sell plotsสคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน