Results 1 to 8 of 8
 4 Attachment(s)    

Thread: EMA cross only

  1. #1

    Question EMA cross only

    Dear Funyoo,

    Hello! I know that you've coded an EA with the EMA cross only function, but I am not finding it here, please could you tell me the name of that EA? Thanks in advance.

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

    Default

    Quote Originally Posted by szmvscla View Post
    Dear Funyoo,

    Hello! I know that you've coded an EA with the EMA cross only function, but I am not finding it here, please could you tell me the name of that EA? Thanks in advance.
    Hi szmvscla,

    What do you mean by EMA cross ? Price and EMA cross or two EMAs cross ?

  3. #3

    Question

    Quote Originally Posted by funyoo View Post
    Hi szmvscla,

    What do you mean by EMA cross ? Price and EMA cross or two EMAs cross ?
    Ex.: ema1>ema2 when the EA is loaded then the EA will not do nothing until we have a new cross(ema1<ema2).

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

    Default

    Quote Originally Posted by szmvscla View Post
    Ex.: ema1>ema2 when the EA is loaded then the EA will not do nothing until we have a new cross(ema1<ema2).
    Hi szmvscla,

    Code:
    double ema1=iMA(NULL,0,emaperiod1,0,MODE_EMA,PRICE_CLOSE,shift);
    double ema1a=iMA(NULL,0,emaperiod1,0,MODE_EMA,PRICE_CLOSE,shift+1);
    
    double ema2=iMA(NULL,0,emaperiod2,0,MODE_EMA,PRICE_CLOSE,shift);
    double ema2a=iMA(NULL,0,emaperiod2,0,MODE_EMA,PRICE_CLOSE,shift+1);
    
    if(ema1a<ema2a && ema1>ema2)buy...
    if(ema1a>ema2a && ema1<ema2)sell...

  5. #5

    Default

    Quote Originally Posted by funyoo View Post
    Hi szmvscla,

    What do you mean by EMA cross ? Price and EMA cross or two EMAs cross ?
    H Funyoo, Do you have a "Price and MA cross" EA? Just simply opens BUY and closes SELL when price crosses above MA, and closes BUY and opens SELL when when price closes below MA, or closes order on TP or SL.

    Steve

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

    Default

    Quote Originally Posted by stevensouders View Post
    H Funyoo, Do you have a "Price and MA cross" EA? Just simply opens BUY and closes SELL when price crosses above MA, and closes BUY and opens SELL when when price closes below MA, or closes order on TP or SL.

    Steve
    Hi stevensouders,

    Here is a Price and MA Cross EA.
    Attached Files Attached Files

  7. #7

    Default More Mod needed.

    Quote Originally Posted by funyoo View Post
    Hi stevensouders,

    Here is a Price and MA Cross EA.
    Thank You!!! You are the man! I made a modification and added a second Moving Average. It seems to work better using the second moving average even if it only follows the price action. So far so good....ok next, Can you add an option to close the MA Cross trade using the #3 signal from the "3_level_zz_semafor" indicator if it appears prior to the next MA Cross? That would be greatly appreciated. Also, place an option to trade using a second Strategy with a second magic number (if possible), using the "Entry" Indicator which would create and additional buy order only if the "Entry" buy signal is above the 2nd Moving Average, and create an additional sell order only if the "Entry" Sell signal is below the 2nd Moving Average. Those trades opened would close on the next opposite "ENTRY" signal, and would be independent of the trades that are opened by the "MA Cross". I hope I made that easy enough to understand what I am trying to accomplish. I have attached the EA, and the indicators. Unfortuantely I can't find the editable version of the "ENTRY" indicator, so you will have to use the icustom command to make it buy/sell & buyclose/sellclose on the arrows.

    Thanks a million,
    Steve
    Attached Files Attached Files

  8. #8

    Default

    Hello Funyoo, in addition to the previous post, maybe you could look at the code for me...for some reason it will not always trade at the cross, and sometimes if it crosses it will trade and then if it immediately crosses back it will not close the trade and open the correct trade again in the opposite direction...hmmmm I'm stumpt. Maybe you have a better way to code it so that it will always trade in the right direction and not get stuck in a sell trade even while the cross has taken place and it should have closed the sell and opened a buy. PLEASE HELP, because this EA has been proving to be profitable, and I'm sure it would be even more profitable if it was trading correctly.

    Steven Souders

Similar Threads

  1. EMA Cross EA
    By funyoo in forum Expert advisors backtesting
    Replies: 144
    Last Post: 11-25-2017, 21:20
  2. Ea Sma Cross
    By haba in forum Expert advisors backtesting
    Replies: 2
    Last Post: 04-20-2016, 14:50
  3. ADX Cross EA
    By funyoo in forum Expert advisors backtesting
    Replies: 0
    Last Post: 07-29-2010, 22:24
  4. ST MA Cross EA
    By eforex in forum Ideas for expert advisors
    Replies: 12
    Last Post: 12-01-2009, 01:07
  5. EA 2 cross ema
    By il_valentino_forever in forum Ideas for expert advisors
    Replies: 1
    Last Post: 10-14-2009, 17:10

Tags for this Thread

average, funyoo, indicator, indicators, magic, magic number, moving average, price action, profitable, signal, strategy, trading

Posting Permissions

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