Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  10 10 Attachment(s)    

Thread: Change NN MACD EA to zlMACD^RSI EA

  1. #1

    Default Change NN MACD EA to zlMACD^RSI EA

    Please change this NN MACD EA to use zlMACD^RSI

    More info on the EA can be found here > Using Neural Networks In MetaTrader - MQL4 Articles

    I have attached the EA and zlMACD^RSI indicator
    Attached Files Attached Files

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

    Default

    Quote Originally Posted by kneal View Post
    Please change this NN MACD EA to use zlMACD^RSI

    More info on the EA can be found here > Using Neural Networks In MetaTrader - MQL4 Articles

    I have attached the EA and zlMACD^RSI indicator
    Hi kneal,

    Code updated.
    Attached Files Attached Files

  3. #3

    Default

    Thanks Funyoo

    I have commented out the parameters not needed to optimize if anyone wants to try this EA.

    It is to be optimized and run on 5M time frame.

    By the way... it will need the FANN Library... the same as this EA presented here > http://www.tradingsystemforex.com/pr...y-its-not.html

    If you already have the FANN library installed then it is no need to install again.

    I'm optimizing a set file for EUR USD. Once it is complete I will post it. It's going to take a while though since it is on 5M time frame.
    Attached Files Attached Files
    Last edited by kneal; 12-17-2010 at 18:39.

  4. #4
    Senior Member
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    631

    Default

    Hi Funyoo could you please add in some options for this neuroMACD EA in v1.01

    ECN option
    5 digits
    Magic Number
    Break Even
    Trailing stop

    Also could you fix the code it only works on eurusd 5m from what i can tell, i would like to be able to test on different pairs and time frames, thanks again.!
    Last edited by wannaberich; 12-27-2010 at 12:20.

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

    Default

    Quote Originally Posted by kneal View Post
    Thanks Funyoo

    I have commented out the parameters not needed to optimize if anyone wants to try this EA.

    It is to be optimized and run on 5M time frame.

    By the way... it will need the FANN Library... the same as this EA presented here > http://www.tradingsystemforex.com/pr...y-its-not.html

    If you already have the FANN library installed then it is no need to install again.

    I'm optimizing a set file for EUR USD. Once it is complete I will post it. It's going to take a while though since it is on 5M time frame.
    Hi kneal,

    Thanks for the edition.

    Quote Originally Posted by wannaberich View Post
    Hi Funyoo could you please add in some options for this neuroMACD EA in v1.01

    ECN option
    5 digits
    Magic Number
    Break Even
    Trailing stop

    Also could you fix the code it only works on eurusd 5m from what i can tell, i would like to be able to test on different pairs and time frames, thanks again.!
    Hi wannaberich,

    Code updated.
    Attached Files Attached Files

  6. #6
    Senior Member
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    631

    Default

    Quote Originally Posted by funyoo View Post
    Hi kneal,

    Thanks for the edition.



    Hi wannaberich,

    Code updated.
    THanks again funyoo for all your hard work. Could you also let me know if you have added the 5 digits and ECN otpions to the EA yet, i can not see those options there!

    Also it will only let me test it on eurusd 5m time frame, when i try other time frames i get this error message 2010.12.28 09:58:37 2010.12.27 23:59 NeuroMACD-fixed v1.02 EURUSD,H1: ERROR: Wrong period!
    Last edited by wannaberich; 12-27-2010 at 22:58.

  7. #7

    Default

    Quote Originally Posted by wannaberich View Post
    THanks again funyoo for all your hard work. Could you also let me know if you have added the 5 digits and ECN otpions to the EA yet, i can not see those options there!

    Also it will only let me test it on eurusd 5m time frame, when i try other time frames i get this error message 2010.12.28 09:58:37 2010.12.27 23:59 NeuroMACD-fixed v1.02 EURUSD,H1: ERROR: Wrong period!
    ECN function is in the code

    PHP Code:
    //+-----------------------------------------------------------------------------------+ ECN FUNCTION +---------------+

    void ecnmodify(double stoploss,double takeprofit){
       if(
    OrdersTotal()>0){
          for(
    i=OrdersTotal()-1;i>=0;i--){
             
    OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
             if(
    OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber){
                if(
    OrderType()==OP_BUY){
                   if(
    OrderStopLoss()==&& stoploss>&& takeprofit==0){
                      
    RefreshRates();
                      
    OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(Ask-stoploss*pt,dg),OrderTakeProfit(),0,Red);
                   }
                   if(
    OrderTakeProfit()==&& stoploss==&& takeprofit>0){
                      
    RefreshRates();
                      
    OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),NormalizeDouble(Ask+takeprofit*pt,dg),0,Red);
                   }
                   if(
    OrderTakeProfit()==&& OrderStopLoss()==&& stoploss>&& takeprofit>0){
                      
    RefreshRates();
                      
    OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(Ask-stoploss*pt,dg),NormalizeDouble(Ask+takeprofit*pt,dg),0,Red);
                   }
                }
                if(
    OrderType()==OP_SELL){
                   if(
    OrderStopLoss()==&& stoploss>&& takeprofit==0){
                      
    RefreshRates();
                      
    OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(Bid+stoploss*pt,dg),OrderTakeProfit(),0,Red);
                   }
                   if(
    OrderTakeProfit()==&& stoploss==&& takeprofit>0){
                      
    RefreshRates();
                      
    OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),NormalizeDouble(Bid-takeprofit*pt,dg),0,Red);
                   }
                   if(
    OrderTakeProfit()==&& OrderStopLoss()==&& stoploss>&& takeprofit>0){
                      
    RefreshRates();
                      
    OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(Bid+stoploss*pt,dg),NormalizeDouble(Bid-takeprofit*pt,dg),0,Red);
                   }
                }
             }
          }
       }

    5 Digits is in the code

    PHP Code:
    {
       
    dg=Digits;
       if(
    dg==|| dg==5){
          
    pt=Point*10;
          
    mt=10;
       }else{
          
    pt=Point;
          
    mt=1;
       } 
    You can search in the code for this

    PERIOD_M5

    it's in the code in 3 places

    Change the M5 to M15, M30, 1H or whatever timeframe you wish and compile
    Last edited by kneal; 12-27-2010 at 23:29.

  8. #8
    Senior Member
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    631

    Default

    ok i see kneal, thanks for the information.

    I still would like to have it trading on other time frames, right now it only seem to work on eurusd 5m. I would do this my self but not sure how!

  9. #9

    Default

    Quote Originally Posted by wannaberich View Post
    ok i see kneal, thanks for the information.

    I still would like to have it trading on other time frames, right now it only seem to work on eurusd 5m. I would do this my self but not sure how!

    This one will work on 1H timeframe
    Attached Files Attached Files

  10. #10
    Senior Member
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    631

    Default

    Quote Originally Posted by kneal View Post
    This one will work on 1H timeframe
    I am running it on eurusd 1h and i am getting an error message still
    2010.12.28 10:42:23 2010.12.28 01:41 NeuroMACD-fixed v1.02 EURUSD,H1: ERROR: Wrong period!

    Also this EA is strange, when i run it in backtest, sometimes it places trades, and others i get nothing. SO far i have only been able to get it to work in backtest at times, but only in eurusd 5m!

    I found this in the code, looks like it works on 5m time frames but not higher!

    /+------------------------------------------------------------------+
    //| expert deinitialization function |
    //+------------------------------------------------------------------+
    int
    deinit ()
    {
    int i;

    if (!is_ok_period (PERIOD_M5)) {
    debug (0, "Wrong period!");
    return (-1);
    }
    // Deinitialize anns
    for (i = AnnsNumber - 1; i >= 0; i--) {
    if (SaveAnn) {
    if (i % 2 == 0) {
    ann_save (AnnsArray[i], AnnPath + "." + i + "-long.net");
    } else {
    ann_save (AnnsArray[i], AnnPath + "." + i + "-short.net");
    }
    }
    ann_destroy (AnnsArray[i]);
    }

    // Deinitialize Intel TBB threads
    f2M_parallel_deinit ();

    return (0);
    }

    bool
    trade_allowed ()
    {
    if (!AnnsLoaded || !is_ok_period (PERIOD_M5))
    return (false);

    /* Trade only on first tick of a bar and there's enough funds */
    if (Volume[0] <= 1 && AccountBalance () > MinimalBalance) {
    return (true);
    }

    return (false);
    }
    Last edited by wannaberich; 12-27-2010 at 23:57.

Similar Threads

  1. How to change the swappiness ?
    By fxtester in forum General discussion
    Replies: 2
    Last Post: 04-14-2015, 08:56
  2. req[to change the indiactor into ea]
    By ananthgeethan in forum Ideas for expert advisors
    Replies: 0
    Last Post: 06-23-2012, 12:57
  3. Change direction EA
    By daniel22 in forum Ideas for expert advisors
    Replies: 0
    Last Post: 09-14-2011, 09:44
  4. zlMACD^RSI EA
    By funyoo in forum Expert advisors backtesting
    Replies: 0
    Last Post: 11-25-2010, 22:03

Tags for this Thread

backtest, breakeven, change, ecn, eur, eurusd, expert, indicator, macd, metatrader, mq4, mql, mql4, request, rsi, signal, stop, stoploss, systems, test, time, trading, usd

Posting Permissions

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