fxDreema

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

    Best practices to improve EA speed (Backtesting)

    General Discussions
    3
    5
    961
    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.
    • T
      trdjb3 last edited by

      Hi everyone

      Im climbing my learning curve in fxdreema, and at this point I feel that I need some information that you could help a lot.

      I tried to make my EAs as simple as possible, but as you know there are many ways to achieve the same result in fxdreema. So, I would like to post here some example to understant by users experience wich options are lighter for BAcktesting and EA performance.

      Here we go:

      First example: Which one is faster?

      0_1648683029541_a41b53d6-352f-4db5-ac9b-728e806f9788-image.png

      which one is faster?

      0_1648683212697_022b29a4-b10e-4074-8411-3f731dbd3726-image.png

      Another situations:

      The number of buy/sell group os ordens makes EA slow? Cause I have an EA with 32 groups and is is really slow. Ans another one with 4 groups is fast.

      That all for now

      Thank you in advance

      jstap OntradingX 2 Replies Last reply Reply Quote 0
      • jstap
        jstap @trdjb3 last edited by

        @trdjb3 Your first picture: I assume there similar but the bool flag may use less code so maybe quicker, every tick the blocks run so the flag may only have 1 line NAME==true/false.

        Your second picture probably the one with the close block, the other has to turn on another block which then runs another another 2.

        As a general rule the fewer blocks the quicker, every block adds lines to the code, the more lines the slower.
        If you back test on control points you cannot rely on results but for testing before a final run you'll save lots of time.

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

        1 Reply Last reply Reply Quote 0
        • OntradingX
          OntradingX @trdjb3 last edited by

          @trdjb3
          Friend, let's go to some points that helped me a lot to improve the speed of the EA (Backtesting).

          1. Know exactly where to place each block.
            Block (once per bar) - Place them exactly above conditions/rules that need to wait for candles to close, if your strategy is scalp/short trade - fast and you don't aim to make long gains then this block might not be ideal . This block speeds up the backtest speed when it is not necessary for the EA to watch (every tick) and thus saves a lot of time.

          Block ( For each position) or ( For each closed position) - When you are carrying out an order count (profits and losses), performing sums etc... then you do not need this count to be executed every tick, but you need the After each trade or each closed trade this is executed, for this always use these blocks, I noticed that both in ONTICK and ONTRADE they save backtesting time.

          Block ( Check Flag (true-false) When using these blocks, check the need to have a block before them or not so that when this previous block is really needed, then it checks this final block true-false. I noticed that this ends improving the performance of not having to check every tick if the condition is true or false.

          I have cited just a few of the many examples that I could cite here, but in general I would like to inform you that the ideal thing is that you plan your project thoroughly knowing that when all the blocks are IN ORDER, and each one in its DUE place the chances of your backtest not getting slow will be higher, I see that many projects made in FXDREEMA sometimes need a review in this regard.
          The more you use the more you learn, practice makes perfect.

          Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
          Site: https://www.ontradingx.com.br
          Youtube: https://www.youtube.com/@ontradingx
          Boa sorte a todos nós!

          English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
          Website: https://www.ontradingx.com.br
          Youtube: https://www.youtube.com/@ontradingx
          Good luck to all of us!

          T 1 Reply Last reply Reply Quote 0
          • T
            trdjb3 @OntradingX last edited by

            @ontradingx

            Thank you for your words, all that you said make sense.

            I have digged inside my project and tested blocks performance. I Foud 5 blocks that make my EA 40% slower: this are they

            https://fxdreema.com/shared/oqhwxKIBc

            unfortunately i think that nothing can be changed to make this blocks faster. How can I check day profit faster then the block made for this purpose?

            either, how chek open positions equity faster then use bucket of positions?

            OntradingX 1 Reply Last reply Reply Quote 0
            • OntradingX
              OntradingX @trdjb3 last edited by

              @trdjb3 said in Best practices to improve EA speed (Backtesting):

              Como posso verificar o lucro do dia mais rápido do que o bloco feito para esse fim?
              ou, como verificar o patrimônio das posições abertas mais rapidamente do que usar o balde de posições?

              How can I check the day's profit faster than the block made for this purpose?
              The answer is in:
              What is the need for you to have to watch the day's profit at every tick of the market?
              Wouldn't it be more interesting to know this after each trade is closed?

              or, how to check equity of open positions faster than using position bucket?
              I give the same answer to this question.
              You just need to know the balance of open positions "if there was any open position", so put an "if position" block above.

              Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
              Site: https://www.ontradingx.com.br
              Youtube: https://www.youtube.com/@ontradingx
              Boa sorte a todos nós!

              English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
              Website: https://www.ontradingx.com.br
              Youtube: https://www.youtube.com/@ontradingx
              Good luck to all of us!

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

              Online Users

              G
              Y
              C
              S
              S
              S
              A

              27
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors