fxDreema

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

    Zero Divide Error

    Questions & Answers
    2
    3
    1087
    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.
    • J
      james last edited by

      When backtesting with the attached EA and data, I discovered a Divide Error which causes the EA to stop. The workaround is to remove the US500.U market, leaving just the _US500. The problem seems to be a gap in the broker's US500.U data.

      However, this led me to wonder if there was a more elegant way to handle zero divides. I looked around on the internet, and found some stuff which I didn't really understand. So I wondered if fxdreema had any good ideas?

      The data file attached may be imported into MT4. It is an extract of minute data from a reliable source, not the broker.

      ......
      _US500.txt
      Zero_Divide_Error.mq4

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

        MetaTrader 4 cannot backtest multiple symbols, it can only backtest the Current one.

        1 Reply Last reply Reply Quote 0
        • J
          james last edited by

          Ah ha! 🙂 That explains it! I'm so sorry to have troubled you. Thank you.

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

          Online Users

          E
          D
          M
          A
          E
          M
          A
          F

          16
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors