This works! After I stored some days of .t1 data, made my first tries in backtesting the 'Simple broker arbitrage example' to find out a suitable threshold and then tried a live demo - nothing happened. While printing the spreads to csv I found out that they behave quite differently from simulation with fixed spreads so it might be better to simulate with the variable spreads stored from live/demo environment. From the manual:

Quote:
Both .t1 and .t6 data can contain the current ask-bid spread, which is returned by the marketVal function. For backtesting with variable spread, set Spread = marketVal() in the script.

But how to store the spread in .t1 so that is accessible with marketVal()?