Results 1 to 4 of 4
 1 Attachment(s)    

Thread: EA's working on backtest but not on live

  1. #1
    Junior Member
    Join Date
    Feb 2009

    Default EA's working on backtest but not on live


    I'm a newbie here and in the MQL4 programming. I've modified an EA, and run it trough backtest, and it just did what i wanted it to do. But, the problem is, when it comes to live account, the EA doesnt open any orders, without any errors in journal or experts.

    So, this EA will calculate the range of high and low from 14:00 to 16.15 server time plus 6 spreads both sides. If the range is below 70, then it will set one BUY STOP at the high+spread with TP 1x the range and SL 0.5x the range, same will happen with SELL STOP (the idea is to make R:R=1:2 so that hopefully with only 50% win rate we will still get some money). One important thing this EA need to do is to set the PENDING ORDER not on 16:15 time, but on 16:30 time. And then, when one pending order is executed, we don't cancel the opposite. We only delete the remaining pending order(s) at the 13:59 the next day (before we start calculate the range again).

    I have tried to build this EA using freely available breakout EA called BSL breakout. The copyright sectiom implies that i can modify, rename the name, as long as i dont delete the copyright section. So i build my EA from that. I have managed to calculate the range, set the proper positioning size, and to delete the remaining pending orders in the next day. I even managed to get succeed backtesting it from Jan '10 to May '10 with some decent success.

    I attached the original BSL EA and my modification version (EA Malam).

    So, any idea why my EA works on backtest but not on live?
    Attached Files Attached Files

  2. #2


    Hi tanyasiapa,
    Your problem is likely that you are sending (Ordersend) with Stoploss and TakeProfit to an ECN or STP Broker. You need to place the orders as market orders and then modify. Backtesting does not give an error for this condition...and going live will not generate an error either. It just will not your Orders are ignored. Good Luck Bill
    Last edited by BillR; 05-12-2010 at 05:17.

  3. #3
    Junior Member
    Join Date
    Feb 2009


    Thanks for your reply Bill, but i'm not sending the order as market-orders, but as pending orders, does it make any difference?
    Also, i'm using InstaForex for my backtest and live account, do you think they are an ECN or STP broker?


  4. #4
    Junior Member
    Join Date
    Nov 2009


    HI, I am providing service for programming for MT4 EA and CI.
    Contact me privately to ask your questions.


Similar Threads

  1. Need help working with arrays - mt4
    By pete_36 in forum MQL programming
    Replies: 0
    Last Post: 10-28-2015, 13:16
  2. 99% Backtest not showing accordingly to Live
    By jolimoney in forum Trading discussion
    Replies: 0
    Last Post: 08-05-2011, 16:07
  3. EA not working on ECN !
    By fadihanna in forum MQL programming
    Replies: 1
    Last Post: 01-04-2011, 10:51
  4. Please try to optimize-working EA
    By robert77 in forum Expert advisors backtesting
    Replies: 0
    Last Post: 09-08-2010, 11:48

Tags for this Thread

backtest, backtesting, breakout, broker, ea works, ecn, experts, high, instaforex, live, live account, low, managed, money, mql, mql4, mt4, programming, server, stop, stoploss, stp broker, time

Posting Permissions

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