fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. TXZZ
    T
    • Profile
    • Following 2
    • Followers 1
    • Topics 9
    • Posts 27
    • Best 0
    • Controversial 0
    • Groups 0

    TXZZ

    @TXZZ

    0
    Reputation
    545
    Profile views
    27
    Posts
    1
    Followers
    2
    Following
    Joined Last Online

    TXZZ Unfollow Follow

    Latest posts made by TXZZ

    • Block"for each trade"Affects backtesting speed

      I wrote a Martingale Expert Advisor (EA), but the backtesting speed becomes increasingly slow as the number of historical orders increases. I tried using Grok to solve the problem, and its judgment is the same as mine, but its fix always results in a compilation error. I hope Fxdreema can fix this so that I don't have to modify every Martingale EA.

      The problem you encountered is very typical: the Expert Advisor (EA) generated by fxDreema slows down considerably during backtesting as the number of historical orders increases, eventually even freezing.

      The core reason, as you identified, is that Blocks 11 and 15 (i.e., MDL_LoopOncePer) iterate through the entire historical order history (OrdersHistoryTotal()) on every tick, using OrderSelect(i, SELECT_BY_POS, MODE_HISTORY) + OrderOpenTime() >= TimeAtStart() to determine if an order is from the current startup.

      As the backtesting period lengthens, with tens of thousands of historical orders, these two blocks perform a full table scan every tick, leading to a catastrophic performance drop.

      The best solution (minimum changes + complete resolution) is simply to change the implementation of the MDL_LoopOncePer class from "iterating through historical orders" to "using a static array to record the parent tickets that have been processed."

      Modify the following location: Locate the class MLD_LoopOncePer<bool> (around lines 600-650 of the code).
      @fxDreema

      posted in Bug Reports
      T
      TXZZ
    • RE: Backtesting is getting slower and slower

      @l-andorrà Thank you. This is such sad news.

      posted in Questions & Answers
      T
      TXZZ
    • RE: Backtesting is getting slower and slower

      https://fxdreema.com/shared/CtpS6sUWd
      For example, in this example, it was very fast at the beginning, but the chart time slowed down after a few hours. After more than ten hours, it was as slow as a snail. I feel that it has something to do with the number of trade, but I set not more than 1 trade in the "for each trade" block. Logically, this situation should not occur. I really don't understand it.

      posted in Questions & Answers
      T
      TXZZ
    • Backtesting is getting slower and slower

      Why does the backtesting speed become slower and slower for strategies using the "for each trade" module?

      posted in Questions & Answers
      T
      TXZZ
    • Hope to add “Stop Limit Order”

      MT5 has a third type of pending order, it is called "Stop Limit Order", but fxdreema does not have this function now. I hope it can be added. Thank you.
      @fxDreema

      posted in Questions & Answers
      T
      TXZZ
    • RE: A BUG ABOUT BETTING:CUSTOM SEQUENCE / LOOP

      @l-andorrà Normally it should be 0.01, 0.02, 0.03, 0.04 ...... to close the position and then continue 0.01, 0.02, 0.03 ...... to close the position. But there is a bug so it will happen like above.

      posted in Bug Reports
      T
      TXZZ
    • RE: A BUG ABOUT BETTING:CUSTOM SEQUENCE / LOOP

      @TXZZ Backtesting will look like this: 0.01, 0.02, 0.03 ...... closed; then 0.01, 0.03, 0.04 ...... closed; then 0.01, 0.04, 0.05... ...

      posted in Bug Reports
      T
      TXZZ
    • RE: A BUG ABOUT BETTING:CUSTOM SEQUENCE / LOOP

      @l-andorrà https://fxdreema.com/shared/rkUXHYUde

      posted in Bug Reports
      T
      TXZZ
    • RE: A BUG ABOUT BETTING:CUSTOM SEQUENCE / LOOP

      @TXZZ MT4 Had the same problem.

      posted in Bug Reports
      T
      TXZZ
    • RE: A BUG ABOUT BETTING:CUSTOM SEQUENCE / LOOP

      My friend and I are also experiencing problems with lots not resetting, we think there may be a problem with the MT5 block, could the author take the time to check it out.
      @fxDreema

      posted in Bug Reports
      T
      TXZZ