Code Library / Entry Signals
Candlestick Patterns
Detect engulfing and doji patterns.
Language: Pine Script · Category: Entry Signals · Tags: candlestick, engulfing, Pine Script
Source code
//@version=5
indicator("Candle Patterns", overlay=true)
body = math.abs(close-open)
bullEngulf = close[1]<open[1] and close>open and close>=open[1]
plotshape(bullEngulf,"Bull",shape.triangleup,location.belowbar,color.green)How to use this snippet
This is a building block, not a finished trading system. Paste it into your own Pine Script project, compile it, and test it on a demo account with your broker's real spreads before relying on it. You can convert it to MQL4 or MQL5 with the Pine Script converter.