fxDreema

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

    Deleting old objects

    Questions & Answers
    2
    5
    1424
    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.
    • roar
      roar last edited by

      This seems impossible to do... My ea is plotting an arrow (or 4 arrows) on each bar, which creates lots of data in long backtests. I was trying to delete all red arrows older than 100 bars, using simply For each object (Z-A, skip 100) -> delete. I named the objects as numbers - object on first bar is named 1, then 2 and so on.
      The ea doesn't delete them in correct order oldest to newest, but randomly! Is it even possible to name them as numbers?
      Any ideas to get rid of the old objects??

      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
      • roar
        roar last edited by

        Figured this out already. Made another variable oldname, which is latest name minus the wanted period, then For each object (name prefix is like Oldname) -> delete. Fxdreema is awesome.

        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
        • fxDreema
          fxDreema last edited by

          You are actually right. The way you were trying to do that is the right way, but something is wrong. This is what I tried - https://fxdreema.com/shared/gHcXIiN5c - and everything is fine in the first few candles, but it fails after "myobj9". I need to investigate 🙂

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

            As I expected, if you have objects with names obj1, obj2... obj8, obj9, obj10, obj11 and they are sorted by Z-A, their order is like this: obj9, obj8... obj2, obj11, obj10, obj1 😕
            The small problem is that this order is native, it comes with ObjectsTotal() itself

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

              Oh, thanks for the insight.
              Im dumping the many objects though, realized its easier to make candle id a variable, loop x period of candles and formula the calculations necessary. Goal is to measure distance to trend line on x previous bars.
              I have been using dreema for over 2 years without playing around objects or loops, they seem to open quite endless possibilities 😛

              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
              • 1 / 1
              • First post
                Last post

              Online Users

              E

              7
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors