Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29
  11 11 Attachment(s)    

Thread: Cross 3 moving averages EA

  1. #21

    Default Yet another version to test

    Quote Originally Posted by gitaniko View Post
    This version of the EA execute BUY and SELL orders and close then at the next opposite signal.

    BUY when EMA 13 & 26 cross UP EMA 233.
    Close when EMA 13 & 26 cross DOWN EMA 233.

    SELL when EMA 13 & 26 cross DOWN EMA 233.
    Close when EMA 13 & 26 cross UP EMA 233.

    TP, SL and TS are not active by default, but are customizable.

    Excelent results in EUR/GBP 15 M.
    Actually you coded more rules then you described:
    1. MA13>MA233, and
    2. MA26>MA233, and,
    3. MA13>MA26, and,
    4. MA26(1)<=MA26, and,

    Where MA26(1) is the previous point.

    Rule 4 may eliminate some bad trades, but it also generates strange results in optimizations. Rule 3 isn't necessary. I wonder if rule 1 is really necessary, cause by the time MA26 crosses MA233, MA13 crosses it as well already. So it doesn't really add anything, same with rule 3.
    I have to test that.
    Attached version has only 2 rules. Draw downs are reduced with MM. I believe it optimizes MAs better.
    Attached Files Attached Files

  2. #22

    Default in reality you programmed 2 MA cross system

    Quote Originally Posted by gitaniko View Post
    This version of the EA execute BUY and SELL orders and close then at the next opposite signal.

    BUY when EMA 13 & 26 cross UP EMA 233.
    Close when EMA 13 & 26 cross DOWN EMA 233.

    SELL when EMA 13 & 26 cross DOWN EMA 233.
    Close when EMA 13 & 26 cross UP EMA 233.

    TP, SL and TS are not active by default, but are customizable.

    Excelent results in EUR/GBP 15 M.
    In reality what you programmed is a 26,233 MA cross system. MA13 might add some eyeballing reference for manual trader, but from EA perspective it doesn't do anything or to be exact anything that creates real $$ difference. It just takes space in the code.
    Its better to eliminate bad trades with multi time ftrame (besides MM).
    Will try it next
    Last edited by Metatrader7; 08-19-2009 at 18:46.

  3. #23

    Default Conclusion

    It was nice excersize that proves the importance of 233 MA period for filtering trends on major time frames.
    The EA is no way close to Elliot system. His MA setup is only a part of rhe system, that has multi time frame reference and Elliot wave counts.
    So EA is rather a testing surrogate. It happened it peaked performed in last 2 months. I recommend it for testing best MA periods for manual setups and other systems
    What I've learned from back tests are important periods to scale filters to. I use different EMA filter though, it simply paints the outcome of interactions of 26 and 200 MA+ some more, easier to watch that way. 200 MA is a very important indicator to have.
    For manual setup I found better indies though.
    MA crossover is harder to watch, because your brain has to eyeball and monitor 2 or three line interactions and if you multiply it by # of chart and number of trading hours, you might get a strain in your brain. So there is a XMA color filter that does it for you + some more in one line, easier to watch.
    All EAs built with EATbuilder have Magic # glitch. So even EA displays magic # it's going to start managing your other positions, so watch out.
    I post my back test .set for GBPJPY for 3MAinverseV2.1. They show +$$ on back tests(much more then MegaDroid), but I don't plan to trade it live. For me it was just an exercise. Seems i've upgraded my code tweaking capabilities a bit in the process.
    M15 shows only 10% DD on last 6m and about only 3% DD on last 2 months and tight SL. It was optimized on last 2 months ECN data. Should be good at least for another week.
    M5 - no MM -50% DD, but ok profit. I didn't optimize it for close stop. The excersize was to figure filter periodicity consistency and I got that to my full satisfaction. I don't know what the rest of you hoping for, because this is just a raw testing idea like most EAs on this board and especially in commercial section.
    EAs in commercial section are testing not just indicators and MT4 platform, but the depth of your pockets and psychological response to BS marketing versus the strength of your hoping.(I guess Jesus didn't mean you waste your hope in such a vain). So we have lots of testing action going around. Hope you all enjoy it.
    Attached Files Attached Files
    Last edited by Metatrader7; 08-20-2009 at 11:45.

  4. #24

    Wink Now is the good news

    It took almost 3 days to complete optimization running on 3.6GHZ dual core under Windows7.

    Results blue me away, +$2K/month with 5%DD, M5, GBP/JPY. for last 3 months
    I don't quite understand how it happened. With right optimisation MA can work as a key combination picker in the market. Each market has its unique combination key. So it has to be optimized for each market and time frame.
    It could be also just a back fit, forward test will show
    More good news - it tests well on all brokers overall,
    more good news - it is data tolerant as long as it doesn't have huge gaps.
    This could be high concept, low execution EA.
    Now is the bad news - test was done on 2 months of data
    high performance extends only for 1 week backwards on 6 months test and prior it just fluctuates in +300 slightly profitable zone. So question is, could it be just an optimization back fit that will never work in the future? or we got something?
    I also have a variation theory, according to which the duration of optimization should be valid at least for 3X-6X of longest period indicator. That gives only 2-5 days on M5 and 5-11 days on M15...
    If that holds true - smallest TF can be realistically used is M15 with weekly re optimization.
    and on M15 optimization time can be cut in one day.
    Perhaps I can narrow optimization ranges on M5 and see if it can be done in few hours
    Stop loss is 300 points. Actually there is no stop. 300-250 points give a very safe operation range without interfering with results. EA closes bad trades prior to that.
    Symbol GBPJPY (Great Britain Pound vs Japanese Yen)
    Period 5 Minutes (M5) 2009.06.01 01:20 - 2009.08.16 23:55 (2009.06.01 - 2009.08.17)
    Model Every tick (the most precise method based on all available least timeframes)
    Parameters MA_TYPES="0-Simple, 1-Exponential 2-Smoothed 3-LinearWeighted";

    MA_1=7; MA_1_TYPE=2; SHIFT_1=8;
    MA_2=27; MA_2_TYPE=0; SHIFT_2=0;
    MA_3=220; MA_3_TYPE=2; SHIFT_3=0;

    MagicNumber=0; SignalMail=false; EachTickMode=true; Lots=0.1; Slippage=3; UseStopLoss=false; StopLoss=300; UseTakeProfit=false; TakeProfit=3500; UseTrailingStop=false; TrailingStop=1700;
    So you can run back/forward tests with these settings and see for yourself.
    Last edited by Metatrader7; 08-21-2009 at 07:55.

  5. #25

    Default great stuff

    Thanks for the info, good job on the optimization work as well. I'm seeing similar results with some issues. Seems to work will with some rough months thrown in. Should we add on some 'no trade days' and see how it improves? Take out two weeks around Christmas, November ect...?

  6. #26


    I tried to optimize it on 4 months and see if it carries the effectiveness over into the next week. It doesn't. So this is all back fit and useless for trading. good only as research exercise.
    If someone is interested in things more practical for a manual setup, check this link:

  7. #27

    Default PSAR to confirm?

    I think a PSAR could identify this trend as well,


    STEP: .001
    MAX: .2

    SMA (apply to close)

    PSAR under 233 MA, continue,
    MA 13 & 26 ABOVE MA 233,

    we BUY

    This confirms both that the 13 & 26 SMA's are above the 223 SMA, confirming an up trend, also, the PSAR confirms it is an uptrend.

    The PSAR below the SMA 223 confirms an early signal, all we then do is WAIT for the 13 & 26 SMA to cross above SMA 223.

    What do you think?

  8. #28


    Hi guys! I'm trying to test 3-EMA-Cross-Inverse on demo account but it doesn't work despite clear signals of indicator. Can you tell me the reasons please?
    It works on history and shows good results. How can I force it to trade?

  9. #29
    Junior Member
    Join Date
    May 2010


    Hi Metatrader7,

    I am newbies and would like to try your V2.1, but don't understand few settings of your EA.

    Shift_1 0 <-- what is this for?

    Slippage 3 <-- what is this for?

    StopLoss/TakeProfit <-- if set to say 100, it will stop after losing/making -/+100 pips, correct?

    TrailingStop <-- if set to say 100, it will stop after losing -100 pips, otherwise will carry on within range of 100 pips? correct?


    The reason I like this EA is that it is simple and plain. Is it possible for you to improve this EA onto V2.2?
    My suggestion, add to MA_Types 4-False, which means set to 4 to turn off MA, leaving two other MAs only. Somehow, I believe using two MAs is enough. The 1st short MA is not necessary.

    Simple rules:
    Price>MA_1>MA_2 -->BUY, STOP when Price<MA_1

    Price<MA_1<MA_2 -->SELL, STOP when Price>MA_1

    And, the EA should trigger anytime when above rules apply, it doesn't have to wait until price crossing MA_1. Once it is stopped after price crossing MA_1, and if next tick price falls into above rules, then it starts again and again till manually removed.


    Thank you very much.

Similar Threads

  1. Three moving averages EA
    By funyoo in forum Expert advisors live statements
    Replies: 1
    Last Post: 11-18-2011, 06:19
  2. Replies: 0
    Last Post: 03-01-2011, 21:12
  3. Cross 3 moving averages (100 pips daily or more)
    By elliot2008 in forum Ideas for manual systems
    Replies: 24
    Last Post: 05-26-2010, 00:13
  4. Three moving averages EA
    By q8m2002 in forum Expert advisors live statements
    Replies: 13
    Last Post: 03-05-2009, 21:57

Tags for this Thread

100, 100 pips, backtest, broker, brokers, champ, change, color, crossover, demo, eas, ecn, eur, expert, gbpjpy, high, how to, indicator, indicators, learn, live, low, magic, magic number, manual, metatrader, mt4, news, pips, profit, profitable, real, research, robots, signal, signals, simple, slippage, stop, strategy, system, systems, test, thank you, time, trader, trading, trend

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts