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.
    • R
      ramsay09 last edited by

      OK. Thanks so far. I have to test on demo the next time.

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

        It seems EA is working stable. But there is a problem in case EA was running and mt4 was restarted. There are two problems:

        EA has buy/sell open (e. g. 0.01 each) -> trades are closed and EA is removed -> restart mt4 and EA with same magic number ->
        EA starts buy/sell with 0.02 each instead of 0.01 -> after repeating same procedure it starts with 0.03 each and so on. When I change magic nummber it starts as it should with 0.01 each. Whats wrong here and how to reset mt4s memory or what ever?

        The next problem was when mt4 get closed while EA was running and trades were open. After restart, mt4 added the same ammount of trades or something random (I did not verify that exactly) again. That happens only on mt4 restart and not when internet connection get lost. The EA itself was working properly. How to avoid that behaviour? Could you help please, maybe on monday when markets are open again.

        https://fxdreema.com/shared/gm2RwUZje

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

          too busy at the moment? Do you have an idea? A hint or something clould help me.

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

            Sometimes I'm with my friends and we are doing something whole day 🙂

            What remains the same after restarting the EA (and MT itself) is the list of trades with all their parameters, objects and their parameters (if the same chart is used), candles and bars of course, and that type of global variables that can be accessed with F3 in MT4 (these are variables written in some file, so they remain on the disk).

            Everything else is temporary in the EA, for example "once per trade/order", other "once per..." blocks, flags, Variables, counters... basically blocks are storing their information in RAM only. For some thing I'm considering using external files to store runtime information, but I don't know when will that happen. And sometimes I think that this is a good idea, other times I thing the opposite 🙂

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

              I could not solve the obove mentioned problem. The EA itself is working as it should. I have never seen that behaviour on other EAs (downloaded free EAs). What in particular is to do to avoid that. It is absolutly unaccaptable in case I have to shut down my Computer the EA is opening randomly orders after MTs restart.

              Other things I would like to ask you:
              Is it possible to change font size on "Comment on Chart" block and to shift comments to the right?
              Is it possible to disable the label of an open trade (or to shift it to the right). I mean the white lettering "#124273 buy 0.01" this is overlaping with comments on chart.

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

                Well, someone else will prefer the EA to start clean on restart. I think these global variables (from F3) will do it if you need to save some values for later use, you tried them?

                No, the white text on the chart cannot be edited, this is past from MT4 that cannot be controlled from the EA. Otherwise I'm preparing some blocks to draw different things on the chart, including static text that can be controlled.

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

                  There are no Variables in "F3 window". EA is starting properly only the first time with a new magic number. After the magic number was "used", EA or MT4 is adding additional lots to the existing ones and if there are no open trades it starts with the old value + X in one position. And this is regardless even when I reboot computer before restart MT4. I would change to MT5 but gridtrading is not possible there, right? Help is very welcome.

                  EA has a usable state for a longer demo testing periode (appart from the above mentioned) but it is a little bit slow. What makes fxdreema EAs slow most:
                  Variables, Constants, Conditions or many blocks in general or what should I "optimize" to make it faster.

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

                    Many things makes the EA slow. Mostly in backtesting, you should not have any problems live. Yes, fxDreema is build to be universal, some blocks have multiple properties and in the output EA you get all the things you need + even more things you don't need. So, the same EA can be coded manually and it can be more optimized. In the same time it also depends on how blocks are connected, you can have the same strategy results with different blocks (or the way blocks are connected) and one can be slower than the other.

                    Let's say you want to check some indicator between 17:00 and 18:00 only. You can place the indicator before the time filter, or after the time filter. The first block will work on every tick. Well, the time filter is most probably the faster block, so if this is the first block the strategy will work faster. If you connect the indicator condition first, and then the time filter, the indicator will be running on every tick, whole day long, but it will be slower. The same result, different speed.

                    Constants and Variables are just regular variables for the EA, which are always used, they are not making it slower. In fact, there are times more variables in the EA other than these you define in fxDreema.

                    I don't know your EA now, I lost track. But when you build some EA, always try to use parameters of trades and orders - they will be there when you restart, they will be there even if you reinstall MT or move to another PC. For example, let's say we want to make Martingale. We can create some temporary variable and store every next lot size in it. When we restart that variable will be blank. But if we get the last lot size from the previous trade, the information will be there even if we move to another PC.

                    F3 global variables are a way to keep some information for later use. Almost the same as writing it in a file and then read it. The information will be there after you restart MT, but not if you move to another PC 🙂

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

                      OK, thanks I will check EA if there is potential to make it faster.

                      The basic EA I have posted in previouse postings is still valid and it has the same problem like the current one but the basic one is much less complex and I think you could be able to look over much faster.

                      https://fxdreema.com/shared/eI01NG8td

                      What do you mean with "use parameters of trades and orders" where and how to use them? The F3 Window is allways empty even on EA running for two weeks. I have understand your writing but I can not verify it. Again please :).

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

                        Parameters of trades and orders = lot size, type (buy, sell), magic number, sl, tp, open price, close price...

                        I think the problem is in "once per trade/order" block, as it uses temporary memory to store the tickets of all trades. When you restart MT4, all information about this is cleared.

                        I think I just found easy solution for this and I will try to fix it, but a little bit later because now I have to so something 🙂 I will let you know...

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

                          Mm, I think I've done it, can you try it? It now checks if the trade is opened after the EA is started. If the trade is older, the block will not pass.

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

                            thanks so far. EA is not adding trades after MT4s restart while EA was running. Thats fine now but if you remove EA and restart it, EA is still adding lots regardless of restarting MT4 or not. If you change magic number, EA starts for the first time correctly with 0.01 lot each but if you remove EA and add it to chart again it starts with 0.02 each and so on. This happens even when computer is restarted.

                            To fix my further developed EA, name the blocks I have to replace, please.

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

                              So, as I explained it above, some things will go away when you remove the EA, others will stay. If we take the Martingale block for example, it checks the last closed trade's lot size and doubles it for the next trade. So, in this case Martingale does not start blank. Most of the money management methods are like that.

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

                                Unfortunately the grid is not working. On backtest everything is ok but on demo, appart from the initial orders, there are no further orders when market is moving on. I have reinstalled MT4 but I do not think I have forgot a setting to run EA properly.
                                https://fxdreema.com/shared/8xhVPdLfc

                                Then there is another thing: to use "round number detector" it is neccesary to have the value as fractal number, right? To make that sure I have to devide variable by 10000. I have added a formula to the "white point" to make sure the value is correct before used by block. But this is not working. Could you look over block 277/278 (buy side, 2nd area), please.
                                https://fxdreema.com/shared/19tf4nvkb

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

                                  You are using some variable named "grid_space_var_II" in blocks 289 and 292, which has value 0 when it reaches 289. Inside 289 there is some endless loop (that I have to check) which causes the EA to hang. I will fix the problem with the loop, but there should be some value that is bigger than 0 for "Round numbers detector" anyway.

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

                                    The main problem 🙂 There is something that goes out of control in 277 where you divide that variable and also use it there, at some point the variable is becoming 0. My suggestion is to do /10000 somewhere else, probably where all the variables (including this one) are associated with values.

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

                                      The buy side will be mirrored the the sell side. Just look on the buy side. The variable "grid_space_var" is correctly calculated and saved when block 325 is reached. Actually everything was working bevor I changed block "once per trade/order" (it seems). The point is, as I think, how to make sure "grid_space_var" is used in the blocks "Round numbers detector" and "pips away..." after it is calculated and saved. In this case it is irelevant if the initial setting is == 0.

                                      Are blocks in EAs automaticly updated or is replacement necessary?

                                      I did not verify yet (tomorrow at noon maybe) but could that work (block 277/278):

                                      https://fxdreema.com/shared/Ei1CgH91d

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

                                        https://fxdreema.com/shared/aa3gSlc9e

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

                                          Thank you. On backtesting everything is working fine but on demo the grid is still not working. I hope you can fix it.

                                          https://fxdreema.com/shared/1xPcClmsb

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

                                            Oh boy, I have to reorganize your project completely again in order to understand what is going on 😏 Now what is not working? Some errors, weird behaviour?

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 22
                                            • 23
                                            • 4 / 23
                                            • First post
                                              Last post

                                            Online Users

                                            R
                                            F
                                            S

                                            11
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors