Skip to content
All library documents

Backtesting a No-Shadow Candlestick Signal

Article Strategy library · Author: Biffy

Summary

This script defines bullish and bearish candles with no wick on either end: an up candle has its low at or above the open and its high at or below the close, while a down candle has the inverse relationship. It also marks sequences in which two such candles move in the same direction. A configurable bar count determines when a position closes after a qualifying signal.

The backtest can trade either the single-candle signal or the two-candle signal, with entries placed at the close and exits triggered after the selected delay. The script includes a date range for testing and chart markers for signals and closes. However, the displayed strategy code uses a long entry call for both modes and does not show a corresponding short entry, even though bearish signals are plotted. The document supplies no strategy report, market, timeframe, cost assumptions, or performance results, so it establishes the rule mechanics but not their profitability or robustness.

Key ideas

  • A bullish signal requires a rising close and a candle without upper or lower shadows under the defined conditions.
  • A bearish signal applies the corresponding conditions to a falling close.
  • The script distinguishes single-candle alerts from two consecutive same-direction alerts.
  • A configurable delay controls when a trade is closed after a signal.
  • The shown backtest code enters long positions and provides no performance evidence or transaction-cost assumptions.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.