Trading With Moving Averages | Forex Factory

HeroPoker_HeroPoker扑克_HeroPoker德扑圈官网

Attachments: Trading With Moving Averages

Trading With Moving Averages

I don抰 normally use moving averages to trade Forex, moving averages are just price distortions and while distortions can be a useful way of filtering out the market抯 random 憂oise?they抮e not the most effective way. But using the average high and low prices can be a good way of picking decent levels for entries and exits. The full system can be found here trading with moving averages but here抯 the basic details ?/font>

Compare the opening price to the price the market closed at four months (80 days) ago, if the price is higher now the trend is up and the system is restricted to taking long trades only, if the price is lower now the trend is down and we take only shorts.


Set an 憃pen at?order daily until the level is hit and a trade is opened, take a long trade in an uptrend when the price falls to (yesterday抯 low + the day before yesterday抯 low)/2. Set a short trade to open when the price rises to (yesterday抯 high + the day before yesterday抯 high)/2 during a downtrend. This gets you in a decent price and in the direction of the long-term trend. You can open another trade the next day if you get another favourable price then.


Protect each trade with a take profit at/limit order. The profit taking orders should be set at (yesterday抯 high + the day before yesterday抯 high)/2 for long trades and (yesterday抯 low + the day before yesterday抯 low)/2 for shorts. Adjust all your trade's limit orders daily if they抮e not hit. You might end up with more than one trade open at a time but they抣l all be closed at the same time.


The results for the last decade (beginning of 2000 to end of 2010) are pretty good. With no stop-losses the results are -


EUR/USD. 553 trades, 71.25% are winners. Pips won to pips lost ratio 1.50 to 1.

GBP/USD. 562 trades, 66.37% are winners. Pips won to pips lost ratio 1.24 to 1.
USD/JPY. 496 trades, 65.93% are winners. Pips won to pips lost ratio 1.33 to 1.
USD/CHF. 593 trades, 70.66% are winners. Pips won to pips lost ratio 1.64 to 1.
USD/CAD. 550 trades, 67.45% are winners. Pips won to pips lost ratio 1.27 to 1.
AUD/USD. 530 trades, 66.98% are winners. Pips won to pips lost ratio 1.24 to 1.

I suggested several ways to improve the system on my blog and if anyone would like to share any ideas they have for how to improve this here (i.e. by reducing the size of the losers whilst still keeping number of winners to losers good) I'd be grateful for their ideas and suggestions.


could you please attach charts about entry and close ponts
and I want to say that trade with no stop loss s dangerous!

I don抰 normally use moving averages to trade Forex, moving averages are just price distortions and while distortions can be a useful way of filtering out the market抯 random 憂oise?they抮e not the most effective way. But using the average high and low prices can be a good way of picking decent levels for entries and exits. The full system can be found here trading with moving averages[font=Verdana][size=2] but here抯 the basic details...
Hi there,

I don't really think a chart will explain it; because entries and exits are based on a simple formula rather than a pattern if that makes sense. It's purely mechanical. It's probably best explained in pseudo code actually -

 

  1. If ((Open > Close 80 Days Ago) AND (Low <= ((Yesterday抯 Low + The Day Before Yesterday抯 Low)/2))) THEN Go Long At ((Yesterday抯 Low + The Day Before Yesterday抯 Low)/2)
  2. If (High >= (Yesterday's High + The Day Before Yesterday's High)/2) THEN Close Long Position(s) At (Yesterday's High + The Day Before Yesterday's High)/2)
  3. If ((Open < Close 80 Days Ago) AND (High >= ((Yesterday抯 High + The Day Before Yesterday抯 High)/2))) THEN Go Short At ((Yesterday抯 High + The Day Before Yesterday抯 High)/2)
  4. If (Low <= (Yesterday's Low + The Day Before Yesterday's Low)/2) THEN Close Short Position(s) At (Yesterday's Low + The Day Before Yesterday's Low)/2)

In particular, I'm looking for ideas for stop-losses and other ideas to make the size of the few big losers smaller.

interesting system. how did u test ? u have EA ? looks like 2010 has negative yield.
In particular, I'm looking for ideas for stop-losses and other ideas to make the size of the few big losers smaller.
Try Daily ATR(20) by itself or with a reasonable multiplier, like 2 or something.

You'll need to experiment.
interesting system. how did u test ? u have EA ? looks like 2010 has negative yield.
He copy+paste the results and pseudo code from the link in the first post.
interesting system. how did u test ? u have EA ? looks like 2010 has negative yield.
I downloaded daily historial Forex data from metatrader and used SQL. But the lanaguage used to test it isn't that important, test it with any suitable piece of software and you'll get the same results.

The system is designed to take little time to use, at the end of each day all you have to do is adjust your orders/take profit levels.

The one problem is when you get a big move against you, you know, one of those periods of a week or two where the price just keeps moving in the same direction and doesn't stop, it needs a mechanical method for dealing with those. If such a large move is in the trade's faviour there's an exit signal, if it's against the trade the system needs a way to avoid hanging on in those conditions but not 'normal' movements against it...
As usual David, very good stuff. I wish you a very profitable new year!

Some ideas:
* Since you're looking to position on the trend direction - how about a usual trail exit (like chandelier)? Or stay in a long trade as long as each bar closes higher than the previous one but no more than 3 bars (incoming correction probability increases).
* Remove the trend filter all together - since you don't do any trailing but exit on favorable momentum.

A thing that I miss from you performance studies are other performance metrics that I find important when evaluating a trading system. Things like CAGR, Max equity drawdown %, Longest total equity drawdown (months), Profit Factor (although this one is calculable from your metrics) etc.

Cheers,
-soso
Trading = a mirror to your human flaws. Fix them or be fixed.
Thanks soso,

Hope you make loadsa cash this year too

I don't normally even go for systems like this as I'm still a firm believer that simply following the trend until it ends is best - but systems that trade a lot more often than trend following systems do is something a lot of people seem interested in so I thought I'd give it a try. Thanks for the idea's, I'll give them some serious thought.
David I've read a lot systematic/quantitative trading stuff lately and one thing that stood out regarding diversification is that besides assets diversification there is also systems diversification.

Have a look at trend following wizards performance in the past years and you can see that some of them are struggling (e.g. Bill Dunn and William Eckardt funds).

The idea is that the equity curve can be smoothened by also diversifying across systems. Or rather systems that are based on "uncorelated" concepts. Take trend following and mean reversion systems for example. Or long term trend following vs following the short term trend/momentum direction.

And although this system (in the original form you exposed) looks to trade in the direction of the main trend it is not really a trend following concept since you close quickly.
So to me it looks that the core concept of this system would be a nice complement of a long term trend following concept. Of course taking the concept to the next level, putting it into a real trading system.

Here's some good resources I follow, maybe you're familiar with them but either way:
http://www.automated-trading-system.com/
http://marketsci.wordpress.com/

Cheers,
-soso
Trading = a mirror to your human flaws. Fix them or be fixed.
P.S. More and more I'm concluding that fully systematic trading is the way to go (for me!). I'm not talking about taking some indicators, writing an EA, testing it with the stupid MT backtester and going live.

I'm talking about real QE analysis & system development, which are not common at all in fx forums unfortunately (or not! ).
Trading = a mirror to your human flaws. Fix them or be fixed.
is there already some progress on any EA for this? i made a quick try with the pseudo code from above, but i'm rather new with MQL so could not get it working yet (some expression not allowed on global scope error...)
David I've read a lot systematic/quantitative trading stuff lately and one thing that stood out regarding diversification is that besides assets diversification there is also systems diversification.

Have a look at trend following wizards performance in the past years and you can see that some of them are struggling (e.g. Bill Dunn and William Eckardt funds).

The idea is that the equity curve can be smoothened by also diversifying across systems. Or rather systems that are based on "uncorelated" concepts. Take trend following and mean reversion...
Hi Soso,

You're right. This is NOT a trend following system and not normally the sort of thing I trade. I only made it due to the number of people who tell me that they don't like systems that trade only a few time a year like the long-term trend following ones. Do. The trend filter can be reduced tp 15 days with no problems at all and is in fact only there to try and ensure that a strong trend isn't 'faded' - but I think it would actually work without a trend filter at all.

If you don't want a trend filter try two exits, exit if your profit target is hit OR something else happens to detect that you've entered in the wrongside of a big move. It's that other OR thing I'm still working on...
Hello Soso,

I tested your suggestion to remove the trend filter. The result was double the number of trades and pretty much the same winning pips to losing pips ratio on every currency pair except the EUR/USD where it fell from around 1.5 to 1 to around 1.3 to 1. The USD/CHF performed the best, from the beginning of 2000 to the end of 2010 the pair produced 1125 trades, 796 of the trades were winners, 329 were losers. Pips won 76,644.2. Pips lost 47,263.4. I've attached the full results.

The system is simple, set an order to open long when the price falls to (yesterday's low + the day before yesterday's low)/2. Set a take profit order at (yesterday's high + the day before yesterday's high)/2. Vice versa for shorts. When an order is open do not open another one until it is closed, in which case you simply open in the other direction so the system is always in the market with 1 lot which has a take profit order attached. Adjust your orders at the end of each day.

I believe the reason the EUR/USD's expected results decreased when I took out the trend filter is because the pair trends so well so the effect of the filter is more significant.

I might just trade the USDCHF live here with microlots...
Attached File(s)
File Type: csv USDCHF.csv   105 KB | 931 downloads
Hi David,

Thanks for the update!

EURUSD trends are one of the nicest indeed, probabily the reason the profit factor decreased. But still profitable.
I added the system concept to my research list, I think it can make a good base for a short term trading system.

Thank you for your continuous posting of your ideas, good stuff mate.

Cheers,
-soso
Trading = a mirror to your human flaws. Fix them or be fixed.
It looks like Bill Dunn had a home run in December. It returned 10.95% resulting in a very nice 30.75% for the whole 2010.

http://www.michaelcovel.com/images/dunn1.jpg
Trading = a mirror to your human flaws. Fix them or be fixed.
Good luck with the research, let me know if you find anything interesting...

I still believe that the best edge it's possible to have is by entering a trade in the direction of the long-term underlying trend and waiting.

If markets were random no system could ever be profitable and you couldn't get a 1.6 to 1 ratio back-testing over 1,000 trades over a 10 year period without a hugely complicated list of 'curve-fitted' variables, which obviously this system isn抰. So an edge must be there.

So where does the edge come from? Well it抯 usually the trend that produces an edge and stops a market being random, but obviously it抯 not the trend in this system抯 case. In this case I believe that the markets tested (most notability the USDCHF) must be more statistically likely than random chance would imply to ocsillate between highs and lows with in a range around the mean ?but the question is why would it do this? Any ideas?
Here is a 50 SMA system that is always in the market in the EUR/USD... It goes long when price closes above the 50 SMA and reverses when price closes below the 50 SMA.

There is NO risk management at all, and yet since 9/12/05 it is up 6168 points.
here are only 19 winning trades compared to 51 losing trades.

It would take some real commitment to trade something like this but there it is.

Now if you added some risk management to this as well as adding position size when appropriate this could be a lot less stressful to trade.

Here is the link to the results page.

There are some additional strategies you can check out as well HERE.
So where does the edge come from? Well it’s usually the trend that produces an edge and stops a market being random, but obviously it’s not the trend in this system’s case. In this case I believe that the markets tested (most notability the USDCHF) must be more statistically likely than random chance would imply to ocsillate between highs and lows with in a range around the mean – but the question is why would it do this? Any ideas?
My personal opionion. Any edge exploits a trend one way or the other. You need direction (trend) to be on your side to have win pips > losing pips. So a profitable system rides a trend - whatever that is.

This system looks like a kind of mean reversion system? Although even mean reversion systems exploit a trend - the price travelling back to the mean. Just a thought.
Trading = a mirror to your human flaws. Fix them or be fixed.
Here is a 50 SMA system that is always in the market in the EUR/USD... It goes long when price closes above the 50 SMA and reverses when price closes below the 50 SMA.

There is NO risk management at all, and yet since 9/12/05 it is up 6168 points.
here are only 19 winning trades compared to 51 losing trades.

It would take some real commitment to trade something like this but there it is.
Yeah, it really is showing that the only edge that comes again and again is the trend.

But trading a system like that is no easy unless the trader proved the concept to himself.
Trading = a mirror to your human flaws. Fix them or be fixed.