Does enyone know how to write a strategy that tests which crossing is best for long and short entry from this indicatorfile?
Optimization moving average crossing strategy with “machine learning”
Thanks GraHal. I Will have a look.
I tested the code shared by GraHal. Please note that you need to define the periods of the two MAs as constant, i.e. if EMA[P1] crosses over/under HullAverage[P2]. This code doesn’t allow to goal seek which P1 and P2 best fit your strategy.
You can optimize the periods separately if you want, but it works on the basis that some MAs are inherently faster than others, even with the same period.
I agree, you can optimize the P1/P2 with backtest in ProOrder, but not as “machine learning” as suggested in the title of this topic.