OPEN-SOURCE SCRIPT

Consecutive Bearish Candle Strategy

█ STRATEGY DESCRIPTION
The "Consecutive Bearish Candle Strategy" is a momentum-based strategy designed to identify potential reversals after a sustained bearish move. It enters a long position when a specific number of consecutive bearish candles occur and exits when the price shows strength by exceeding the previous bar's high. This strategy is optimized for use on various timeframes and instruments.

█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
  • The close price has been lower than the previous close for at least `Lookback` consecutive bars. This indicates a sustained bearish move, suggesting a potential reversal.
  • The signal occurs within the specified time window (between `Start Time` and `End Time`).


2. EXIT CONDITION
  • A Sell Signal is generated when the current closing price exceeds the high of the previous bar (`close > high[1]`). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.


█ ADDITIONAL SETTINGS
  • Lookback: The number of consecutive bearish bars required to trigger a Buy Signal. Default is 3.
  • Start Time and End Time: The time window during which the strategy is allowed to execute trades.


█ PERFORMANCE OVERVIEW
  • This strategy is designed for markets with frequent momentum shifts.
  • It performs best in volatile conditions where price movements are significant.
  • Backtesting results should be analysed to optimize the `Lookback` parameter for specific instruments.
Breadth IndicatorsChart patternsconsecutivedaytradingIndicesmeanQQQreversalreversionSPDR S&P 500 ETF (SPY) StocksTrend Analysis

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité