fxDreema

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

    giving trades some attributes

    Questions & Answers
    2
    5
    1039
    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.
    • H
      hilavoku last edited by

      Hi.

      I wan't to give an open trade some attributes like a value or an boolean flag. One possibility could be to use the comment of an trade. I see that in FXdreema I can set the comment to a string but only a string without having parts of it build of variables. Would be nice to fill the comment with variable values!

      Do you see any possibility of doing that?
      Is it also possible to get the ticket number when a trades was made? So I could get the ticket number and save it to other attributes... 🙂

      thanks in advance
      hila

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

        For the "Comment" parameter you can use some variable. Now I don't want to make things more complex because of rare situation like this. And you should be careful with this parameter, because it is very limited. If I remember correctly, only 32 symbols can be used for a comment. Also, it can be set once, then you can't modify it. Which means that you can't put the ticket number there. The broker can always modify it, and I think some brokers actually do that.

        The comment is normally changed by the broker when the trade was closed by SL or TP. "[sl]" or "[tp]" is appended in this case. I also use the comment to save information when expiration is used for trades, because they does not support that naturally.

        If you have binary options broker, forget about the comment.

        You can get the ticket number of course. OrderTicket() always works, but I will recommend to use "For each Trade" with "Not more than..." parameter set to 1, and then use OrderTicket(). Also in the "Condition" block you can find it somewhere in the pink (in loop) category.

        What is your situation?

        1 Reply Last reply Reply Quote 0
        • H
          hilavoku last edited by

          Thanks for the fast answer.

          I will use the loop and set 'Not more then' to 1 to get the ticket number. So I don't have to use the comment.
          I also will need to use an array otherwise I can't handle the lines I'am drawing on the chart. Hope to get a good solution combining the FXdreema blocks and the array in the background...

          Thanks again. Now I can keep going on !
          hila

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

            Hm... what about the lines? They are the same as the orders and trades, but their ticket number is their name. There are blocks to work with objects.

            Working with arrays in MQL4/MQL5 is a little nightmare for me, I'm not sure that you want to deal with them 🙂

            1 Reply Last reply Reply Quote 0
            • H
              hilavoku last edited by

              At the moment I try to get a workaround so that I'am not needing arrays... 😉
              Meaning a little more typing but that is okay. Arrays would make using FXdreema better but I see that only a hand full of people need it...

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

              Online Users

              M
              L
              T

              10
              Online

              146.8k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors