Announcement

Collapse
No announcement yet.

Backtesting when a bar crosse both entry and stop levels

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Backtesting when a bar crosse both entry and stop levels

    When backtesting, a historical bar may, say for a buy order, have its high above the entry price, and its low below the stop price. Whether this enters and stops a trade within the one bar would depend on whether it crossed the stop level before or after the entry level - if price crossed the stop, then later crossed the entry level, then the order would start a trade that would survive into the next bar rather than being stopped out on the entry bar.

    For history bars, a simple script only has access to OHLC values, and can't accurately distinguish between a bar that starts then stops a trade and one that starts a trade that survives. On a daily chart, would it be possible to get access to the shorter period data (such as 15 minute bars) for such a bar, to sort out if it crosses the stop before or after the entry?
Working...
X