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.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。