The 3 Line Strike (3LS) pattern is a price action formation rooted in Japanese candlestick analysis. It is a relatively rare but powerful reversal signal, indicating a potential change in trend following a strong price sequence.
This indicator automatically detects such setups in real-time and highlights them directly on the chart, removing the need for manual identification.
The indicator by TheTrdFloor combines two well-known candlestick concepts:
Bearish Engulfing: A green (bullish) candle followed by a larger red (bearish) candle.
Bullish Engulfing: A red (bearish) candle followed by a larger green (bullish) candle.
This pattern requires a sequence of 3 consecutive candles in the same direction, immediately followed by a larger engulfing candle in the opposite direction, signaling a reversal.
Bearish 3 Line Strike (Sell Signal):
Three consecutive bullish (green) candles.
Followed by a larger bearish (red) engulfing candle.
A red downward arrow (▼) is drawn above the signal bar.
Bullish 3 Line Strike (Buy Signal):
Three consecutive bearish (red) candles.
Followed by a larger bullish (green) engulfing candle.
A green upward arrow (▲) is drawn below the signal bar.
The indicator also optionally displays simple engulfing candles using smaller symbols (⌃ and ⌄), which can be enabled or disabled via parameters.
You can control whether simple bullish or bearish engulfing candles are displayed with the following input parameters:
showBullEngulfing: Set to 1 to show bullish engulfing candles (⌃), or 0 to hide them.
showBearEngulfing: Set to 1 to show bearish engulfing candles (⌄), or 0 to hide them.
This allows you to focus solely on 3LS signals if desired.
This indicator works well on any timeframe, but it is generally more reliable on daily charts or higher, where candlestick formations carry more weight.
Automatically detects powerful reversal patterns.
Provides clear visual cues directly on the chart.
Easily integrates with price action-based strategies.
Not all signals are reliable; it’s recommended to use additional filters (like RSI, moving averages, or volume).
May produce premature signals in volatile or sideways markets.
//---------------------------------------------------------------------//
//PRC_3 Line Strike by TheTrdFloor
//version = 0
//09.04.24
//Iván González @ www.prorealcode.com
//Sharing ProRealTime knowledge
//---------------------------------------------------------------------//
//-----Inputs----------------------------------------------------------//
showBullEngulfing=0
showBearEngulfing=0
//---------------------------------------------------------------------//
//-----Candle Color
// -1 -> Red/Bearish
// 0 -> Doji
// +1 -> Green/BUllish
if close>open then
ret=1
elsif close<open then
ret=-1
else
ret=0
endif
//---------------------------------------------------------------------//
//-----Check for engulfing candles-------------------------------------//
sizePrevCandle=close[1]-open[1]
sizeCurrentCandle=close-open
isCurrentLargerThanPrevious=abs(sizeCurrentCandle)>abs(sizePrevCandle)
//---------------------------------------------------------------------//
//-----Check for bearish engulfing-------------------------------------//
//(green candle followed by a larger red candle)
isGreenToRed=(ret<0 and ret[1]>0)
checkBearish=isGreenToRed and isCurrentLargerThanPrevious
//-----Check for bullish engulfing-------------------------------------//
//(red candle followed by a larger green candle)
isRedToGreen=(ret>0 and ret[1]<0)
checkBullish=isRedToGreen and isCurrentLargerThanPrevious
//---------------------------------------------------------------------//
//-----Check for Bearish 3LS-------------------------------------------//
//3 green candles immediately followed by a bearish engulfing candle
is3LineSetupGreen = ret[1]>0 and ret[2]>0 and ret[3]>0
is3LSBear=is3LineSetupGreen and checkBearish
//---------------------------------------------------------------------//
//-----Check for Bullish 3LS-------------------------------------------//
//3 red candles immediately followed by a bullish engulfing candle
is3LineSetupRed=ret[1]<0 and ret[2]<0 and ret[3]<0
is3LSBull=is3LineSetupRed and checkBullish
//---------------------------------------------------------------------//
//-----Plots for the 3LS signal----------------------------------------//
if is3LSBull then
drawtext("▲",barindex,low-0.25*tr)coloured("green")
elsif is3LSBear then
drawtext("▼",barindex,high+0.25*tr)coloured("red")
endif
//---------------------------------------------------------------------//
//-----Plots Bullish/Bearish engulfing---------------------------------//
if showBullEngulfing and checkBullish and not is3LSBull then
drawtext("⌃",barindex,low-0.25*tr)coloured("green")
elsif showBearEngulfing and checkBearish and not is3LSBear then
drawtext("⌄",barindex,high+0.25*tr)coloured("red")
endif
//---------------------------------------------------------------------//
return