PROTECTED SOURCE SCRIPT
PinBar + PPR Detector (Alerts)

PinBar + PPR Detector (Alerts)
This indicator identifies two popular candlestick reversal patterns: Pin Bar and PPR. It provides clear visual signals on the chart and includes built-in alerts that trigger only after the bar closes.
Description
1. Pin Bar
A reversal pattern based on wick-to-body proportions.
The indicator detects bullish and bearish Pin Bars using:
Customizable wick-to-body ratio (wickFactor)
Optional candle-color filtering
Option to enable or disable Pin Bar detection
2. PPR (Previous Peak Reversal)
A price-action pattern based on breaking the previous candle's range:
Bullish PPR: a bullish candle closing above the high of a previous bearish candle
Bearish PPR: a bearish candle closing below the low of a previous bullish candle
Option to enable or disable PPR detection
Alerts
Two alert types are included:
“PinBar Detected” — triggers on any Pin Bar
“PPR Detected” — triggers on any PPR
All alerts fire only after the bar is confirmed (closed), ensuring reliable signals without repainting during candle formation.
Visual Signals
Bullish Pin Bar: green triangle below the candle
Bearish Pin Bar: red triangle above the candle
Bullish PPR: lime circle below the candle
Bearish PPR: orange circle above the candle
Settings
Enable/disable Pin Bar detection
Wick factor adjustment
Color filter for Pin Bars
Enable/disable PPR detection
Suitable For
Scalping
Intraday trading
Technical analysis
Algorithmic trading
Traders using reversal patterns in their strategies
This indicator identifies two popular candlestick reversal patterns: Pin Bar and PPR. It provides clear visual signals on the chart and includes built-in alerts that trigger only after the bar closes.
Description
1. Pin Bar
A reversal pattern based on wick-to-body proportions.
The indicator detects bullish and bearish Pin Bars using:
Customizable wick-to-body ratio (wickFactor)
Optional candle-color filtering
Option to enable or disable Pin Bar detection
2. PPR (Previous Peak Reversal)
A price-action pattern based on breaking the previous candle's range:
Bullish PPR: a bullish candle closing above the high of a previous bearish candle
Bearish PPR: a bearish candle closing below the low of a previous bullish candle
Option to enable or disable PPR detection
Alerts
Two alert types are included:
“PinBar Detected” — triggers on any Pin Bar
“PPR Detected” — triggers on any PPR
All alerts fire only after the bar is confirmed (closed), ensuring reliable signals without repainting during candle formation.
Visual Signals
Bullish Pin Bar: green triangle below the candle
Bearish Pin Bar: red triangle above the candle
Bullish PPR: lime circle below the candle
Bearish PPR: orange circle above the candle
Settings
Enable/disable Pin Bar detection
Wick factor adjustment
Color filter for Pin Bars
Enable/disable PPR detection
Suitable For
Scalping
Intraday trading
Technical analysis
Algorithmic trading
Traders using reversal patterns in their strategies
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. ومع ذلك، يمكنك استخدامه بحرية ودون أي قيود - تعرف على المزيد هنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. ومع ذلك، يمكنك استخدامه بحرية ودون أي قيود - تعرف على المزيد هنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.