LTOptions at a 33% discount during the Year End Holidays.
Tell me More

BookingAlpha Option Trading Advisory

Tuesday, January 10, 2012

Amazing Crossover System. Expert Advisor

This Forex System was initially introduced by ForexPhanton who discussed in one of babypips' forums, and later on, it was selected by the community of as the System of the month for the month of October 2011.

Robopip analyzed this same system and reviewed it on his blog "Art of Automation". Bellow, you will find two of his articles about it:

Finally, Huck tweaked it a bit and made it her own on her blog The Loonie Adventures of a Forex Noob and baptized her version as Trend Catcher 3.0. This last version of the system is the one I automated for those who enjoy mechanical trading.

Just as a reminder these are the rules of the system after Huck's adjustments:

Long Trade
5 Ema crosses above 10 Ema and RSI(10) is above the 50 level.

Short Trade
5 Ema crosses below 10 Ema and RSI(10) is bellow the 50 level.

Take Profit = 300 pips
Stop Loss = 50 pips

There is also a Trailing Stop applied every 50 pips. Say the trade is 50 pips in profit, the Stop Loss will be moved to breakeven. If the profit is 100 pips, then Stop Loss is moved to +50 pips of guaranteed profit and so on. Trades might be closed before hitting TP or SL if a contrary signal takes place. Say you are long and there is a signal to go short, the current trade is closed and a new bearish one is opened.

Below you can see, as an example, a screen shot of the first two trades of the year on EURUSD which turned out to be losers.
(Click on image to enlarge)
The yellow line represents the 5 EMA and the red one represents the 10 EMA. As you can see, the entry happens at the open of the candle, right after the cross over of the EMAs takes place, provided that RSI is in the desired level (above or below 50).

Don't expect all the entries to be immediately after the EMAs crossovers. With this system, sometimes the EMAs crossover occurs but the robot can't enter till the RSI indicator confirms, and sometimes RSI might trigger the 50 level first but then the expert needs to wait for the EMAs crossover.

Here are the results of the first week of 2012 for this system. Currency: EURUSD. Timeframe: 1 hour.
(Click on image to enlarge)


Lot_Size: Number of lots to trade. Default 0.1
Ema_Period_1: Period of the short term Exponential moving average. Default 5
Ema_Period_2: Period of the long term Exponential moving average. Default 10
Take_Profit: Number of pips to set as the Maximum Profit Target. Default 300 pips
Stop_Loss: Number of pips to set as the Stop Loss level. Default 50 pips
Trailing_Stop: Trailing stop distance in pips

As you noticed, the back testing performed only covers the first week of 2012. Make sure you test this system for longer periods of time, other currencies, maybe other timeframes as well and play around with the parameters to make it your own.

Remember: even though the first week of 2012 shows profitability that doesn't guarantee the same will continue to happen in the future. My personal opinion is that this system has not been designed with many concepts needed for design of reliable mechanical trading systems. It uses hard number of pips for Stop losses and Targets, which is an inflexible mechanism against volatility changes in the currency. There is no edge analysis of entries and exits and no evaluation of the parameter space. The back test from 2000 to 2011 is disastrous as well. I believe it is only a matter of time until everyone starts to see the real face of this system. In order to trust a mechanical system I would like to see steps taken in its design such as the ones I took when I designed this system. It is not as profitable but definitely way more reliable for long term trading.

Any feedback is appreciated. Feel free to leave your comments bellow.

The Trend Catcher 3.0 or Amazing Crossover system was programmed for information and entertainment purposes only. There are no guarantees about the efficacy of the system or the absence of defects in the program.

By downloading the expert advisor you automatically agree that neither BabyPips nor The Lazy Trader are responsible for your trading results using the software.

Download AmazingCrossOver.ex4
Download AmazingCrossOver.mq4
Related Articles:
LT Trend Sniper - a Forex strategy that works
The Turtles Trading system automated (Expert Advisor for download)
MACD Divergence Indicator for Metatrader
Moving Average Crossover Indicator  for Metatrader
CCI Divergence Indicator for Metatrader
Position Size Calculator for Metatrader
Multiple Trades Manager Expert Advisor


Go to the bottom of this page in order to see the Legal Stuff


  1. Hi I managed to get RSI out of equation ...then i combined it with EMA Crossover close open positions when there is a far good but not holy grail

    1. Hey Ravee, can you please share how to get RSI out of the equation?

  2. Thanks for your Comment Ravee!
    Glad you used the code. And I agree, definitely no holy grail. I believe it will suffer during non-trending environments

  3. Hi Henrik ... made some mods to scalp the M1 & M5 charts ....i see a potential solid 5pips atleast everytime the crossover occurs...
    Lets say the EMA1 range (1-10) EMA2 Range (2-50)
    Removed RSI
    Added CCI period 45 (CCI >0 long) (CCI <0 short)
    Changed EMA X overs to Price_open instead of close...
    The above settings give me freedom to scalp atleast 5-10 pips everytime there is a crossover...

    My question is how to set trailing stop once profit target of 5 pips is reached to surf the trends with Zero risk? ...
    Lets say Once i reach my profit target of 5 pips..that'll eventualy become stop loss..throw some light on it please. thx in advance...

  4. Hey Ravee,

    When you ask how to set trailing stop do you mean how to do it programatically? If, so I think I have some code which can help you programming a trailing stop.

    If you're asking about ideas on when to start trailing, and which distance to use, then I guess, there is no easy answer. You would have to end up programing a trailing strategy with an input parameter to set different distances, and different trailing start thresholds, and start running backtests.

    An running backtests on M1 and M5, is something I dont really like. The data is innacurate plus you start to introduce broker dependency on your EA. You will be backtesting your strategy with spreads way better than real trading spreads, and this will give you a false idea on the profitability or maximum drawdowns on your strategy while you design your system

    For some more comments on this:

  5. Hey thx for the fast're very right abt back testing on M1 & M5 and the rest of the periods too for that matter...i just dont back test myself...i'll let the strategy run monday/fridays all by itself on a vps which i monitor by an android device....anyways..its not abt the programming trailing stop..but abt the in built trailing stop options in the EA..
    Long on 0.8000
    hit profit target at 0.8005
    Now stop loss becomes 0.8005
    hit profit target at 0.8010
    Now stop loss becomes 0.8010
    I'm not quite sure that a Trailing stop value of 5 w'd do that?

    Everytime i set it up for 5 ..i end back at 0pip profit..:(

  6. yes, the problem in this case is you are putting it to close to current price.
    It should be something like
    Long at 0.8000
    Hits TP at 0.8005, then you move SL to 0.8000, leaving five pips of spread, other wise you will get kicked out.
    Then Hits 0.8010, SL moved to 0.8005. Always leaving 5 pips of distance. This distance should be customized as a parameter in the EA, so it is easy for you to change without having to change your code or recompile.

  7. Hiya Henrik i've been doing lots of testing around this baby and found some annoying quirks of this EA...

    The EA as such(unmodified)Sadly, it enters trades at the the close of the bars..this can be very damaging ...lets say...the cross occurred at 0.8000 and it made a sell decision at the close of next bar (lets say 0.7995 with RSI favouring it)...and suddenly there is a spike in the counter direction...and the spike closed at 0.8050 (where the EA closes the trade and opens a buy position)

    So what could be the culprit do you think..?
    a. Is it this
    /*Only enter new trades when there is a new bar*/

    if (NewBarFlag == true) // i feel this should be set to false?



    b. the fact that the prices are applied to PRICE_CLOSE ???

    How can this be evaded?

    I also had a thought on this the price always lingers b/w Highs/Lows... i feel its not really wise to apply them to O,C OR M for that matter...

    What if the the EA buys at Crossovers at LOWS and closes at CROSSOVER Highs and vice versa
    which demands the need of TWO crossovers the Bullish(applied to lows) and bearish(applied to highs)

    A buy position is opened at bullish crossover and closed at bearish crossover and vice versa..

    and the if CurrentSignalHasBeenPlayed() will become BullSignalHasBeenPlayed() and
    BearCurrentSignalHasBeenPlayed() and correspondingly every internal bool and parameters change....

    I feel the losses will be minimised and profits will be optimized...nothing more nothing less..So what do you think? I'm on it atm..if i have any troubles..i'll let you know..


  8. Let me see if I clearly understand.
    You are saying that the EA should close the loser before the bar closes? is that it ?

  9. Sorry for making it all messed up....i was on abt two things in my previous comment...

    1. Flaw: As you replied..yes! the EA needs to Close loserws soon as the crossover be precise..

    2. An Improvement possibility of applying the prices to Highs and Lows instead of applying to close.We deploy two EMA Crossovers one for lows one for highs..obviously buying and selling & closing takes place at the respective crssovers...

  10. Hey Just look at this image...

    the first arrow(red) indicates exactly where the EA opens a sell the green arrows(upward)is where the ea closes sell and makes a is the twist..decieving the graphics shown..the EA closes the sell at the close bar of the buy signal...Drastic isnt it? So i presume that losses w'd be kept to minimum if it catches the trends at the right time...

    and yes this...

    if (NewBarFlag == true) // i feel this should be set to false?

    ...must be set to false to avoid the disasters...i tested it on M1 & M5 charts..& its awesome

  11. Hey Ravee the problem with Opening during the formation of the bar is that the cross is not confirmed. the moving average at that point is going up and down constantly as the prices changes, and what is a crossover now, might stop being a crossover in 10 seconds.

    And the same thing for the close. You might be closing the trade on an unconfirmed cross, that later when the candle is complete results in no crossover in the chart.

    I understand your point that waiting for candles completion takes you out of the game with a bigger loss, but at the same time it lets you stay in the game and avoid fake temporary crosses that are formed constantly during the candle formation process. It is a trade off. In any case I just tried to automate Huckle's system as she had implemented it. And like you said, I don't put to much trust in it. I believe it doesn't have a real edge long term, but good to know you are working on it.

    And yes, you are right, the NewBarFlag condition is the one validating that a New Candle has just appeared.


    1. This comment has been removed by the author.

  12. I love it, thanks for programing it. I was wondering how would you get the rsi off. so it just uses the crossover for entry?

  13. Hello Henrik - Many thanks for sharing your EA with us. I would greatly appreciate if you could tell me how to activate the EA. I have installed it correctly ie .ex4 file & mq4 files both in the expert folder. I drag the EA on to my MT4 screen (demo account) and see the smiley face at the right hand corner of the screen but not alerts or trades are being seen.

    I have enabled auto trading.

    Please can you throw some light

  14. THIS is what i want for long time .it works perfectly . thank you .

  15. Hi, i have start the code from running, but my metatrader 4 keeps showing "Order Send Error #130". I have check online and the problem is stop-loss or take-profit levels are set to close to the current market price. I have change the stop loss to 30, and take profit level to 150. but they are still far from current market price.

    can you advise how to resolve the error?

  16. Hey,

    there is a new Version, with some new parameters, tested by Robopip. Could someone maybe include these new features in the code?

  17. Your EA has 2 flaws 1. It opens a trade at the open of the next candle once you place it on the chart. The trade is usually a stale one from a trade already in progress. This also occurs if the EA is disabled and enabled after a period of time. Kindly adjust the code so the EA starts looking for NEW trades once it is placed opn the chart. 2. The trailing stop does not sem to be working. many of the trades reversed more than 50 pips and the EA failed to close th trade. You need to recheck the TS coding. It would also be nice if you can add an option for choosing lotsize based % risk on account thanks in advance

    1. All that sounds like good suggestions but unfortunately my time is limited that's why I share it for free so anyone can see the code and improve it. I didnt put too much effort as I think it is not a good strategy anyways. But thanks for the feedback so others can see.

  18. ok, thanks for the initial effort. I think the system does have good prospects in as much as there is an explosive move every now and then. I wish i can run a thorough analysis like you do but i will simply settle for forward testing while i see if someone can make changes to the code. By the way i use an 100 pip SL as suggested by the system creator because i realised from visual backtesting that it produced far more profitable trades with the trade usually closing befor reachiing full SL.