Slow Strategy Tester

 

Hi: Testing using MT4 on tick using major pairs.  I program EAs so if I use a standard indicator (example Awesome Osc) then no problem. I have very slow back tests using Custom Indicators. Any idea of what I could do to speed up the testing for the EAs using Custom Indicators?. 


Thanks for any suggestions.

 
  1. EAs : Don't do per tick that you can do per bar, or on open.
    If you are waiting for a level, don't reevaluate, wait until price reaches it (or a new bar starts and you recalculate.)
    If you are waiting for an order to open or close, only look when OrdersTotal (or MT5 equivalent) has changed.
              How to get backtesting faster ? - MT4 - MQL4 programming forum

  2. Indicators: Code it properly so it only recomputes bar zero (after the initial run.)
              How to do your lookbacks correctly.
    Or, reduce Tools → Options (control-O) → Charts → Max bars in chart to something reasonable (like 1K.)
     

    Calls to iCustom are slow. Call it only once when a new candle opens and use that value throughout the timeframe. The standard indicators can be used on every tick.

    You could also change your strategy to work with open prices only, this would speed up the backtesting.

     
    William Roeder and lippmaje: Many thanks for the expert advice, got it to work!