OPEN-SOURCE SCRIPT

🚀 DocBrown V73++ Estrategia

189
Strategy Overview
The "DocBrown V73+ Unified Strategy" is a complex and multifaceted algorithmic trading system designed to operate in trending markets. Its core strategy is following the main trend, but its main strength lies in the numerous risk management modules and market filters it uses to protect capital and optimize trade exits.

The strategy combines classic trend indicators (EMAs, MACD, ADX) with volatility analysis (Bollinger Band Width) and volume to identify high-probability entry points. However, its most distinctive feature is its sophisticated exit system, which includes multiple Stop Loss (SL) and Take Profit (TP) types that adapt to various market conditions.

Entry Logic
To open a position (long or short), the strategy evaluates a set of conditions. The main entry is based on:

Market Regime Filter: This is a master filter that ensures trading is only carried out in favorable trend conditions. To do this, it simultaneously requires:

A minimum ADX to confirm the strength of the trend.

A minimum Bollinger Band Width (BBW) to ensure sufficient volatility.

A minimum slope in the slow EMA to confirm the market's direction.

EMA Alignment: Uses three Exponential Moving Averages (fast, medium, and slow). A long entry requires the fast EMA to be above the average, and the average above the slow EMA. For a short entry, the condition is the reverse.

Momentum Confirmation: The MACD must be crossed in the direction of the trade (the MACD line must be above the signal line for longs, and vice versa for shorts).

Volume Filter: The volume of the current candle must exceed a minimum ratio compared to its moving average to avoid signals of low market interest.

Trend Exhaustion Filter: Prevents new entries if the ADX, after reaching a very high peak, begins to decline, suggesting that the trend may be losing strength.

It also includes an alternative entry condition based on a "3-Candle Momentum," which looks for three consecutive candles in the same direction with progressively increasing volume, signaling a possible explosive move.

Risk Management and Exit Strategies
This is the most complex and robust part of the strategy, with multiple defense and profit-taking mechanisms:

Take Profit (TP)

Dynamic TP (Enabled by default): Instead of a fixed target, the strategy calculates the TP based on the nearest support and resistance levels. For a long position, it will look for the next resistance, and for a short position, the next support.

Trailing After a Breakout: If the price breaks an S&R level and the trade continues in favor, the strategy can move the SL to that broken level and recalculate a new TP target.

Stop Loss (SL) and Defensive Closes
The strategy features an arsenal of different types of Stop Losses for different situations:

Breakeven SL: Once the trade reaches a predefined profit percentage, the SL automatically moves to the entry price plus a small buffer to cover commissions. This ensures that a winning trade doesn't turn into a losing one.

Safety Bracket (Anti-Liquidation): This is an "emergency stop" that can be activated to prevent catastrophic losses. It is calculated based on the ATR or a fixed percentage of the price.

Adverse Volume Spike SL: Closes the position if a candle appears against the trade with abnormally high volume, which may indicate a violent reversal.

Consecutive Candle SL: If a certain number of candles (for example, 3.5) form in a row against the position, the strategy closes the trade to cut the loss.

Stagnant Stop: Closes the trade if it enters a loss and the price then remains sideways (without movement) for a defined number of bars, avoiding being trapped in a directionless position.

Derivative Stop (Anti-Trend and Counter-Trend): An advanced system that monitors price momentum and acceleration. If it detects that the price begins to move sharply against the trend after accumulating a certain amount of profit, it closes the position to protect profits.

Drawdown Stop (Loss): A special trailing stop that is only activated while the trade is in a loss. If the price attempts to recover but then falls again, this Stop is adjusted to minimize the loss from the peak of that small recovery.

Counter-Trend SL (BB-CT): Closes the position if, despite being in profit, the market shows clear signs of a trend reversal, such as the price returning within the Bollinger Bands and the MACD crossing against it.

Additional Features

Multi-Timeframe (MTF) Analysis: The strategy can run on a single chart (e.g., 1-minute) but makes all its decisions based on data from a longer timeframe (e.g., 5 or 15 minutes), allowing it to filter out market noise.

Frequency Control: Includes options to limit trades to one per candle and to set a cooldown period after closing a trade, preventing overtrading.

Date Filter: Allows backtesting over a specific timeframe.

Information Panel: Displays key data such as the strategy status, current TP/SL levels, unrealized profits (MFE), and the status of internal signals in real time on the chart.

Full Display: Draws S&R levels, EMAs, Bollinger Bands, and active entry, TP, and SL levels on the chart.

IMPORTANT:
Use in Isolated Leverage x5 (limit), start small and test tokens before jumping in.

DONATIONS: Token: USDT - Network: BSC Binance Smart Chain
Wallet: 0xe87b4589a53443d8ffed2e9b5a7ef58f261f087c

Declinazione di responsabilitĂ 

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.