It was Paul I think? I’ll try and find it.
Best you could achieve is to reduce profit / increase loss by spread values relative to Times in the code.
Above would then give a better comparison of backtest to Real Live results.
But then before starting on Real Live, the varying spread code would be commented out.
As an (easier) compromise, I enter an average of best case / worst case spread in the backtest engine.
For example, on the DJI I enter 4 for a 24 hour System. Maybe 4 is not enough as since Covid volatility as spread has not gone back to (pre Covid) market hours rate of, what was it, 1.6?? 🙂
PS
Ha … found it I think??
https://www.prorealcode.com/topic/spread-indicator-for-strategy/