OPEN-SOURCE SCRIPT

BTCUSDT Daily - Enhanced Bitcoin Bull Market Support [CYRANO]

The Enhanced Bitcoin Bull Market Support Strategy is designed to identify and trade Bitcoin's bullish trends on the daily timeframe. It uses long-term moving averages, momentum indicators, and volatility measures to enter trades during strong upward trends while dynamically managing risk and optimizing profit-taking.

Key Features
Bull Market Detection:
The strategy focuses on trading only in bullish market conditions, defined as:
The price is above the 200-day Simple Moving Average (SMA).
The price is above the 21-week Exponential Moving Average (EMA).

Momentum Filters:
RSI Filter: Ensures trades are only taken when momentum is positive (RSI > 50).
ADX Filter: Confirms the trend is strong by requiring the ADX value to exceed a specified threshold (e.g., 25).

Dynamic Risk Management:
Uses the Average True Range (ATR) to calculate a dynamic stop-loss level based on market volatility.
Stop-loss is set below the current price by a user-defined multiple of the ATR.

Profit Optimization:
Incorporates a percentage-based take profit mechanism to exit trades once the price reaches a specific profit level.

Trade Execution:
Long Only: The strategy only enters and exits long positions.
Trades are entered when all conditions align and exited when the price falls below either the 200-day SMA or the 21-week EMA.

Customizable Timeframe:
Includes a Date Range Filter to allow testing and execution over specific periods (e.g., from 2018-01-01 to 2069-12-31).

Visual Aids:
Plots the 200-day SMA and 21-week EMA on the chart.
Highlights the chart background with green during bull markets (price above both SMA and EMA) and red during bear markets.

Entry Conditions
The price must be above both the 200-day SMA and the 21-week EMA.
The RSI (Relative Strength Index) must be greater than 50 (optional, user-configurable).
The ADX (Average Directional Index) must exceed a user-defined threshold, indicating a strong trend (optional, user-configurable).

Exit Conditions
The price falls below either the 200-day SMA or the 21-week EMA.
The trade is automatically closed if the dynamic stop-loss or take-profit levels are triggered.

User Inputs
Moving Averages:
Length of the SMA (default: 200 days).
Length of the EMA (default: 147 days, approximating 21 weeks).

Volatility (ATR):
ATR length (default: 14 days).
Stop-loss multiplier (default: 2x ATR).

Momentum Indicators:
Enable or disable RSI and ADX filters.
Configure RSI length (default: 14) and ADX threshold (default: 25).

Take Profit:
Set a percentage-based take-profit target (default: 10%).

Date Range:
Define a start and end date for backtesting and live execution.

Strengths
Long-Term Focus: Designed for traders and investors aiming to capture macro trends.
Risk Management: Incorporates dynamic stop-loss and take-profit to optimize returns and reduce losses.
Customizable: Flexible parameters to adapt to changing market conditions.

Use Case
This strategy is best suited for swing traders and long-term investors who want to capitalize on Bitcoin's sustained bullish trends while managing risk effectively. It works best on the daily timeframe, ensuring reliable signals and minimizing noise from intraday price fluctuations.
Average Directional Index (ADX)Average True Range (ATR)Moving Averages

Script open-source

In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?

Declinazione di responsabilità