You can do that already. You have the Spread variable, so you can let it fluctuate with any formula that you want. But I'm not sure if that really helps with backtesting, as it would introduce another random element in the test statistics.