All (not yet) about Strategy Tester, Optimization and Cloud

 

A must ! Before using it or asking any question : please read the Online Help  (Also accessible by F1 on your MT5 platform)


Strategy Tester

For Traders

  • New Testing trading strategies on real ticks and the explanation is on this post

  • Issue - "The inputs I enter in the INPUTS tab for my EA keep resetting every time.." with the deicison proposed: post #8 and post  #11

  • The most quick way to download the history of ticks (attach this EA to the chart of MT5 for the history to be downloaded): post #151 - please note that this EA is using MTTester.mqh file from this CodeBase link (the file should be placed to  \MQL5\Include\fxsaber\MultiTester\ )


For Programmers


Optimization



Cloud

1. Announce of the launch : MQL5 Cloud Network launched.
2. The news: we will have the big improvement soon related to the cloud/cores/etc - post #72

As Users

  • How it works, an overview : Speed Up Calculations with the MQL5 Cloud Network

  • Tester: Optimized work of the MQL5 Cloud Network. Now, when an optimization is launched for the same Expert Advisor, the network tries to use the same testing agents which were used during the previous optimization pass. This is because the required market environment, including the trading history, is already available for such agents. Read more here
  • Tester agents/Remote agents/MQL5 Cloud Network agents‌/MetaTester 5 Agents Manager are no longer available for use in the 32-bit terminals: they can work only in the 64-bit systems: read more here 
  • Prohibition for using testing agents working on virtual OS in MQL5.Cloud - read more here ;(post #9 : MQL5.Cloud is not prohibited on virtual OS; only using testing agents from virtual OS is prohibited in MQL5 Cloud Network)

  • "Due to the apparent lack of memory with an excessive number of agents and a decrease in the speed of calculations on hyper-threading cores, we decided to limit ourselves to only physical cores when working in cloud" - post #60

  • MQL5 Cloud Network and MQL5 VPS in relation to AVX512 and AVX2 - post (all the details - read this page)

    Some useful topic about usage of the Cloud :


    As Providers (agents)

    • User experience.

    • "The service did not respond to the start or control request in a timely fashion" error fixing - the post.

    • PR calculation for agents - .

    • summary posts (in Russian): post , post  and post 

    •  some traders reported with issue concerning the algorithms for paying for canceled tasks so read this post

     





    Work in progress, stay tuned !

    Strategy Testing - Algorithmic Trading, Trading Robots - MetaTrader 5 Help
    Strategy Testing - Algorithmic Trading, Trading Robots - MetaTrader 5 Help
    • www.metatrader5.com
    The Strategy Tester allows you to test and optimize trading strategies (Expert Advisors) before using them for live trading. During testing, an Expert Advisor with initial parameters is once run on history data. During optimization, a trading strategy is run several times with different sets of parameters which allows selecting the most...
     

    What is about my source when i test it in the cloud ?

    I mean, is it save ?  

     
    chinaski:
    What is about my source when i test it in the cloud ?

    You don't read the FAQ about Cloud ;-)

    Can someone access my program's code or any other data, if I use MQL5 Cloud Network agents?

    Firstly, all data exchange between a computing ordering customer and agents is encrypted. Secondly, a testing agent does not save a code of a submitted program on a drive. So, it cannot be captured on the computer that performs calculations. Besides, the agents themselves are protected from the attempts to penetrate their execution environment and capture data from their memory.

    Thus, all necessary measures are taken to protect computing ordering customer data.

     
    angevoyageur:

    You don't read the FAQ about Cloud ;-)

    Hello angevoyageur,

    thank you for this summary. You are right, did not read it. Now i did  and have one more question:

     

    The cloud power can only be used or can save most time, when it comes to optimization.

    I mean, for a single test run there is no benefit by using the cloud (except there is more powerful CPU installed than my own)

    Can you confirm this ? Or is there some secret or magic concurrency method behind ? Thank you 

     

    I asked this because i have a strategy using more than 1 symbol which takes much time for a single.

    So i thought to use the cloud, but may be in my case there is no benefit... 

     
    chinaski:

    Hello angevoyageur,

    thank you for this summary. You are right, did not read it. Now i did  and have one more question:

     

    The cloud power can only be used or can save most time, when it comes to optimization.

    I mean, for a single test run there is no benefit by using the cloud (except there is more powerful CPU installed than my own)

    Can you confirm this ? Or is there some secret or magic concurrency method behind ? Thank you 

     

    I asked this because i have a strategy using more than 1 symbol which takes much time for a single.

    So i thought to use the cloud, but may be in my case there is no benefit... 

    I am not aware of a solution for "testing only" with Cloud. It works only for Optimization.
     

    hello,


    The bars reach up to but not include the current date which is very frustrating because you always like to test the latest data, specialy when the expert is a daily trader. It was possible in mt4 if I remember well.  I hope Metaquote would let us test until the current day in the near future, It doesn't seem too difficult to implement.

     
    I think it would be great if tester have a data feed from for example TCP/IP socket, I want to test my strategy with MATLAB generated tick data with specific properties and data is online generated in matlab and I want to feed them to tester, I think there is not any way to do this except writing data to file and then generating FXT,.... If I am wrong please correct me
     
    raminzk:
    I think it would be great if tester have a data feed from for example TCP/IP socket, I want to test my strategy with MATLAB generated tick data with specific properties and data is online generated in matlab and I want to feed them to tester, I think there is not any way to do this except writing data to file and then generating FXT,.... If I am wrong please correct me
    There is no fxt file in MT5. And there is no way to use your own data in the Strategy Tester.
     
    Alain Verleyen:
    I am not aware of a solution for "testing only" with Cloud. It works only for Optimization.
    Serious question here, what is the functional difference between "testing" and "optimization" in this case.
     

    Forum on trading, automated trading systems and testing trading strategies

    MT4 & MT5 backtest

    Sergey Golubev, 2017.02.17 20:53

    If you are backtesting EA on MT5 using 'every tick based on real ticks' so it will be almost same with trading on MT5 platform with some particular broker (because it is based on actual historical data).

    Example, read this thread: Why is it better MT5 than MT4?? Does it have fewer limitations ??? - this is the quote from the first post of the thread:

    • In MT5 you can backtesting robots with the closest possible conditions to the real market natively  (real tick data, real variable spreads, lag, slippage, etc). In MT4 you can't natively. You only can if you pay for a third-party software. If so, you also have to download history data from a few sources (there are many few, almost everyone uses the same source), transform it to MT4 format and open the platform through this third-party software in order to patch MT4 behavior. You take many hours to complete this process, and you have to repeat it every time you want to incorporate new data. 
      We have all seen hundreds of robots that obtained spectacular results in backtesting, but when operating in real account the results were very bad. This is mainly because they were made with conditions that had nothing to do with real market conditions.

    --------------

    As i know - some coders/traders are converting their MT4 EAs to MT5 just to backtest them and/or to find the settings with optimization to get the backtesting results that are closest to reality. 


     
    The article:

    Testing trading strategies on real ticks

    The article provides the results of testing a simple trading strategy in three modes: "1 minute OHLC" using only Open, High, Low and Close prices of minute bars; detailed modeling in "Every tick" mode, as well as the most accurate "Every tick based on real ticks" mode applying actual historical data.

    Comparing the results allows us to assess the quality in various modes, as well as helps us to use the tester more efficiently in order to receive results faster. "1 minute OHLC" mode allows receiving quick estimated test results, "Every tick" mode is closer to reality, while testing on real ticks is most accurate but time-consuming. Keep in mind that errors in a trading robot's logic may affect the number of trading operations making the strategy test results more susceptible to a selected test mode.


    Reason: