fxDreema

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

    self updating/refreshing grid, compare two groups of trades

    Questions & Answers
    10
    449
    423928
    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.
    • fxDreema
      fxDreema last edited by

      Manually opened have magic number, which is 0. What is magic number... look here (I know it needs to be updated) https://fxdreema.com/documentation/work ... d%20groups

      Yes, in blocks that have the Group number as a filter, you can use values like 1,2,3... multiple group numbers separated with comma

      1 Reply Last reply Reply Quote 0
      • R
        ramsay09 last edited by

        As I have understand you, the block "Close trades" with groups (1,2,0) shoud close group 1 and 2 and 0, as 0 are the manually opeded trades. But this seems not to work. I need exactly something like this (1,2,0). If condition is met groups and manually opened trades shoud close. What could be wrong?

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

          No, group 0 is not the magic number of 0.

          Magic Number = Group Number + MagicStart (input parameter for the EA)

          But if you set your MagicStart to 0, then it will work that way 🙂

          1 Reply Last reply Reply Quote 0
          • R
            ramsay09 last edited by

            Ok, But EA is running on Cent-Account and changing Magic-Number will cause a loss of control of all running trades, right? The current Magic-Number is 1860 (default). Is it possible to take "1860" instead of "0" to get the same results. To get this (1,2,0) with "0" I could make (1, 2, 1860) with "1860" or is (1, 2, 01860) or (1, 2, 18600) correct? I am afraid it will not work.

            I don't know where and how EA is recognizing his trades (Magic Number of course) but is it possible to delete somewhere tradehistory or something loke that and force EA to take running trades only by the market name EUR/USD for instance. What I mean is that EA has a different Magic Number than the trades have but after "reset" EA is recoginzing for instance EUR/USD trades and takes them under control again.

            What would you suggest?

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

              If MagicStart is 1860, then:

              • Group 0 is translated to Magic Number 1860
              • Group 1 is translated to Magic Number 1861
              • Group 2 is translated to Magic Number 1862
                ....
              • Group -1 is translated to Magic Number 1859
                ...
              • Group 1860 is translated to Magic Number 3720
                ...
              • Group 18600 is translated to Magic Number 20460
              1 Reply Last reply Reply Quote 0
              • R
                ramsay09 last edited by

                Ok, if I understand you right:
                1860 + 0 (manually opened trades) = 1860 therefore
                "close open trades" (1, 2, 1860) will lead to
                close group 1, group 2 and close all manually opened trades, right?

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

                  No. But 1, 2, -1890 will probably close manual trades. Or 1, 2, MagicStart

                  1 Reply Last reply Reply Quote 0
                  • R
                    ramsay09 last edited by

                    Ah ok. The sum of MagicStart and GroupNumber must be "0". That equals to MagicNumber = "0". Therefore I can take the negativ MagicStart = -1860 (I am assuming -1890 is a typing error) but MagicStart as word will also work?
                    "close trades" (1, 2, -1860) is the same like (1, 2, MagicStart)?

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

                      __Magic Number = Group Number + MagicStart (input parameter for the EA)[/quote:1cpmcnmd]

                      1 Reply Last reply Reply Quote 0
                      • R
                        ramsay09 last edited by

                        hi, it's me again,

                        It seems I need something that is working like "pips away.." on "trading model" but without an opened trade. I need something that is working like "round number detector" but only in one direction. The orange output should be set to open only when market was moving from his last position (for instance) 20 pips away and not setting orange output to open when market was moving back and is continuing his last direction. Is it possible to create something that is working that way?

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

                          "Round numbers detector" is only looking at the price, it is not linked to any trade. I think I can add an option to never come back, once I understand it's messy code 😆
                          Or you want to do similar thing, but starting from the open price of some running trade and only while the trade is still running?

                          1 Reply Last reply Reply Quote 0
                          • R
                            ramsay09 last edited by

                            Indeed, I really think that "round block detector" could be modified to deliver that behaviour. It is important to have something like that to create things independent of how manny trades are running. Of course there should be an reset and it makes only sense to operate it with a block like "If trade is running" (or this could be the reset, actually). A possible modification could be to safe the price value when orange output was triggered and it will be allowed to the block to trigger the orange output again only when price is bigger (or lower, yellow output) than the next trigger level and the saved price value.

                            Appart from the above, could something like this work? https://fxdreema.com/shared/6BioX7Oad

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

                              You know... now "Round numbers detector" will works fine if the EA is restarted. This is a rule that I want to follow in general, this makes the whole EA more predictable. There are now some blocks that will reset if the EA is restarted - all flags, counters and "once per trade/order" - they all keep it's current state in local variables, which are cleared in case of restart. I don't like these blocks very much because of that. So I'm not really convinced to do such modifications to "Round numbers detector".

                              When you use Variables, at least you know from the beginning that they are temporary and you expect them to be cleared when restart. And there are some alternative ways to store information - in a file, in Terminal Variables, in chart objects. When I am saying objects, I can suggest to use horizontal line - you can create and keep modified the same line using only one block (Draw Line) and you can easily check it's value. The same line can be controlled from multiple Draw Line blocks as well. Plus, a horizontal line is something visible and it can be modified from the chart.

                              In you example the connection between 4 and 3 is probably wrong. You don't know what will be loaded from block 4. It will not be a trade for sure, but it will be some pending order, one of all if there are many. When you use pink block, always use "For each....". I mean, always, especially in MT4. And not visually above, but logically before.

                              1 Reply Last reply Reply Quote 0
                              • R
                                ramsay09 last edited by

                                Ok, thanks. I hope I could follow you. Will the following two solutons work, especially the right one?
                                https://fxdreema.com/shared/5VioyYuab

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

                                  I don't know whyblock 6 and 11 are used, but be careful with "Draw..." blocks - their frist 2 settings are very important for the way they handle objects. In the case you will have a new line on every bar with name like step_line_buy + appendix.

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    ramsay09 last edited by

                                    Blocks 6 and 11 will be used somewhere else to increase lot-size variable. The increase of lot-variable is a major thing here.

                                    There should be allways a line in front of market-direction (each for uptrend and downtrend) and should be redrawed if condition was meet. I hope it will work as a step-counter to have always the right lot-size ready for execution on the right market condition.

                                    Is it possible to make these two lines invisible because they are just helplines for stepcounter.

                                    Are both variations correct and would they work as described/expected.

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

                                      Mmm I think there is no way to make object invisible, but I'm not sure. In these blocks I added all of the possible parameters available in MQL, or I am not aware of something else that can be added

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        ramsay09 last edited by

                                        to pick up chart objects and use it with EA, is it necessary to have added the mql-file of indicator into fxdreema? Is it possible to have only the exe-file of indicator and use its objects with EA (all these objects have names of course)?

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

                                          In fxDreema you need to add indicators only if you want to have them into the database and easily select them in blocks - their input parameters and buffers. Then in the code the iCustom() function is used to get values.
                                          https://fxdreema.com/documentation/work ... indicators

                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            ramsay09 last edited by

                                            it is working but the problem are the names of indicators lines on the chart. The names are like sr_1, sr_2, sr_3 and so on. In "condition" -> "object on chart" -> "object name" I would like to use something like sr_X or how to "say" EA in "objet on chart" to use every line on chart that is starting with sr_. Other blocks are allowing to use prfix.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 9
                                            • 10
                                            • 11
                                            • 12
                                            • 13
                                            • 22
                                            • 23
                                            • 11 / 23
                                            • First post
                                              Last post

                                            Online Users

                                            M
                                            M

                                            13
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors