+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14
 6 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      
    Last edited by isengoz; 11-24-2009 at 06:43. Reason: to clarify the logic

  3. #13
    Member Agentrfr's Avatar
    Join Date
    Oct 2009
    Posts
    271

    Default

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

  4. #14
    Member
    Join Date
    Jan 2009
    Posts
    95

    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

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Renko Charts Trader
    By funyoo in forum Expert advisors backtesting
    Replies: 28
    Last Post: 02-01-2011, 11:15
  2. RENKO chart
    By patcox in forum Softwares
    Replies: 2
    Last Post: 11-05-2010, 12:29

Posting Permissions

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