Skip to content
All library documents

Inside Day Breakouts with Prior-Day Range Orders

Article Strategy library · Author: waranyutrkm

Summary

This script defines an inside day by checking whether the prior daily high and low both fall within the daily range from two days earlier. When that condition holds, it places stop entries at the prior day's high and low, subject to a selectable both-directions, long-only, or short-only setting. Quantity is calculated from strategy equity divided by the corresponding breakout price. The visible settings include a daily ATR length and an optional take-profit distance based on daily ATR, along with an option to close positions near the end of the New York session.

The available text is truncated during the trading logic, so later order handling and exits cannot be fully assessed. It includes performance metric calculations and alert-message construction, but no actual results or chart evidence. The all-equity sizing approach can create substantial exposure, and the shown logic does not establish how simultaneous breakout orders are managed after one side fills. Session handling, execution costs, gaps, and the script's backtest behavior would need evaluation before drawing conclusions.

Key ideas

  • An inside day is defined by the previous daily range fitting within the range from two days earlier.
  • The visible logic places stop entries at the previous day's high and low.
  • Trade direction can be restricted to both sides, long only, or short only.
  • Position quantity is calculated using strategy equity and the relevant breakout price.
  • The source is truncated, and it provides no performance results.

Tags

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