Because backtest operates with open, high, low, close and ignores price movement within the bar we created some assumptions to execute the backtest faster and more accurately.

1. All indicators open and close trades in backtest at last price of a bar satisfying entry or exit rules except for the following:

  • Enter every N ticks above/below last entry.
  • Exit at Stop Loss: Close trade at Stop Loss price
  • Exit at Take Profit: Close trade at Take Profit price

2. If there are Stop Loss and Take profit for a trade to be executed within the same bar then Stop Loss is execution is primary.