OPEN-SOURCE SCRIPT
Atualizado

Multi-Band Comparison Strategy (CRYPTO)

Multi-Band Comparison Strategy (CRYPTO)
Optimized for Cryptocurrency Trading

This Pine Script strategy is built from the ground up for traders who want to take advantage of cryptocurrency volatility using a confluence of advanced statistical bands. The strategy layers Bollinger Bands, Quantile Bands, and a unique Power-Law Band to map out crucial support/resistance zones. It then focuses on a Trigger Line—the lower standard deviation band of the upper quantile—to pinpoint precise entry and exit signals.
Key Features

Bollinger Band Overlay
The upper Bollinger Band visually shifts to yellow when price exceeds it, turning black otherwise. This offers a straightforward way to gauge heightened momentum or potential market slowdowns.

Quantile & Power-Law Integration
The script calculates upper and lower quantile bands to assess probabilistic price extremes.
A Power-Law Band is also available to measure historically significant return levels, providing further insight into overbought or oversold conditions in fast-moving crypto markets.

Standard Deviation Trigger
The lower standard deviation band of the upper quantile acts as the strategy’s trigger. If price consistently holds above this line, the strategy interprets it as a strong bullish signal (“green” zone). Conversely, dipping below indicates a “red” zone, signaling potential reversals or exits.

Consecutive Bar Confirmation
To reduce choppy signals, you can fine-tune the number of consecutive bars required to confirm an entry or exit. This helps filter out noise and false breaks—critical in the often-volatile crypto realm.

Adaptive for Multiple Timeframes
Whether you’re scalping on a 5-minute chart or swing trading on daily candles, the strategy’s flexible confirmation and overlay options cater to different market conditions and trading styles.

Complete Plot Customization
Easily toggle visibility of each band or line—Bollinger, Quantile, Power-Law, and more.
Built-in Simple and Exponential Moving Averages can be enabled to further contextualize market trends.

Why It Excels at Crypto

Cryptocurrencies are known for rapid price swings, and this strategy addresses exactly that by combining multiple statistical methods. The quantile-based confirmation reduces noise, while Bollinger and Power-Law bands help highlight breakout regions in trending markets. Traders have reported that it works seamlessly across various coins and tokens, adapting its triggers to each asset’s unique volatility profile.

Give it a try on your favorite cryptocurrency pairs. With advanced data handling, crisp visual cues, and adjustable confirmation logic, the Multi-Band Comparison Strategy provides a robust framework to capture profitable moves and mitigate risk in the ever-evolving crypto space.
Notas de Lançamento
Lower quantile band now set to automatically display along with its corresponding lower std dev, which act as support in most cases. Chart picture cleaned up.
Notas de Lançamento
This update improves the realism of backtesting results, incorporating feedback to align with typical trading conditions for retail traders. The strategy now reflects practical risk management, realistic order execution, and trading costs.
Key Updates

Initial Capital:
The strategy starts with a $1,000 initial account size, which is realistic for retail traders.

Position Sizing:
Each trade now uses 10% of equity, amounting to $100 per trade at the beginning.

Slippage:
A slippage of 20 ticks is applied to account for the impact of market orders in real-world conditions.

Commission:
A commission rate of 0.005% per trade has been added to account for exchange fees (e.g., Binance).

No Pyramiding:
Pyramiding is set to 0, ensuring simplicity and alignment with the trading approach of typical retail users.

Default Confirmation Bars:
The default settings require only one confirmation bar for both entries and exits. This configuration applies to most trading situations, making the strategy adaptable to a wide range of market conditions while maintaining simplicity.

Backtesting Precision:
Bar magnifier functionality is enabled for tick-level backtesting, ensuring accurate results.

Performance Overview

Net Profit: 4.28% over the backtesting period.
Total Trades: 1,129 trades executed during the test.
Profit Factor: 1.138, indicating profitable performance.
Max Drawdown: Limited to 1.77%, showcasing excellent risk management.
Average Trade: +0.04% profit per trade.
Average Trade Duration: 8 bars per trade.

Trading Ranges

Backtesting Range: 2023-12-31 to 2025-01-18.
Trading Range: 2024-01-01 to 2025-01-18.

Additional Notes

This strategy update ensures:

Realistic market conditions with slippage and commission.
Adherence to risk management principles suited to retail traders.
Accurate backtesting results using tick-level precision for reliability.
Default confirmation settings of one bar, ensuring responsiveness to most market conditions while keeping the strategy easy to use.

Feel free to try this strategy and share your feedback!
Notas de Lançamento
Additional Backtest for Multi-Band Comparison Strategy (Bitcoin)

This publication provides a comprehensive overview of the backtest conducted on Bitcoin (BTC/USD), detailing all performance metrics, strategy settings, and assumptions. The goal is to offer full transparency and ensure a thorough understanding of how the strategy performs under realistic trading conditions.
Backtest Information

Trading Pair:
Bitcoin/USD (BTC/USD).

Trading Range:
From January 1, 2024, to January 18, 2025.

Backtesting Range:
From December 31, 2023, to January 18, 2025.

Timeframe:
The strategy was tested on a lower timeframe (short-term trading) with bar magnifier enabled for tick-level accuracy.

Strategy Settings

Initial Capital:
$1,000, representing a realistic retail trading account size.

Order Size:
10% of equity per trade (e.g., $100 per trade initially).

Slippage:
20 ticks, accounting for realistic execution conditions in Bitcoin markets.

Commission:
0.005% per trade, reflecting typical exchange fees on major platforms like Binance.

Pyramiding:
0 orders; no additional positions are added to existing trades.

Confirmation Bars:
The strategy uses 1 confirmation bar for both entries and exits, optimizing responsiveness to market conditions.

Margin:
0% for both long and short positions, ensuring trades are made on a fully funded basis with no leverage.

Backtesting Precision:
Bar Magnifier functionality is enabled for tick-level backtesting accuracy.

Performance Overview

Net Profit:
4.28% over the backtesting period.

Percent Profitable:
25.51%, meaning approximately 1 in 4 trades were winners.

Profit Factor:
1.138, indicating that the strategy generates more profit than loss over time.

Max Drawdown:
1.77%, showcasing excellent risk management and low downside risk.

Total Trades:
1,129 trades executed during the test.

Average Trade:
+0.04% profit per trade, consistent with tight risk and profit controls.

Average Trade Duration:
8 bars per trade, making this a short-term trading strategy.

Key Features

Default Confirmation Settings:
The strategy is configured to require 1 confirmation bar for both entries and exits. This default setting applies to most trading situations, making the strategy adaptable and straightforward.

Realistic Assumptions:
The backtest includes slippage, commission, and modest position sizing to align with live market conditions for Bitcoin trading.

Risk Management:
With a 10% equity allocation per trade and no pyramiding, the strategy is designed for consistent, sustainable performance.

Backtesting Precision:
Bar Magnifier ensures granular results, accounting for intra-bar movements at the tick level.

Why This Matters

This backtest on BTC/USD demonstrates the strategy’s robustness in a highly liquid market. By incorporating realistic assumptions, it provides traders with accurate expectations of how the strategy may perform in live trading. The results reflect a well-balanced approach to profit generation and risk control, suitable for both beginners and advanced traders.
Notas de Lançamento
Mods want slippage and commission from a backtest directly on the chart. NOTE: I believe this practice may cause some confusion. This was the result of a single backtest and is not necessarily indicative of the strategy's performance on every asset under the same conditions.

Aviso legal