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

      I have found a solution, this is obsolet now, thanks.

      I do't know why but since a few changings EA is not turning into "working-mode" after changing konstants on EA's properties but remains on "Waiting for tick - mode". Everything is working correctly on live-demo and backtesting but I am not sure if this is "good" as it is now.

      An another problem is that EA has 300+ blocks and ID number is 100000+. Could an execution of "normalize ID" lead to problems or does that not affecting EA's funktionality at all?

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

        I just put your v1.5 on a live demo account and it works, I got a trade immediately. You can try to normalize. I think it will work, but create a backup first... or the previous step in the Actions History can be a backup 🙂

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

          Ok, I have "normalized" EA and it seems EA is working correctly but there are manny "ab" "inp" now. What is this and how to remove them from EA's property. I want only constants there.

          Then there is another thing... the profit that I get from "For each..." is this the account currency value or the markets value (I am trading currencies like EUR/USD). My account is in EUR but what if EA is running on e. g. USD/JPY?

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

            These variables should not appear, but they does not break the strategy anyway 🙂

            I still believe that you don't know why "For each..." blocks exists. These are not because I want to torture people with must-have blocks. "For each Trade" does many things actually, one of which is that it loads trade "X" at a given moment. When trade "X" is loaded, you can get it's profit, not the profit of trade "Y". When you load "X", you work with "X", not with "Y". The other function of "For each Trade" is that it repeats itself multiple times - as many times as many trades there are to be loaded. So if now you have "X" loaded, then it will load trade "Y" and the same blocks (below) will be applied for "Y".

            You can see filters in "For each Trade" itself - you can choose to load only EURUSD, only USDJPY or whatever symbol you want. By default it works with the current symbol only.

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

              I have to replace the "ab" blocks to make them disapear on properties.

              Mainly, I think I have understand "For each..." but I was thinking that not only the atributes of the current loaded trade was summed up but also the trades where the attributes were comming from will be hold and then they could be closed all together.

              The profit thing I did not understand. The profits on my account are shown in EUR (Balance, equity). What profit is shown when EA is running on USD/JPY. When I close position the profit is shown in EUR is this the same on open trades? I think yes, but I am not sure.

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

                Profits are what you can see for each trade in your MetaTrader. Here is what I got: http://prntscr.com/5f03vj using this: https://fxdreema.com/shared/iVoOTruTc

                If you have 3 trades for example, when you run "For each Trade", it does this:

                1. It loads trade 1 and runs the blocks below the orange output. In these blocks you can get information from trade 1 and you can modify/close only trade 1.
                2. It loads trade 2 and runs the blocks below the orange output. In these blocks you can get information from trade 2 and you can modify/close only trade 2.
                3. It loads trade 3 and runs the blocks below the orange output. In these blocks you can get information from trade 3 and you can modify/close only trade 3.
                4. It now goes to the yellow output. Trade 3 remains loaded, so if you put "close" here, you will close trade 3.
                  ...
                5. On the next tick, or when you run the same block again, it will do the same.

                Of course there are filter settings inside, so you can for example skip trades 2 and 3 and not going to the orange output for them.

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

                  OK, thanks so far. I think I have understand the thing with "For each..." and using It in manny ways succsessfully.

                  Now I am trying to create Buttons to control EA's functionallity to avoid to open EA's properties to change constant values.
                  The Button you have added is nice but I am missing the connection between "Draw Button" and "check button state". I would like to use Buttons like flags. If a Button is pressed/turned on then some blocks are enabled and vice versa. How to do this?

                  Are there better ways than my example below?

                  https://fxdreema.com/shared/LsgMKNawd

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

                    The same thing again - loops and "For each..." stuff 🙂

                    When you have 10 apples and you want to eat 1 apple, you must choose one of those 10, right? You must say "I want this big red/yellow apple right there in the middle!". The same thing happens for MetaTrader 4, because you can have as many trades and orders as you want for the same symbol, and for multiple symbols. You can have 10s, 100s, probably 1000s of them. But MetaTrader 4 does not work with all of them in parallel, it can work with only one of them at a time.

                    The same goes for objects. The only difference is that their unique ID is their name. The unique ID for your trades and orders is their ticket number, which is also unique for the broker. So the same thing goes here - you must choose the object that you want to work with. You can have not only 1 button, you can have tons of buttons. Even when you have 1, you still need to select it.

                    So in fxDreema there are some categories that contain "For each..." blocks on the top of the list. All blocks below these "For each..." blocks are supposed to work with them. If you want to use "check button state", you should have "For each Object" above.

                    There is alternative as well, in "Condition" block, in "Object on the chart". You can write the object name there and get that "Button state" attribute as well. I thin the attribute can be either true or false (1 or 0), so you can easily compare it with such a value.

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

                      I think i could follow you but the two variations below are not working. What is missing/wrong?

                      I would prefer the condition alternative. What I would like to have is to draw text when button is pressed (and will remain as pressed) and to delete text if button is not pressed or pressed again to depress button.

                      https://fxdreema.com/shared/Pfjo9efid

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

                        https://fxdreema.com/shared/TAlGpcLHd

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

                          That is it. Thanks.

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

                            Is it possible by using "Trailing money loss (group of trades)" to create a simple percentage stop loss?
                            What I mean is, if market is going below 40% (loosing 40% from top) of the highest profit value the stop will be executed.
                            Something like the stop is allways 30% of max. profit (70% of profit is allways safed).

                            That will lead to the following:
                            if profit is 100pips, stop will be 30pips but 70pips of profit are safed, if profit is 1000pips stop will be 300pips but 700pips are safed.

                            The next step will be a formula like 60-(profit/20).

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

                              Try this option "% of group profit". But in this case you need to use some "Start", because initially your profit is too low and everything will be closed within seconds. So you need to delay, to reach some profit first.

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

                                I will add the start option, OK. But what is the difference between "Trailing money loss mode" and "Step mode"? Could you explain that, please. Unfortunately it is not possible to draw the stop as a line so I have difficulties to imagine how this block is working. Is it possible to disable the "step mode" by setting to "0"?

                                An another thing is that since today on live demo there is something like this: "5.1 => 2.52" on EUR/USD, for instance, when buy or sells are closed. Is this something that comes with mt4 or is this because of the Trailing group block. What is it, do you know?

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

                                  These options are similar to the same in the regular trailing stop. Trailing stop mode = where to place the stop, Trailing Stop = how often to modify it. Yes, the step can be 0.

                                  When I first made this block, it was with horizontal line. But then I modified it a little bit and now it draws these numbers. What they mean is that when the profit becomes 2.52, trades will be closed, but now the profit is 5.1. In other words: Current Profit => Trades will be closed when the profit becomes this. These numbers comes from the block, MT4 itself does not have such options.

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

                                    Ah, ok. Is it possible to change font size? I would like to have the same font-size like the "Indicator tester" block?

                                    I think the colour-difference between a pressed and not pressed button is not enough. Can I change the colour of a pressed button or could you add that option?

                                    An another thing is that I can't update blocks or save project on my ...v1.8 EAs since yesterday. Or there is something working very slow (sometimes it is working), on ...v1.7 it is better. could you ckeck what could be wrong?

                                    p.s. it seems it is generally very very slow to save project or update blocks

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

                                      Well, it becomes slower with every new block 🙂 I did optimizations multiple times in the past and actually now it's maybe 100 times faster than in the very beginning :))) I will do more, because I am freak when it comes to speed of working. As you probably know, I am rewriting the whole website now and I am on the point where I will rewrite the EA generation mechanism... hopefully it will become faster.

                                      There are no special options in MQL4 itself for pressed buttons, CSS and JS are not present here 🙂 So in order to do that, the event of clicking on the button must be detected and then then properties of this object must be modified. But I think I don't want to include that into all EAs, because it means more input parameters for the block... at least 🙂

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

                                        No no, the performance is ok. "Avast" a anti Virus Software caused the drop down in performance. It is not fast with 380 blocks but it is ok.

                                        I don't need any Indicator but the ATR-Stop loss. I would like to have the attached "Kolier_SuperTrend_Indi". It is addable to fxdreema but there is something not working correctly. I can' t use it with a condition block correctly. Could you help to make it usable to codition block? I could reduce EA's block ammount significantly if I could use this Indicator.

                                        https://fxdreema.com/shared/rmo1topFb

                                        ......
                                        Kolier_SuperTrend_Indi.mq4

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

                                          This one has 2 buffers - 0 and 1, green and red. It seems that fxDreema is confused and decided that there is one more. It's interesting that the same thing happened with another indicator to another guy today 🙂

                                          Otherwise the indicator is working with buffers 0 and 1, I just checked it. The only thing is that it is slow as hell for backtesting 🙂

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

                                            Yes, it is slow but I would like to try it and replace my own atr-creation to see what is better. Is it possible to adapt the Indicator to fxdreema?

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 6
                                            • 7
                                            • 8
                                            • 9
                                            • 10
                                            • 22
                                            • 23
                                            • 8 / 23
                                            • First post
                                              Last post

                                            Online Users

                                            R
                                            F
                                            S
                                            D

                                            14
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors