Bearish Engulfing
"Bearish Engulfing Automatic Finding Script" by HPotter, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: Bearish Engulfing Automatic Finding Script (v2.0), read 2026-11-15T18:27:28.068Z; source language v6.
Licence: Mozilla Public License 2.0 (MPL-2.0) — full text. The source is published with it, modifications included, under the same licence.
Bearish Engulfing Automatic Finding Script by HPotter, ported from Pine v6. Overlay indicator with bar/background colouring, alerts and 2 inputs.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// (Notice added by FloSignals: the author's source carries none. It was published open-source on 2025-11-19; since 2019-07-26 the platform it was published on has released such a script under MPL-2.0 automatically.)
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 19/11/2025
//
// This is a bearish pattern formed by three candlesticks.
// The pattern is based on the fact that the last candlestick must
// completely engulf the previous two and be downward. The two preceding
// candlesticks must also be upward. Candlestick wicks are not taken
// into account.
//
// Smoothing increases the third bar to offset minor errors in equal
// closing and opening prices. The higher this value, the more patterns
// we obtain, but their quality decreases.
////////////////////////////////////////////////////////////
// ------------------------------------------------------------------------------------------------
// Original author: HPotter
// Original title: Bearish Engulfing Automatic Finding Script
// Licence: MPL-2.0 (the notice above was added by FloSignals; the original carries none)
// Pine version: 6
// Fetched: 2026-11-15
// Ported to FloScript by FloSignals; modifications under MPL-2.0.
// Converter: @flosignals/floscript 0.1.0, strict mode, score 100/100
// ------------------------------------------------------------------------------------------------
//@floscript=1
//@version=6
indicator(title="Bearish Engulfing", overlay=true)
accType = input.string("Percent", "Smoothing", inline="smoothing", options=["Ticks", "Percent"])
accValue = input.float(0, "", tooltip="Specify the value for the selected precision", inline="smoothing")
//Add Smoothing
pClose = close - accValue * syminfo.mintick
pOpen = open + accValue * syminfo.mintick
if accType == "Percent"
pClose := close - close * accValue / 100
pOpen := open + close * accValue / 100
signal = open > close and close[1] >= open[1] and close[2] >= open[2] and pClose <= open[1] and pClose <= open[2] and pOpen >= close[1] and pOpen >= close[2] ? true : false
if signal
alert("Bullish Engulfing Formed", alert.freq_once_per_bar_close)
barcolor(signal ? color.yellow : na)
This file is under the Mozilla Public License 2.0; it is a port of the original by HPotter, with the original licence header kept and the changes made for FloScript noted in the file.
- v1
Library refresh 2026-11-15
Disclaimer. Scripts are written and published by members, or ported by FloSignals from open-source originals, and are their authors' own work and opinion. FloSignals does not review them for correctness and nothing in a script is financial advice or a recommendation to buy or sell anything — read the Risk Disclaimer. Posting here is under the Community Rules; a script that is not the poster's to post can be reported as the Copyright & Takedowns page says.

Comments (0)
No comments yet. Members can leave one.