fxDreema

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

    Incredibly slow backtest at every tick..

    Questions & Answers
    3
    6
    2057
    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.
    • F
      fxmich78 last edited by fxmich78

      Hi,i made two EAs but i tested in the every tick and it is unbelievable slow..At open prices it is fast.Any reason why?

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

        @fxmich78 Every tick = more data, CPU needs to do more work, like a 100 times more work.

        I usually test with open prices when developing, and only confirm the final test on every tick method.

        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

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

          @roar
          Hi,thanks for the answer,but this is exactly what i am saying.Isn't there a way for the EA to run faster in every tick?In my Laptop every bar of 1h takes up to 1 min long.Is this right?
          Also,the results between every tick and open prices,differs a lot.

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

            @fxmich78
            Well, you can optimize your algorithm in a way that your CPU does minimal amount of useless work - if you have multiple conditions, put first the condition that passes the most rarely.

            Also, putting "once per bar" on top of your project naturally makes "every tick" faster, but it also limits the strategy.

            If "open prices" and "every tick" differs a lot, you are probably making too small (short-time) trades. I would change my strategy - the backtest results are not very reliable in that case.

            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

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

              @roar Thank you.I ll give it a try.

              1 Reply Last reply Reply Quote 0
              • fxDreema
                fxDreema last edited by

                In general any generated EA will be slower that the same strategy if you are able to carefully code it manually. This is because the generated EA is full with useless code. My EA builder is not so clever to only include the code that is needed and to optimize it in the best way, so you always end up with bloated slow code. But it should not be too slow... like waiting for hours to backtest one day. It is important what blocks are you running on every tick. Try to connect them in such a way, so the slowest block are running more rarely. Of course, you can't always say which blocks are slower than others... even I can't tell that without testing them. But maybe you are using some custom indicator - maybe this indicator is poorly written and it is too slow. Put that indicator in few blocks and the time stops 🙂

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

                Online Users

                E
                M
                C
                K
                T
                K

                18
                Online

                146.6k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors