Strategy Overview: This trading strategy, named "Candlestick Bible: Dynamic Price Follower (Corrected)", is designed to trade based on candlestick patterns, the market trend, and price action dynamics. It generates long (buy) and short (sell) signals using a combination of:
Candlestick pattern recognition Exponential moving averages (EMA) Price movement analysis (ATR) The strategy does not include any position management logic (like trailing stops or exit rules). It simply enters trades based on specific conditions, and you would need to manually manage exits or apply additional rules for that.
Detailed Breakdown of Each Section: 1. Pattern Detection: This part of the strategy identifies specific candlestick patterns:
Pin Bar Detection: A "Pin Bar" is a candlestick with a long shadow (upper or lower) and a small body. The strategy looks for Bullish Pin Bars (when the lower shadow is at least twice the body size) and Bearish Pin Bars (when the upper shadow is at least twice the body size). Engulfing Pattern: The strategy detects Bullish Engulfing (when the current candlestick fully engulfs the previous bearish candlestick) and Bearish Engulfing (when the current candlestick fully engulfs the previous bullish candlestick). These patterns are used to trigger entry conditions in the strategy.
2. Dynamic Trend System: Exponential Moving Averages (EMAs): The strategy uses two EMAs to determine the current market trend: Fast EMA (8-period): A quicker-moving average, more responsive to recent price changes. Slow EMA (21-period): A slower-moving average that smooths out price action. The strategy compares the fast EMA to the slow EMA: If the fast EMA is above the slow EMA, the market is considered bullish. If the fast EMA is below the slow EMA, the market is considered bearish. This trend direction is important for confirming whether a long (buy) or short (sell) signal is valid.
3. Price Movement System: Average True Range (ATR): The strategy uses ATR (14-period) to gauge the market's volatility. Trail Offset: Although the exit logic for trailing stops has been removed, the ATR value is used to calculate the distance for potential trailing stops (for future strategies that might include exit rules). 4. Strategy Rules: Long (Buy) Condition: The strategy will enter a long position if either a Bullish Pin Bar or a Bullish Engulfing pattern is detected, and the market is in a bullish trend (i.e., the fast EMA is above the slow EMA). The closing price should also be above the slow EMA to confirm the strength of the bullish trend. Short (Sell) Condition: The strategy will enter a short position if either a Bearish Pin Bar or a Bearish Engulfing pattern is detected, and the market is in a bearish trend (i.e., the fast EMA is below the slow EMA). The closing price should be below the slow EMA to confirm the strength of the bearish trend. 5. Strategy Entries: The strategy will enter long positions when the long condition is met (i.e., a bullish candlestick pattern forms and the market is bullish). The strategy will enter short positions when the short condition is met (i.e., a bearish candlestick pattern forms and the market is bearish). No exit rules are implemented. Therefore, trades are entered but not automatically exited. 6. Visual Feedback: EMA Lines: The strategy plots the Fast EMA (blue) and Slow EMA (red) on the chart to visually represent the market’s trend. Entry Signals: The strategy uses plotshape to visually mark entry points: Green triangle (below the bar) indicates a long (buy) signal. Red triangle (above the bar) indicates a short (sell) signal. Summary of the Strategy's Actions: The strategy checks for Bullish or Bearish Pin Bars or Bullish or Bearish Engulfing patterns. It filters these signals by checking the market trend (using the Fast and Slow EMAs). It enters trades when both the candlestick pattern and market trend align: Long trade: If there is a Bullish pattern and the market is in a bullish trend. Short trade: If there is a Bearish pattern and the market is in a bearish trend. The strategy will not exit positions automatically (you would need to manually manage exits, or implement additional exit rules). What’s Missing: Position Management: No trailing stop or stop-loss logic is included in this version of the strategy. Once a position is opened, it will remain open until manually closed or additional exit conditions are added.
W prawdziwym duchu TradingView autor tego skryptu opublikował go jako open source, aby inwestorzy mogli go zrozumieć i zweryfikować. Pozdrowienia dla autora! Możesz go używać bezpłatnie, ale ponowne użycie tego kodu w publikacji podlega Zasadom Regulaminu. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.