fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    MT5 backtest Set current market block

    Questions & Answers
    3
    7
    486
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      vhager last edited by

      Hi,
      I'm trying to make a single EA work on multi symbols in backtest mode with MT5.

      I'm using the Set "Current market" block but the results are unexpected.

      In this example, I want to print in the journal the values of the ATR day by day for 28 pairs.

      https://fxdreema.com/shared/we46piTge

      However, at the beginning of the execution there is an issue:
      I'm running from 2020/01/01.
      In the screenshot below, on the 2020/01/02 AUDCAD, AUDCHF, AUDJPY, AUDUSD are printed.
      But then the EA continues to the 2020/01/03 and prints from CADCHF up to EURAUD only and then skip again to 2020/01/06 without printing the remaining other pairs.

      8a6d48f1-1a9f-4522-87af-aa975c16f7ce-image.png

      Then after awhile, all the pairs are printed correctly:
      2b58bab4-2879-406e-8aee-b610b50c8688-image.png

      Any idea what is causing this ?

      Thank you for your help.
      Valentin

      roar 1 Reply Last reply Reply Quote 0
      • l'andorrà
        l'andorrà last edited by

        I'm not a programmer, but are you sure the formula in the 'log message' block is correct?

        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

        (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

        1 Reply Last reply Reply Quote 0
        • roar
          roar @vhager last edited by

          @vhager maybe some pairs dont have data from 2020/01/01, their history starts some time later?

          @l-andorrà the formula is correct, otherwise there wouldn't be any prints at all

          Need small help? Tag me in your post
          Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

          1 Reply Last reply Reply Quote 0
          • V
            vhager last edited by

            Thank you for your replies.
            Yes there is data for those pairs, I can go all the way back to the years 2000s
            It seems the EA is struggling when the tester is still synchronizing all the symbols..

            If it is a bug, how to fix it ?

            roar 1 Reply Last reply Reply Quote 0
            • roar
              roar @vhager last edited by

              @vhager you are using ATR and some other indicators, they need some history data before 2020/01/01 in order to get the indicator value for 2020/01/01.
              For single symbol backtests, Metatester is smart enough to compensate for the indicator history requirement, but the additional symbols might not load the data into tester (even though you have the data on your hard drive).

              Try running the loop in the "On Init" tab, getting the indicator values there, so the EA has a chance to preload the necessary history data. Maybe it works, maybe doesnt

              Need small help? Tag me in your post
              Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

              V 1 Reply Last reply Reply Quote 0
              • V
                vhager @roar last edited by

                @roar Thanks for your help. I copied the "set current market block" and all the blocks under, in the init tab, but it gives the same result.
                Some pairs are still loaded successfully so I'm not sure it's the a data history issue.

                It seems more like an index error in the loop of the "set current market block".
                I tried to add the a "job done" message at the exit of the block:
                749457c9-4250-4e5b-b77b-742e374b6bc4-image.png

                But the message "job done" is displayed for the first time on the 2020/01/10
                10cbbeac-9a76-46d4-bab8-2b0be0b177cb-image.png

                After that it is displayed correctly.

                1 Reply Last reply Reply Quote 0
                • V
                  vhager last edited by

                  I also tried to start in 2022/02/01 and the result is the same, until the 2022/02/09 the results are not correct

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post

                  Online Users

                  E
                  R

                  8
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors