fxDreema

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

    Printing multiple trades to a log.

    Questions & Answers
    2
    3
    454
    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.
    • M
      MStrade last edited by

      Hi fxDreema,

      First, I'd like to say thanks for the work that you've done here.. 🙂

      I'm trying to get an EA that would get the currently running trades logged to a file. After several attempts, I was able to get something working with the for each loop blocks. This code: https://fxdreema.com/shared/VzkmPLhgd works fine for one trade, (the print message and modify variable blocks are just for testing) but it doesn't work well with multiple trades. I may get one or two trades at best.

      Am I doing this the right way? Is there a way to parse/separate the multiple trades currently running and write them to a log? any help is appreciated.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • M
        MStrade last edited by

        Nevermind! I found a fix looking through the forums here.. 😛

        Thanks again!

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

          For each Trade is the important block here. You can run this block once, and it's orange output will be active 10 times in a row if you have 10 trades. Of course, this is not mandatory, because the block has filter settings, so you can choose to skip some of the trades. And in your case the block runs on every tick.

          Then you have once per trade/order - this one monitors trades/orders that For each Trade is loading and it will pass once for every unique ticket number. It has something like private database where it writes ticket numbers that were passed once. Note that this private database is deleted when you reload the EA 🙂

          So, even if block 2 passes 10 times per tick, on every tick, the check profit block is reached only few times. As many times as many trades are created. For example, 10 times for the whole lifetime of that EA

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

          Online Users

          J
          T

          7
          Online

          146.9k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors