Hello. I'm working through the tutorials and currently learning about the WFO feature. I tested it using a tranditional MA crossover strategy, optimising for the fast and slow MA periods. It has some perculiar behaviour - see attached image.

When a new WFO test period arrives the strategy parameters suddenly changes and crossOver() is triggered, even though the "crossover" happened artificially due to the WFO parameter change. I would have thought it is better if any open trades continue to use their old parameters until they exit, and any new trades are started only if there is a crossover of the new MA values, not if the old -> new MA lines cross.

I tried reading the Walk Forward help page in the manual but couldn't figure out a straightforward way to do this. I can probably ignore the first WFO bar (if (WFOBar == 0) return;) to avoid creating the new trades. But not sure how to exit the old trades using the old parameters? Maybe I have to store some metadata when opening trades like what params are needed to exit it, and only use the params the WFO cycle has given for opening new trades?

It's easy to see with an MA crossover strategy but in general I'm concerned it will cause subtle strangeness when the strategies are more complicated.

Attached Files Capture.png