EA Moving Average Cross

Hi there,

I have a simple EA to open a position when they cross and close the position when they cross again or TP/SL but that’s half of what I am trying to achieve.

This is a EA request for the above BUT also open an opposing position when a position is closed. For example: fast ma crosses below slow ma to open a sell position, the fast ma then crosses above slow ma to close the sell position and open a buy position.

Does anyone have an EA for the above or similar. Any input is appreciated.

1 Like

MA crossover systems like this have been shown many times over the years to not work. So maybe you have some other modification or tactic which makes your approach more effective?

1 Like

I want to attempt to use this system in addition to price action and other indicators.

1 Like

Fair enough. I’m being genuine when I say even running a failing system teaches something useful.


Very true! I’m still learning tbh. I’m starting to believe that the obvious indicators = easy pickings for the banks. So I may change my strat as a whole.

1 Like

I don’t have this EA, but it’s very easy to write. Why don’t you have a go. Most of it can be done by watching a few youtube videos and copying the relevant bits. I doubt it would take much more than an hour to write

1 Like

I have used and backtested various MA crossover systems and they work pretty badly. There must be an additional element to make them work more effectively. That element is not writing an EA - the system works equally badly whether its manual or EA-driven. Its the additional element I’m interested in, as nobody else yet claims to have identified it.

1 Like

@tommor, They do work… when used as a hybrid… ie: So, when the MA1 (Price) crosses over say the MA200 (up or down) and the last candle (or two, or three) has closed below/above the 200, you activate the EA to close the position at a preset TP or when it cross back over again and the EA is to stop.

Once again, the larger the TF the bigger the gain… generally… That’s it… that simple… it allows you to get away from the screen and stay in a trade until the EA closes the position…

An MA Cross EA that is left to just run continually will be destroyed when the market ranges… no doubt about it… so have a think how you apply these sort of strategies and they will return a positive result.

GBPUSD (1 Hour Chart) Latest… no cherry picking here… Note: .I don’t trade the GBPUSD

1 Like

I don’t accept that a 1/200MA crossover is an MA crossover, its a Price/200MA crossover. I use this myself for entries using Price/50EMA but I add the filter requirement that the 50EMA must be sloping upwards for a long entry on an upwards XO or downwards for a shnort entry on a downwards XO.

And I would use a Price/50EMA XO in the reverse direction as an exit if other TA had kept such a poor trade alive to that point.

But that’s the point. Using say a 20/50 or a 20/200 or a 50/200MA XO for entry and then holding to the reverse XO for exit has been shown repeatedly to be a failing strategy.

Unless unless unless there’s an additional element we haven’t been told about that makes this a blockbuster. I await with interest…


No, I don’t accept that is correct… MA5 cross over MA200, smoother line… still an MA-X…Semantics…

Tom… please, look at the chart in the post above… I’m not making this stuff up…

1 Like

Its always possible to find a chart that at some period supports a strategy, and that’s how MA XO supporters “sell” their theory. I’ve seen loads of really convincing charts, whole series of them, in books and websites over the years. They all say buy when the fast MA crosses upwards through the slow MA and exit when it crosses downwards again.

If this strategy is applied, it will burn an account slowly but surely and that’s what writers and systems vendors unconsciously (or consciously) want. In orer to work, such a strategy will need additional rules and modifications. I’d like to hear what mods @BabySnips has applied to prevent wipe-out.

1 Like

" I use this myself for entries using Price/50EMA but I add the filter requirement that the 50EMA must be sloping upwards for a long entry on an upwards XO or downwards for a short entry on a downwards XO." Tommor

The MA200 IS SLOPING UPWARDS… See Below MA200 Coloured Slope… fantastic, for when you’re not sure what the angle of dangle the slow MA is trying to sell

You must be aware that a flat 200 is one of the most powerful reversal signals… right…

It’s the first Chart I grabbed… as I stated I don’t even trade this pair… I’ll PM you…

1 Like

I’m sure it is the first chart you grabbed. And that’s the danger of the seductive MA XO strategy - everyone can back check charts and in 5 minutes find enough that work that the strategy looks like a winner. If it didn’t look like a winner it wouldn’t have the reputation for “treachery” that it does have.

But I’m, going to say that nobody can come on this forum and say that they are making a consistent significant income from simply buying when the 50 crosses up through the 200 and exiting when the 50 crosses back down again.

1 Like

Oh geez. Here we go. At the risk of making myself unpopular…

I’m afraid to say I too (like everybody else and his dog) (and his dog’s puppies too I’m sure) have tried moving average crossovers. They work. Until they don’t. And it is VERY easy to fall into the curve fitting trap with them. So I do agree that they will slowly but surely bleed capital away over time.

This being said: @Trendswithbenefits is essentially talking about PRICE closing above or below a moving average. Now it’s not something I’ve ever looked at to be honest. And those charts do look enticing. My only comment really: it appears the idea is great for an entry point and with a clearly defined stop which is maybe far away. But I don’t think waiting for a cross back over the MA to TP would work too well. Maybe trailing a stop once you’re in the trade??? Problem is as I’m sure if obvious: a 200-day SMA is very slow to react. So you’d be giving away a real nice chunk of profits by waiting for this as a signal to TP.

But to be frank: personal opinion is that MA crosses in and of themselves are not that fantastic. But once you have a cross and then wait for a pullback well maybe then. John F. Carter has a trading system based on just this and it does work. I just don’t have the patience for it. And I don’t like trading with stops. But essentially (and daily charts only): he has an 8-day EMA and a 21-day EMA. Once the 8 has crossed over the 21 you then wait for a pullback to the 8 with your stop somewhere around the 21 (although on the odd occasions I’ve tried this you normally get stopped out so under today’s market conditions may be preferable to use an alternate method for stop placement). I forget where TP was (but will look it up if anybody is interested).

But I guess what I’m saying is that I don’t think that MA crossovers in and of themselves are a profitable over time.


Those charts have had me think again about Wilder’s Swing Index System. I spent years (probably) in trying to get that system under my belt. Spent much time coding it as well. And I’ve been thinking about introducing it again maybe. I don’t quite understand why: but things that I just was not able to trade or grasp or understand some years ago are for some reason or the other very very clear to me since my return some years ago. Maybe I was just too caught up with things back then and couldn’t see the wood for the trees. Dunno. Will see.


Nice post Dale.

MA crossover points are of no value as a combined entry-and-exit coupling. Obviously, if a fast MA is above a slow MA and price is rising, its almost inevitable we’re in an uptrend so not buying would be an odd decision.

My issue is with the golden cross entry and dead cross exit.

Unless unless unless the OP has an additional filter which counters the inherent weakness of this system. That’s what I asked, he hasn’t answered.


Agreed. And if only it were that simple.

1 Like

What!!!.. Why are you not Buying when the fast is above the slow???.. this is what I just spent lines of text explaining and we go backwards… to this…

I obviously have to word it exactly for some…

Confused. I am always long when we’re in an uptrend. If the fast MA is above the slow and price is rising, I will be long - unless I’ve just taken profits in which case I’m looking to get back in long again asap.

Let’s see what the OP has.

Hi Dale, nice to bump into you again!

I now use MA crossovers (only 8 and 21 EMAs) as my primary trading system and even commissioned my own EA. My trading system is as Dale suggests - wait for a crossover, wait for a pullback and then make an entry decision. I use a two-bar pullback or an IB setup with stop orders (not limit orders) to help me identify a “pullback” or hesitation in the trend. The SL goes on the “wrong” side of the mother bar or of the second (pullback) bar, or further away based on price action, as you wish. From April to mid-December last year I made 78% return just like this.

My (mostly manual) EA that I have more recently started using sends a signal when there is a crossover and then I have a good look at what’s going on. If it seems good, I click “Go” to switch the EA on and it tracks the fast MA with a limit order until the order is triggered. Exits can be by a fixed number of pips or at the next crossover. Entries should preferably be fairly soon after the crossover, not once the trend gets a bit old and tired, in fact not even after it shows signs of middle-aged wobbles. Stops can be by a fixed number of pips or if the MAs cross the wrong way.

There are some safety rules when using MA crossovers, for example, don’t trade into an S/R level or towards an extreme level. Also, if it looks as if price is consolidating or entering a range, be more cautious. If price has pulled away from the MAs and left a bit of an open space between price and the EMAs then it is likely that price will bounce back across the MAs and stop you out (the elastic band idea), so I prefer a period of shorter candles that creep along fairly close to the MAs. I can also use my EA to move to B/E at a certain number of pips, or to trail the stop, but I don’t usually use trailing stops.

So you’ll see that my EA is hardly a trading robot - rather just an automated entry and exit tool that relies on the trader’s careful consideration.

Generally, then, and used too trustingly, MA crossovers will destroy your account, but used carefully and while observing certain rules, they are very useful.

The only strategy with public and updated results here on Babypips is HLHB and enters with a moving average cross.