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


7 comments:

  1. Today we had a good performance with the classic settings ; ES 600 ticks, EMA 118...
    ...it looks like the volatility is back...

    ReplyDelete
  2. Pablo - In your experience , will the performance be increased by using confluences of moving averages on other timeframes as well? I am looking at using a main timeframe with your ATM strategy, letting it submit the orders, but then cancelling those orders where there are no confluence.

    Thanks
    Martin

    ReplyDelete
  3. What has helped increase my performance is only taking the trade if the bar has closed through the seperation envelope.If in a trade and it does not close through the envelope go flat when the market hits the ema and do not reverse. A setting for CL that I like is 6 Range chart EMA 96 PT +10 S/L -20 Trade time 930 to 215 ET +7 move stop to B/E....Enjoy...Mark

    ReplyDelete
  4. Martin, in my experience, the best results can be achieved at the confluence of moving averages from different and uncorrelated timeframes...
    I calculate profiles (profit vs period) from minute, tick, volume and range charts because there is no correlation between them. Only one profile for each one is enough. Only range charts are not correlated one each other, so we can calculate profiles for several range charts.
    I look for 2moving averages on each timeframe ( one fast and other slow) and do the same on 2different range charts....
    Plotting all those lines together, we can create zones of high probability of success...
    Pablo

    ReplyDelete
  5. Forgot the most important part for CL trade above seperation of 11

    ReplyDelete
  6. Thanks for the replies - Pablo - to plot all those ema s from the different timeframes on one chart I will need to get your OT indicator.

    Mark - thank you for the settings - I will have a look at them.

    Martin

    ReplyDelete
  7. Martin,

    I will send you the OT pack... used with the PM_EMA has a great value...
    Regards,
    Pablo

    ReplyDelete