Page 1 of 2 12 LastLast
Results 1 to 10 of 12
 2 Attachment(s)    

Thread: Moving Average EA

  1. #1

    Default Moving Average EA

    Hi Funyoo !

    Kindly request you, please make moving average EA following condition

    This version of the EA has only 2 actions:

    BUY when MA1 & MA2 cross UP MA3
    SELL when MA1 & MA2 cross DOWN MA3

    MA period = adjustable
    MA Methode = 0=sma, 1=ema, 2=smma, 3=lwma
    MA Price = 0=close, 1=open, 2=high, 3=low, 4=median(high+low)/2, 5=typical(high+low+close)/3, 6=weighted(high+low+close+close)/4

    and as usual lot, buytarget, buystop, selltarget, sellstop,trailing, breakeven,
    onlycross,maxtrade,tradeperbar, filter etc

    Thanks

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by best2004 View Post
    Hi Funyoo !

    Kindly request you, please make moving average EA following condition

    This version of the EA has only 2 actions:

    BUY when MA1 & MA2 cross UP MA3
    SELL when MA1 & MA2 cross DOWN MA3

    MA period = adjustable
    MA Methode = 0=sma, 1=ema, 2=smma, 3=lwma
    MA Price = 0=close, 1=open, 2=high, 3=low, 4=median(high+low)/2, 5=typical(high+low+close)/3, 6=weighted(high+low+close+close)/4

    and as usual lot, buytarget, buystop, selltarget, sellstop,trailing, breakeven,
    onlycross,maxtrade,tradeperbar, filter etc

    Thanks
    Hi best2004,

    If I understand well, MA1 & MA2 have to cross up/down at the same time with MA3, or MA1 has to cross up/down with MA2 over/under MA3 ?

  3. #3

    Default

    Hi Funyoo

    MA1 & MA2 have to cross up/down at the same time with MA3

    Thanks

  4. #4

    Default

    Hi Funyoo !

    Iam sorry to change

    Enter
    BUY when MA1 cross UP MA3
    SELL when MA1 cross DOWN MA3

    Exit
    for Buy position Exit when MA1 cross down MA2
    for Sell Position Exit when MA1 cross up MA2

    Thanks

  5. #5
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by best2004 View Post
    Hi Funyoo !

    Iam sorry to change

    Enter
    BUY when MA1 cross UP MA3
    SELL when MA1 cross DOWN MA3

    Exit
    for Buy position Exit when MA1 cross down MA2
    for Sell Position Exit when MA1 cross up MA2

    Thanks
    Hi best2004,

    Ok, here is the Moving Average EA.
    Attached Files Attached Files

  6. #6

    Default

    Thank you Funyoo
    I post my result after check

  7. #7
    Junior Member
    Join Date
    Sep 2009
    Posts
    16

    Default

    Funyoo is it possible to have ea based on moving averages ie 8 21 500
    exponential using the 500 based on a xp moving average that indicates trend up or down and only entering trade when the 8 ma has crossed the 21 ma and the trend shown by the 500 ma has been confirmed this way the 500 ma would act as a filter.this how i trade manually would be nice to automate
    regards
    lee

  8. #8
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by leeroy66 View Post
    Funyoo is it possible to have ea based on moving averages ie 8 21 500
    exponential using the 500 based on a xp moving average that indicates trend up or down and only entering trade when the 8 ma has crossed the 21 ma and the trend shown by the 500 ma has been confirmed this way the 500 ma would act as a filter.this how i trade manually would be nice to automate
    regards
    lee
    Hi leeroy66,

    Set usethirdasfilter on true.
    Attached Files Attached Files

  9. #9

    Default

    Great spin on the MA trade. I can't seem to find the Take Profit in this one, also what is breakeven, how is it used?

    I'd be interested in seeing settings from anyone, no matter how much time I spend on this, I never can seem to get the backtest to come out positive.

  10. #10
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by hunter6 View Post
    Great spin on the MA trade. I can't seem to find the Take Profit in this one, also what is breakeven, how is it used?

    I'd be interested in seeing settings from anyone, no matter how much time I spend on this, I never can seem to get the backtest to come out positive.
    Hi hunter6,

    Takeprofit : buytarget and selltarget.

    Breakeven : If the difference between the price and the order open price is higher than breakevengain, we modify the stop loss (order open price +/- breakeven).

Similar Threads

  1. Replies: 0
    Last Post: 07-21-2014, 11:18
  2. Moving Average v2
    By funyoo in forum Expert advisors live statements
    Replies: 1
    Last Post: 01-10-2013, 14:09
  3. MTF Moving Average EA
    By danwork in forum Ideas for expert advisors
    Replies: 1
    Last Post: 03-19-2010, 05:06
  4. Moving average EA
    By Rascacio in forum Expert advisors backtesting
    Replies: 3
    Last Post: 02-16-2010, 18:46
  5. Moving average v2
    By funyoo in forum Expert advisors backtesting
    Replies: 5
    Last Post: 08-12-2009, 20:39

Tags for this Thread

average, backtest, breakeven, breakevengain, donchian, funyoo, high, moving average, profit, request, sells, simple, sma, stop, thank you, time, trader, trailing, 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
  •