The backtest loop
Pfill = Ot+1
- t
- the bar on which the rule decides; its close is the last price the rule has read
- Ot+1
- the open of the next bar: the first price after the decision (Ot is bar t's open, Ct its close)
- Pfill
- the price the order fills at: a next-bar fill. A same-close fill would use Ct, the close the rule just read