https://ninjatrader.com/support/forum/showthread.php?t=112089 Gave this code away, use at your own discretion.
I don't understand the strategy from the code, but the equity curve would give me confidence. The correct way to use MA's - and an objective and simple trading technique - is in trend-following.Typically, trend-following systems kick off with deep draw-down in their equity curve, they accumulate losses fast as new positions are opened and many of these hit their stops but before the winners have time to make the curve climb. Once a break-point is reached, the curve can go stratospheric and does not return to negative, but is always liable to deep draw-downs as trends fail. Often in forex many apparently uncorrelated trends fail at the same time. But this curve matches the mental model I use, which tends to corroborate the value of the strategy.
I'm waiting for the edges to disappear, but its manifesting year over year. So conclusion is the edge is inherent in market mechanics and its part of markets fundamental nature to behave this way.