Page 1 of 2 12 LastLast
Results 1 to 10 of 11
 1 Attachment(s)    

Thread: How do i use optimization!

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

    Default How do i use optimization!

    I am very new to metatrader and have just come accross this trading system forex website which is fantastic and very helpfull. I want to optimize some of these EAs to give me the best results.

    How do i go about this using metatrader and once it is optimized what does that acctually mean and how do i use those optimized results to improve the EA.

    Thanks
    Jason

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

    Default

    Quote Originally Posted by wannaberich View Post
    I am very new to metatrader and have just come accross this trading system forex website which is fantastic and very helpfull. I want to optimize some of these EAs to give me the best results.

    How do i go about this using metatrader and once it is optimized what does that acctually mean and how do i use those optimized results to improve the EA.

    Thanks
    Jason
    Hi wannaberich and welcome,

    First of all, you have to download a good tick data :

    Tools > History Center > the wanted currency > Download.

    Then you do Ctrl+R, you check Optimization, you select Every Tick Model, you take the Symbol, the Period of your choice, you can also check "Use Date".

    Finally you click on Expert Properties :




    Here, depending on the backtesting (if it is done fast or not) and the power of your computer, you can check one or several boxes in Inputs. You have to enter for each a Start a Step and a Stop. If you enter 10-5-500, it will begin by 10, then it will try with 15, 20, 25, 30, ... up to 500.

    When an optimization is done, you go on Optimization Results. Here you can select the best parameters (Set Inputs Parameters) according to what you consider to be a good result, for example you can accept 30% of max drawdown, or 20%. And you continue until you find the best ratio Profit/Drawdown.

    Note that you need a 90% modelling quality, you get it with a good tick data.

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

    Default

    Hi

    Thanks for the reply, really appreciated, i will try out what you have said and see what happens. One other thing i have done some basic backtests of several EAs before but never get a 90% quality, in fact most times its either na, or something more like 24% if i am lucky etc.

    If it is not 90% does that mean the EA wont make money on a live account, or is having 90% just better. Sometimes i backtest an EA and get really poor backtest quality, yet it gives me a really high profit, why would this be. It is either something i am doing wrong or it is my data supplier, i guess it probably depends on how good you data is in the first place

    Do you have any ideas why this could be

    Thanks
    Jason

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

    Default

    Quote Originally Posted by wannaberich View Post
    Hi

    Thanks for the reply, really appreciated, i will try out what you have said and see what happens. One other thing i have done some basic backtests of several EAs before but never get a 90% quality, in fact most times its either na, or something more like 24% if i am lucky etc.

    If it is not 90% does that mean the EA wont make money on a live account, or is having 90% just better. Sometimes i backtest an EA and get really poor backtest quality, yet it gives me a really high profit, why would this be. It is either something i am doing wrong or it is my data supplier, i guess it probably depends on how good you data is in the first place

    Do you have any ideas why this could be

    Thanks
    Jason
    A 90% modelling quality will generate theorical results closest to the real results on the respective period than with a 24% modelling quality. But then whatever is the modelling quality, you have this rule : past results do not guarantee future performance.

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

    Default

    Thanks for your replies, much appreciated

    Jason

  6. #6

    Default Optimization

    I have learn that is is good to leave 1 to 2 weeks of data out of the optimization period. Reason is forex timeseries is not a define mathematical equation. What was very profitable during the optimization period may (often) have no predictive value in the forward period.

    By keeping 1 to 2 weeks data out of optimization and using it to judge the predictive quality of the parameters found and hope for the best that it would continue for sometime after that. When that parameters is not producing the result, it time for optimization again.

    In the past I have optimize for period till the last data availabe and chose the most profitable and it had little resemblance in the forward testing.

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

    Default

    mel8331, can you explain more on how you optimize and test? Thanks

  8. #8

    Default

    Quote Originally Posted by simpleis View Post
    mel8331, can you explain more on how you optimize and test? Thanks
    Basically, I leave about 1-2 weeks of the latest data out of the optimization period depending on how many trade the system trades in a week or two.

    So I would optimize for period say 1st Jan 2008 - 31st Dec. 2008. After completion of the optimization, I would change the test period to 1st Jan 2009 -- 18th Jan 2009.

    Now I goes back to the optimized parameters looking for low drawdown, high profit factor and high number of trades. After selecting this parameters, I would test them for the period that it was not optimized, in this example, it would be 1/1/09-18/1/09.

    I would do it for a few sets of parameter and look at the equity curve, basically looking for a as smooth as possible upward trend and then look at the report for the profit factor, drawdown and the profit.

    After doing it for a few parameters selection, it is your judgement call on which set of optimized parameters you will use in your forward trading.

    If you do that sometime you may find that the most profitable optimized parameter turn out to be losing money in the unoptimized period. So if you have use that in actual trading, you would end up losing money.
    Last edited by mel8331; 01-19-2009 at 09:08.

  9. #9

    Default

    a PDF I found, on how to get higher quality back test's
    Attached Images Attached Images

  10. #10

    Default

    Quote Originally Posted by markbto View Post
    a PDF I found, on how to get higher quality back test's
    Thanks for sharing

Similar Threads

  1. Optimization Tactics
    By winias in forum Expert advisors backtesting
    Replies: 10
    Last Post: 01-19-2012, 15:05
  2. Backtest/optimization Leverage
    By CycleTrader in forum Ideas for expert advisors
    Replies: 2
    Last Post: 11-13-2010, 12:15
  3. Auto-optimization
    By CycleTrader in forum MQL programming
    Replies: 0
    Last Post: 08-10-2010, 13:43
  4. Questions on EA optimization
    By forexpop in forum Ideas for expert advisors
    Replies: 1
    Last Post: 09-18-2009, 10:34

Tags for this Thread

backtesting, change, eas, equation, expert, forex, high, how to, learn, leave, live, live account, low, metatrader, profit, profit factor, profitable, stop, system, test, trading, trading system, 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
  •