WFO parameter change

Posted By: mun

WFO parameter change - 07/24/22 21:02

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 picture Capture.png
Posted By: Petra

Re: WFO parameter change - 07/25/22 07:20

DataHorizon

https://zorro-project.com/manual/en/dataslope.htm

Won't help with exiting though, the fix for that would be closing all open trades. But I think no one would do that.
Posted By: mun

Re: WFO parameter change - 07/25/22 08:40

I see, thank you Petra laugh
© 2024 lite-C Forums