Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36
 4 Attachment(s)    

Thread: How to backtest EAs ?

  1. #1
    Junior Member
    Join Date
    Dec 2008
    Posts
    1

    Default How to backtest EAs ?

    okay, this is seen like a stupid question but i real need help for this one.

    how do you backtest those eas ? everytime i try to backtest a ea it either give me this error "2008.12.16 21:02:45 TestGenerator: unmatched data error (volume limit 132 at 2008.11.26 23:00 exceeded)
    " or the other error 130, i try alot eas that i download from this forum and none of them seen to work for me, I set it to every tick and for all the time frames still dont work, can anybody help me

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

    Default

    Quote Originally Posted by ddock View Post
    okay, this is seen like a stupid question but i real need help for this one.

    how do you backtest those eas ? everytime i try to backtest a ea it either give me this error "2008.12.16 21:02:45 TestGenerator: unmatched data error (volume limit 132 at 2008.11.26 23:00 exceeded)
    " or the other error 130, i try alot eas that i download from this forum and none of them seen to work for me, I set it to every tick and for all the time frames still dont work, can anybody help me
    Hi ddock and welcome,

    You have to download a better tick data :

    Tools > History Center > Currency > Download.

    The error 130 is generated when the SL or the TP is too short (min 15 for the SL, min 10 for the TP), when the lots is under the minimum lots size allowed by the broker. If you are on Alpari UK, you have to multiply the SL, TP and TS by 10.

  3. #3
    Junior Member
    Join Date
    Dec 2008
    Posts
    23

    Default

    How can I make backtest and save Optimization Report as in this post http://www.tradingsystemforex.com/41-post1.html

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

    Default

    Quote Originally Posted by zezocool View Post
    How can I make backtest and save Optimization Report as in this post http://www.tradingsystemforex.com/41-post1.html
    See here : http://www.tradingsystemforex.com/ge...imization.html

    When you have finished the optimization, go on the optimization results page, make a right click and select "save as report".

  5. #5

    Default

    Quote Originally Posted by funyoo View Post
    The error 130 is generated when the SL or the TP is too short (min 15 for the SL, min 10 for the TP)
    If you use this line of code between calculating your SL and using its value in the OrderSnd() function.

    For long positions:

    Code:
    if ( SL > ( Bid - MarketInfo(Symbol(),MODE_STOPLEVEL)*Point )) {SL = Bid - MarketInfo(Symbol(),MODE_STOPLEVEL)*Point ;}
    For short positions:

    Code:
    if ( SL < (Ask + MarketInfo(Symbol(),MODE_STOPLEVEL)*Point) ) {SL = Ask + MarketInfo(Symbol(),MODE_STOPLEVEL)*Point ;}
    Quote Originally Posted by funyoo View Post
    The error 130 is generated when the lots is under the minimum lots size allowed by the broker. If you are on Alpari UK, you have to multiply the SL, TP and TS by 10.
    These lines of code should be used to ensure that the lots are not less than the minimum size allowed by your broker:

    Code:
      double Lot=0;
      double MinLotSize=0;
      MinLotSize = MarketInfo(Symbol(),MODE_MINLOT);
    
    ........ calculate your lot size here ..........
    
      if(Lot < MinLotSize) 
        {
           Lot = MinLotSize;
    You should also do the same for MaxLotSize.

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

    Default

    Hi jezzer1961,

    Thanks, it is very appreciated.

    I will add this in my next codes.

  7. #7
    Junior Member
    Join Date
    Jan 2009
    Posts
    8

    Default

    Hello
    I begin with Mt4, Why experts take a multitude of orders after? See image Ci joined
    Excuse my bad English
    Thank you
    Attached Images Attached Images How to backtest EAs ?-graph-gif 

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

    Default

    Quote Originally Posted by jluc View Post
    Hello
    I begin with Mt4, Why experts take a multitude of orders after? See image Ci joined
    Excuse my bad English
    Thank you
    Hi jluc,

    Before to use a code in demo, you should optimize the results, also to see if there are no conflicts with the settings and the time frame. Note that this EA has been designed for H1.

  9. #9
    Junior Member
    Join Date
    Jan 2009
    Posts
    8

    Default

    Hi Funyoo
    Thank you for the answer, I will check that. Cheer for your forum, it is very well
    Best regards

  10. #10
    Junior Member
    Join Date
    Dec 2008
    Posts
    7

    Default

    Hi Funyo
    Could you please tell me what data supplier you use for your back tests..

    Johnno

Similar Threads

  1. Backtest EA stuck
    By oGladiatore in forum Expert advisors backtesting
    Replies: 1
    Last Post: 10-27-2015, 15:58
  2. Forex Backtest
    By Finbar in forum Expert advisors backtesting
    Replies: 1
    Last Post: 03-17-2012, 12:05
  3. Backtest: 99% Quality
    By starger in forum Manual systems statements
    Replies: 3
    Last Post: 12-20-2011, 09:15
  4. I would like your opinion on its backtest
    By fitopo in forum Expert advisors backtesting
    Replies: 0
    Last Post: 01-06-2011, 10:25
  5. EA Backtest Q&A
    By fairylord in forum Expert advisors backtesting
    Replies: 0
    Last Post: 12-11-2009, 15:42

Tags for this Thread

alpari, alpari uk, average, backtest, backtesting, broker, change, demo, eas, eurusd, experts, forex, forex tester, historical, how to, indicators, limit, live, metatrader, mql, mt4, programming, real, system, systems, test, time, trader, 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
  •