Skip to content
All library documents

Inside Bar Breakout Entries with Candle-Range Risk Sizing

Article TradingView scripts

Summary

The strategy identifies an inside bar when the current candle’s high and low both fall within the previous candle’s range. It takes a directional cue from the previous candle: a bullish candle sets a buy stop above its high, while a bearish candle sets a sell stop below its low. Entry, stop-loss, and take-profit distances are configured as fractions of that candle’s range. When a new setup appears, pending orders are canceled and any open position is closed before orders are updated.

Position quantity is calculated from a chosen fraction of account equity divided by the distance between the planned entry and stop, tying nominal risk to the stop range. The script also lets users constrain the backtest dates. This is a rule description and implementation, not a report of tested returns. The sizing note assumes the account currency is the instrument’s counter currency; contract specifications, gaps, spread, and slippage can make realized risk differ from the estimate. The document gives no evidence that inside-bar breakouts outperform alternatives.

Key ideas

  • An inside bar is defined by a candle fully contained within the prior candle’s high-low range.
  • The prior candle’s direction selects a buy-stop breakout above its high or a sell-stop breakout below its low.
  • Entry buffers, stop distances, and profit targets are set as fractions of the prior candle’s range.
  • Trade size uses an equity risk fraction divided by the planned entry-to-stop distance, subject to currency assumptions.
  • A new pattern cancels pending orders and closes any existing position before updating the setup.

Tags

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