fxDreema

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

    Trade Taken - Wrong Magic Number?

    Questions & Answers
    3
    11
    2705
    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.
    • S
      SydneyFox last edited by

      My EA has taken a trade on eurusd with magic number 1501. This is the EA on the chart. At a certain level, which is correct as per my methodology, and as per the EA attached, a 2nd trade has been taken. This trade though shows magic number 1502.

      The EA with magic number 1502 was previously on a different eurusd chart. It is exactly he same EA but with a different magi number for each chart it is attached to.

      The only way the EA knew to take the 2nd trade and at what level to take it was by previously taking the 1st trade. i.e. The same EA but with a different magic number wouldn't have known the level to take the trade at.

      Any explanation as to why this has happened? Is there something I need to do within the EA to prevent this happening again? How do I know that the EA with magic number 1501 is going to control both trades?

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

        Have taken a look at the "Project Options" of your EA? There you can choose/change the magic number. Choose a new one and try it again.

        Hope it helps.

        1 Reply Last reply Reply Quote 0
        • S
          SydneyFox last edited by

          Thanks for your reply. I have changed the magic number but it has happened again. It doesn't happen all the time which I find weird.

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

            I think you are using "groups" -- groups are working with magic numbers ...

            Between trading and gambling is a very small gap, be careful.

            1 Reply Last reply Reply Quote 0
            • S
              SydneyFox last edited by

              so if I have groups of trades then each group will have its own magic number? This is automatically assigned by the EA or MT4 when the new group of trades starts? And is used by the EA to control each different group?

              So if I put an EA on the chart and assign it magic number 1010 then the first trade/s will use this number but when a trade is actioned from a new group then these trade/s will have magic number 1011 etc?

              So to avoid confusion between trades on different charts then I should use magic number of say 1020 on the 2nd chart? Then the trades on this chart will use 1020, 1021, 1022 etc?

              Hopefully I've got this right. I'll give it a try.

              Thanks again for your reply.

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

                it is controlled by fxdreema EA, even different EAs from fxdreema can collaborate with magic numbers and groups (in case they are right used)
                magic number is sent with order to broker (manually opened trade have magic = 0)
                yes, say EA have magic 1000, trades with empty group have magic number 1000 (without change), but trades with group 1 have magic 1001, group 2 are 1002, and so on
                yes, when are you using groups, you must use magic number with consideration of no conflict between them 😉

                Between trading and gambling is a very small gap, be careful.

                1 Reply Last reply Reply Quote 0
                • S
                  SydneyFox last edited by

                  How do I record the magic number of say group 2 or group 3 in a comment on the screen when a trade is taken? @miro1360 you helped me earlier with a comment for the magic number in a comment which works well. But when I use the same logic with a comment after a group 2 trade is taken it still references the original magic number.

                  i.e. magic number say 1010 for 1st trade. when 2nd trade is taken it uses magic number of 1011. But in the comment it still shows as 1010.

                  Is it possible to show the magic number of 1011?

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

                    yes, you must just increase this magic number by group number ... with simple math "plus" operator

                    Between trading and gambling is a very small gap, be careful.

                    1 Reply Last reply Reply Quote 0
                    • S
                      SydneyFox last edited by

                      @miro1360 that's what I thought I could do but it doesn't seem to work. Maybe I'm doing it wrong?

                      I've made a simple EA as follows https://fxdreema.com/shared/LejuBVIHb.

                      If the first trade is magic number 8043 I would expect the 2nd trade to be 8044 but instead it shows in the comment as 80431. If I hover the mouse over the trade in MT4 it shows as 8044 it's just in the comments I can't get it to be right.

                      Is this because in the comments the magic number is being picked up as text and not actually as a number? So it is adding text + number instead of number + number?

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

                        yes, your example is adding text+number, this sould add number+number, try it:

                        0_1515120615154_c22a0cab-5427-48e0-b3b9-3a994e550aa0-image.png

                        Between trading and gambling is a very small gap, be careful.

                        1 Reply Last reply Reply Quote 0
                        • S
                          SydneyFox last edited by

                          You're very good. Thanks @miro1360

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

                          Online Users

                          K
                          F
                          E
                          T
                          S
                          A
                          I
                          A
                          E
                          S

                          21
                          Online

                          146.7k
                          Users

                          22.4k
                          Topics

                          122.6k
                          Posts

                          Powered by NodeBB Forums | Contributors