OPEN-SOURCE SCRIPT
Price Action Edge Finder [PUCHON]

📊 Price Action Edge Finder [PUCHON]
The Price Action Edge Finder is a powerful quantitative tool designed to turn standard candlestick patterns into actionable statistical data. Instead of just showing where a pattern occurs, this indicator calculates the **probability of success** and **expected return** over a specific lookahead period, giving traders a statistical edge.
✨ Key Features:
- 🕯️ Comprehensive Pattern Detection: Detects 15+ classic candlestick patterns including:
- Reversal: Engulfing, Morning/Evening Star, Harami, Piercing/Dark Cloud, Tweezers, Doji Stars, Three Inside Up/Down.
- Momentum: Three White Soldiers / Three Black Crows.
- 📊 Statistical Dashboard: A real-time table displaying:
- Count: Total occurrences of each pattern.
- Prob Up/Down %: Historical probability of price moving up or down after 'n' bars.
- Avg Return %: Average percentage return for winning moves.
- 📉 Trend Filter: Optional Moving Average (SMA/EMA) filter to trade with the trend.
- Bullish patterns are only valid above the MA.
- Bearish patterns are only valid below the MA.
- Visuals: Dynamic MA color (Green/Red) and background fill to clearly show trend direction.
- ⚙️ Fully Customizable: Enable/Disable specific patterns, adjust lookahead period, change table position, and more.
🧮 How It Works:
The indicator uses a "lookback" method to calculate performance without repainting.
1. Detection: Identifies if a pattern occurred on the current bar.
2. Lookahead: Checks the price action `n` bars later (user-defined).
3. Statistics: Updates the global stats (Count, Win Rate, Avg Return) based on the outcome.
Pine Script®
💡 Usage Tips:
- Use the Trend Filter to filter out low-probability counter-trend signals.
- Adjust the Lookahead Bars (n) to match your trading style (e.g., lower 'n' for scalping, higher 'n' for swing trading).
- Focus on patterns with high Prob % and Avg Return in the dashboard.
⚠️ Disclaimer:
Past performance is not indicative of future results. This tool provides historical statistics to aid decision-making but does not guarantee future profits. Always manage your risk.
The Price Action Edge Finder is a powerful quantitative tool designed to turn standard candlestick patterns into actionable statistical data. Instead of just showing where a pattern occurs, this indicator calculates the **probability of success** and **expected return** over a specific lookahead period, giving traders a statistical edge.
✨ Key Features:
- 🕯️ Comprehensive Pattern Detection: Detects 15+ classic candlestick patterns including:
- Reversal: Engulfing, Morning/Evening Star, Harami, Piercing/Dark Cloud, Tweezers, Doji Stars, Three Inside Up/Down.
- Momentum: Three White Soldiers / Three Black Crows.
- 📊 Statistical Dashboard: A real-time table displaying:
- Count: Total occurrences of each pattern.
- Prob Up/Down %: Historical probability of price moving up or down after 'n' bars.
- Avg Return %: Average percentage return for winning moves.
- 📉 Trend Filter: Optional Moving Average (SMA/EMA) filter to trade with the trend.
- Bullish patterns are only valid above the MA.
- Bearish patterns are only valid below the MA.
- Visuals: Dynamic MA color (Green/Red) and background fill to clearly show trend direction.
- ⚙️ Fully Customizable: Enable/Disable specific patterns, adjust lookahead period, change table position, and more.
🧮 How It Works:
The indicator uses a "lookback" method to calculate performance without repainting.
1. Detection: Identifies if a pattern occurred on the current bar.
2. Lookahead: Checks the price action `n` bars later (user-defined).
3. Statistics: Updates the global stats (Count, Win Rate, Avg Return) based on the outcome.
// Example: Updating stats for a Bullish Engulfing pattern
if show_bull_engulf and bull_engulf_detected[lookahead_n]
entry_price = close[lookahead_n]
exit_price = close
// Calculate % change and update probability stats
update_stats(stats_bull_engulf, entry_price, exit_price)
💡 Usage Tips:
- Use the Trend Filter to filter out low-probability counter-trend signals.
- Adjust the Lookahead Bars (n) to match your trading style (e.g., lower 'n' for scalping, higher 'n' for swing trading).
- Focus on patterns with high Prob % and Avg Return in the dashboard.
⚠️ Disclaimer:
Past performance is not indicative of future results. This tool provides historical statistics to aid decision-making but does not guarantee future profits. Always manage your risk.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.