Support answered and solved the problem:

The variable Hedge has to be set to 2. This solves the problem with trading options together with the underlying and the script works fine.

However the result chart is not usable, unfortunately. The result's picture looks like there are hundreds of positions opened and that they are closed at the end of the whole trading period. So it's full of lines, all of them ending at one point. The result pictures are nice for publishing online articles and making Zorro famous! laugh Very important laugh