Thursday, September 6, 2012

Trading a Moving Average

Is it possible to define a trade system only with a moving average (MA) ?
That would be something like this ;
If price is above the MA then we place a limit order at its price value...
If price is below, then we place a sell limit at the MA price value...
We could also define a zone where no trades should be placed...
...let say, while price is too close the MA, then we have no trend ; so no trades.
If price goes far enough from the MA, then we have a defined trend, so we start chasing the MA.
Sounds easy...but ;
Can we find a combination of timeframe and period of MA that produces results ?

I created a long time ago a strategy that exploits that edge, it is called PM_EMA and its first purpose was just that ; find good moving averages to work with...

Using the Strategy Analyzer Tool on Ninjatrader we can run an optimization process where we test the strategy using a range of moving averages, and then create a chart where we can get the PnL vs period ( see attached picture )


The horizontal axis represents the period of an exponential moving average, the histogram is the Profit/Loss of trading it with fixed target and stop. The red line is the number of trades ( its value is on the right vertical axis ).
So we must find the best spots where the profit is maximized and the number of trades is low enough to cover the comisions...

I started this thread to all those followers as me to discuss the best settings we find about this setup.
Regards,
Pablo