Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
 7 Attachment(s)    

Thread: Renko EA

  1. #11
    Junior Member
    Join Date
    Nov 2009
    Posts
    4

    Default

    Quote Originally Posted by funyoo View Post
    Hi candrick,

    Yes, you will find this script in the mql programming section (Max trade per bar).
    Hello Funyoo,

    Thank you for your prompt replies. But I was unable to add this part to the code:

    Quote Originally Posted by funyoo View Post
    Before each OrderSend function :

    Code:
    if(Time0!=Time[0]){
    After each OrderSend function :

    Code:
    Time0=Time[0];if(ticket>0)TradePerBar++;
    Don't forget the } at the end.
    if it should be something like that, metaeditor gives a "ticket - variable not defined" error.

    //open position
    if((AddP()&&AddPositions&&OP<=MaxOrders)||(OP==0&& !AddPositions)){
    if(OS==1){if(TP==0)TPI=0;else TPI=Bid-TP*Point;if(SL==0)SLI=0;else SLI=Bid+SL*Point;
    if(Time0!=Time[0]){
    TK=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slip,SLI,TP I,EAName,Magic,0,Red);OS=0;return(0);}
    Time0=Time[0];if(ticket>0)TradePerBar++;
    }

    Can you help to correct this? Thx...

    OK, corrected this error. But now EA does not seem to be reversing the action. For example, when the trend reverses it does not change the trade from buy to sell or vice versa. I got confused...
    Last edited by isengoz; 11-19-2009 at 20:30.

  2. #12
    Junior Member
    Join Date
    Nov 2009
    Posts
    4

    Default backtests...

    Quote Originally Posted by funyoo View Post
    Here is the Renko v1 Expert Advisor.
    Hi funyoo,

    I backtested last few weeks in 5-pips renko charts and the results were promising. All of the backtests ended without deficit. But, when I was forward testing the EAv1, I encountered a problem. The EA was too slow to close an order and open a new one when the price was moving a little fast. For that reason, some trades ended with little profit or no profit at all.

    In order to overcome this, I think the EA should place pending orders for both closing the open order (like SL or trailing step stop) and opening a new one. The logic might be something like that: EA opens a trade at the beginning and places two pending orders, one as the stop loss for closing the current order. The price should be the opening price of the previous candle. And another order for the new trade at the same level. Surely, spread should be taken into consideration. As the graphics are drawn according to the bid price, short orders should not be placed before the current candle closes and a new one forms. With a formula the spread may be calculated and added to bid price, and keeping in mind that it may take a long time to form a candle in renko charts, this formula may check the spread periodically, i.e. every half an hour, an hour, or so. And, the pending orders should be moved after a new bar is formed.

    If you have any ideas about that I would be pleased to contribute as much as I can. This method may not be the holy grail, but surely a profitable one in my opinion.

    P.S.: Adding one trade per bar will surely improve the profitability, however I was unable to add the required parameters to the code. I just don't understand the coding part unfortunately...
    Attached Images Attached Images Renko EA-31oct-07nov_5pipseurusd-gif Renko EA-07-14nov_5pipseurusd-gif Renko EA-14-21nov_5pipseurusd-gif 
    Last edited by isengoz; 11-24-2009 at 06:43. Reason: to clarify the logic

  3. #13

    Default

    Interesting. I hope Funyoo can sink his teeth into this one!

  4. #14

    Default settings?

    Quote Originally Posted by isengoz View Post
    Hi funyoo,

    I backtested last few weeks in 5-pips renko charts and the results were promising. All of the backtests ended without deficit. But, when I was forward testing the EAv1, I encountered a problem. The EA was too slow to close an order and open a new one when the price was moving a little fast. For that reason, some trades ended with little profit or no profit at all.

    In order to overcome this, I think the EA should place pending orders for both closing the open order (like SL or trailing step stop) and opening a new one. The logic might be something like that: EA opens a trade at the beginning and places two pending orders, one as the stop loss for closing the current order. The price should be the opening price of the previous candle. And another order for the new trade at the same level. Surely, spread should be taken into consideration. As the graphics are drawn according to the bid price, short orders should not be placed before the current candle closes and a new one forms. With a formula the spread may be calculated and added to bid price, and keeping in mind that it may take a long time to form a candle in renko charts, this formula may check the spread periodically, i.e. every half an hour, an hour, or so. And, the pending orders should be moved after a new bar is formed.

    If you have any ideas about that I would be pleased to contribute as much as I can. This method may not be the holy grail, but surely a profitable one in my opinion.

    P.S.: Adding one trade per bar will surely improve the profitability, however I was unable to add the required parameters to the code. I just don't understand the coding part unfortunately...
    Hello, setting? and version EA, please

    thanks
    Lordorly

  5. #15
    Junior Member
    Join Date
    Sep 2012
    Posts
    3

    Default

    Quote Originally Posted by funyoo View Post
    Hi isengoz,

    Code that should be added :

    Code:
    int previoussignal=0;
       for(i=shift+1;i<=50;i++){
          if(previoussignal!=0)continue;
          if(iCustom(NULL,0,"Renko_v1",periodatr,katr,0,i)>iCustom(NULL,0,"Renko_v1",periodatr,katr,0,i+1))previoussignal=1;
          if(iCustom(NULL,0,"Renko_v1",periodatr,katr,0,i)<iCustom(NULL,0,"Renko_v1",periodatr,katr,0,i+1))previoussignal=2;
       }
    Long conditions :

    Code:
     && previoussignal==2
    Short conditions :

    Code:
     && previoussignal==1
    Just an observation: it costs as much (or as little) time to update the EA (post #1) as to put the code here on the forum... Now non-programmers have to sort out where exactly this code has to be added (and fix some errors, due to non-declared variables). Thanks anyway
    Last edited by ronald123; 01-11-2014 at 04:35.

  6. #16
    Junior Member
    Join Date
    Sep 2012
    Posts
    3

    Default

    Quote Originally Posted by Agentrfr View Post
    Interesting. I hope Funyoo can sink his teeth into this one!
    ... He didn't... Good sign though ;-)

  7. #17

    Default

    Hi,
    you can download the latest Renko Expert Advisor Here to generate Renko Charts

  8. #18
    Junior Member
    Join Date
    Oct 2010
    Posts
    1

    Default Renko ea

    Quote Originally Posted by funyoo View Post
    Here is the Renko v1 Expert Advisor.
    Hi can someone add only buy and sell trades true/false
    Attached Files Attached Files

  9. #19
    Junior Member
    Join Date
    Nov 2017
    Posts
    1

    Default

    thank you funyoo

Similar Threads

  1. Renko + any funyoo EA.
    By virtik in forum Ideas for expert advisors
    Replies: 1
    Last Post: 02-28-2014, 11:25
  2. forexoc Renko 10 pip ea
    By forexoc in forum Ideas for expert advisors
    Replies: 6
    Last Post: 10-27-2012, 11:37
  3. RENKO chart
    By patcox in forum Softwares
    Replies: 2
    Last Post: 11-05-2010, 12:29
  4. Renko Ashi System 2, Renko Ashi 20 pips + correlation
    By cmeldatrader in forum Ideas for expert advisors
    Replies: 9
    Last Post: 08-04-2010, 00:53

Tags for this Thread

advisor, candle, change, closing, coding, eas, expert, expert advisor, how to, indicator, magic, make a ea, mq4, mql, mt4, profit, profitable, programming, renko, request, spread, stop, thank you, time, 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
  •