Backtesting a Bearish Engulfing Reversal Pattern
Summary
This script turns a two candle bearish engulfing pattern into a short trading signal. The described setup follows an up move: a bullish candle is followed by a bearish candle whose real body contains the prior candle’s body. The implementation also checks a minimum prior body size, colors chart bars, opens a short position when the pattern is detected, and closes positions when the pattern condition no longer holds.
The script exposes take profit and stop loss distances in pips, but the document provides no backtest performance figures, market specification, or discussion of how the pattern performs across instruments and timeframes. Its accompanying description presents the setup as an educational illustration, so the code should not be treated as evidence that the reversal pattern is profitable. Costs, execution assumptions, and the effect of requiring the engulfing body to exceed the previous body are not analyzed in the text.
Key ideas
- The bearish engulfing setup uses a bullish candle followed by a bearish real body that contains the earlier body.
- The script requires the preceding candle body to meet a configurable minimum size.
- A detected pattern opens a short position, with configurable profit and loss distances in pips.
- The document gives no performance results or market specific validation for the setup.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.