Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // @version=4
- // Three Line Strike Candlestick Pattern (3 candle Engulfing patern) to help you detect sniper entry point mostly for (forex)
- // Based on Arty (The moving average) youtube video channel
- // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
- // © moamenmostafa based on @amri_pangestu script
- study(title = "3 Candle Engulfing", overlay = true)
- // Inputs
- minEngulfPips = input(title="Min. Engulf Pips", type=input.integer, defval=10, minval=1) / 10
- // Logic
- isBullEngulf = open[3] > close[3] ? open[2] > close[2] ? open[1] > close[1] ? close > open ? close >= open[1] ? close[1] >= open ? close - open > minEngulfPips ? close - open > open[1] - close[1] ? true :false :false :false :false :false :false :false :false
- isBearEngulf = open[3] < close[3] ? open[2] < close[2] ? open[1] < close[1] ? open > close ? open >= close[1] ? open[1] >= close ? open - close > minEngulfPips ? open - close > close[1] - open[1] ? true :false :false :false :false :false :false :false :false
- // Graphics
- barcolor = isBullEngulf ? color.yellow : isBearEngulf ? color.white : na
- barcolor(color = barcolor, title= "Engulf Candle Color")
- plotshape(isBullEngulf, style=shape.triangleup,
- location=location.belowbar, color=color.green, size = size.small, title= "Bull Engulf Mark")
- plotshape(isBearEngulf, style=shape.triangledown,
- location=location.abovebar, color=color.red, size = size.small, title= "Bear Engulf Mark")
- // Alerts
- if (isBullEngulf)
- alert(message = "Bullish Engulfing", freq = alert.freq_once_per_bar_close)
- if (isBearEngulf)
- alert(message = "Bearish Engulfing", freq = alert.freq_once_per_bar_close)
Advertisement
Add Comment
Please, Sign In to add comment