PINE LIBRARY
three_line_strike_lib

"three_line_strike_lib"
This script is a Pine Script v5 library that identifies and visualizes classic candlestick reversal patterns—Three Line Strike and Engulfing Candles—for use in custom indicators or strategies.
Key Features
Candle Color Detection: Determines whether each candle is bullish (+1), bearish (-1), or neutral/doji (0).
Engulfing Logic:
Bearish Engulfing: A green candle followed by a larger red candle.
Bullish Engulfing: A red candle followed by a larger green candle.
The body size comparison ensures that only meaningful engulfing events are flagged.
Three Line Strike (3LS):
Bearish 3LS: Three consecutive bullish candles followed by a bearish engulfing candle.
Bullish 3LS: Three consecutive bearish candles followed by a bullish engulfing candle.
Customizable Plots:
Choose between standard shapes or fun meme icons (🍆 for bullish, 🍑 for bearish) to mark detected patterns on the chart.
Toggle display of Three Line Strike patterns and “Big A$$” (Engulfing) candles independently.
Alert Support: Signals can be tied to TradingView alerts for real-time notifications.
Usage
Import this library into your own Pine Script to access the exported functions:
candleColorIndex(barIndex) – returns candle color index.
isEngulfing(checkBearish) – checks for engulfing patterns.
isBearishEngulfing() / isBullishEngulfing() – shortcut functions.
is3LSBear() / is3LSBull() – detects Three Line Strike signals.
With the provided input toggles and plotting logic, traders can quickly highlight potential reversal or trend continuation points on any timeframe. This tool is especially useful for price action traders and scalpers seeking visual confirmation of these well-known candlestick setups.
This script is a Pine Script v5 library that identifies and visualizes classic candlestick reversal patterns—Three Line Strike and Engulfing Candles—for use in custom indicators or strategies.
Key Features
Candle Color Detection: Determines whether each candle is bullish (+1), bearish (-1), or neutral/doji (0).
Engulfing Logic:
Bearish Engulfing: A green candle followed by a larger red candle.
Bullish Engulfing: A red candle followed by a larger green candle.
The body size comparison ensures that only meaningful engulfing events are flagged.
Three Line Strike (3LS):
Bearish 3LS: Three consecutive bullish candles followed by a bearish engulfing candle.
Bullish 3LS: Three consecutive bearish candles followed by a bullish engulfing candle.
Customizable Plots:
Choose between standard shapes or fun meme icons (🍆 for bullish, 🍑 for bearish) to mark detected patterns on the chart.
Toggle display of Three Line Strike patterns and “Big A$$” (Engulfing) candles independently.
Alert Support: Signals can be tied to TradingView alerts for real-time notifications.
Usage
Import this library into your own Pine Script to access the exported functions:
candleColorIndex(barIndex) – returns candle color index.
isEngulfing(checkBearish) – checks for engulfing patterns.
isBearishEngulfing() / isBullishEngulfing() – shortcut functions.
is3LSBear() / is3LSBull() – detects Three Line Strike signals.
With the provided input toggles and plotting logic, traders can quickly highlight potential reversal or trend continuation points on any timeframe. This tool is especially useful for price action traders and scalpers seeking visual confirmation of these well-known candlestick setups.
Pineライブラリ
TradingViewの精神に則り、作者はPineコードをオープンソースライブラリとして公開し、コミュニティ内の他のPineプログラマーが再利用できるようにしました。作者に敬意を表します!このライブラリを個人的に、または他のオープンソースの投稿で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
Pineライブラリ
TradingViewの精神に則り、作者はPineコードをオープンソースライブラリとして公開し、コミュニティ内の他のPineプログラマーが再利用できるようにしました。作者に敬意を表します!このライブラリを個人的に、または他のオープンソースの投稿で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。