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

      Well, I there is no way now in fxDreema to keep the variables in file and then read them from them, but almost the same problem appears for this way of doing things as well. If there is a cache file for each EA, how can we correctly identify EAs?

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

        In a similar way EAs idendify their trades I would guess. But it's ok for now. I have to think about that issue. maybe I will find a solution for my EA. Thanks so far.

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

          It seems replacing constants (maybe variables, too) is not working correctly.

          I have changed the constant "buy_grid_tp_money" into "grid_tp_money" and than replaced "sell_grid_tp_money" with "grid_tp_money". There should be only "grid_tp_money" and no blocks with "sell_grid_tp_money" but I can't delete "sell_grid_tp_money" because there are still blocks with that constant what is not true because these blocks are already changed.
          Could you look over please (only Grid-EA semi-auto v2.8).

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

            I renamed sell_grid_tp_money to grid_tp_money, then sell_grid_tp_money disappeared and the EA can be compiled without errors

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

              regarding block MACD divergence:

              couldn't you make selectable what kinde of divergence should be used (classic divergence or hidden divergence or both of them).

              Couldn't you make controlable/adjustable when a divergence is confirmed.

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

                The chance is that I will hide those blocks. I created them back then when I believed that they are something interesting, but they are not really that interesting. They do what an indicator should do, and they do that in a worse way. I will suggest to find some custom indicator to do this task. With it you will have some visual output, it will probably work faster and it will have more options.

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

                  my last question is obsolet.

                  It seems there is a problem with one or two blocks. Take a look on my EA ...v2.8 There are two additional areas (18 and 19) rimming the relevant blocks. Area 19 and below blocks should be executed after blocks in area 18 were executed.

                  The behaviour is like the "Turn On..." block is not executed and therefore the "Pass" block is not turned on. The funktionality in area 19 and below is defititely working because the button in area 19 is executing correctly but not the "Pass" block in area 19. Could you look over please.

                  I have no idea why the "pass" block is not executing the blocks below like the button is doing. The enter connecting points are the same.

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

                    "Turn ON" only enables a block by it's number, it does not run any block. There is a block "Run blocks". I sill suggest to give custom IDs of these special blocks. Note that not only numbers, but also latin characters are allowed. This option can also be used: http://prntscr.com/8ziaxb

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

                      Ok, but if there is a disabled "Pass" block it should run immediately after turned on by "Turn On.." block, right? Therefore all blocks behind the "Pass" block should be also run. An active "Pass" block is always running, right?

                      I don't really understand the difference between "Run blocks" and "Turn On blocks". Could you give me an example that shows their different application and where these blocks are not interchangeable.

                      Wounderful! Normalized block ID's without any "sideeffects" in EA's properties.

                      Apart from the above I have connected the "Pass" block directly. In that case the "Pass" block and the blocks afterwards are forced to run after one of the "Close all..." blocks was activated but that was also not working. I belive there is a problem with the output of "close all..." blocks in area 18. The button is always executing the blocks afterwards correctly. Could you look over, please (just the logic/syntax/code).

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

                        "Turn On" is not the same as "Run"!

                        As you know, any block can be disabled, which means that it will not be able to run when you run the EA. It still exists in the MQL4 code, but there is unique variable that exists only for this block which is false and because of that the function of that block is not allowed to run. To "Turn On" this block means to set that variable back to true.

                        To run a block, this means to call it's function in the MQL4 code. Inside that function, the first thing to do is to ask whether the variable (which I explained above) is true or false.

                        Just look at the code, I think you will get it quicky. Especially with so many blocks that you have, one of the first thing that you will see are those special variables, most of which are = true;

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

                          Ok, I will take a look later.

                          But now I have changed the connection from area 18 to area 19. It is now not only by a block to be run or be turned on but also a direct connection be a "Pass" block and this is also not working as I wrote above in my last posting. What is not working correctly now? After a "Close all..." block was run the "Pass" block shoud also run and the blocks afterwards.

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

                            http://prntscr.com/90dmkw

                            Block IDs matter sometimes! https://fxdreema.com/demo/blocks-execution-order

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

                              Thanks, everything is working correctly again.

                              I have taken a direct connection by a "Pass" block and maybe I have forgotten to connect a flag with all necessary blocks 🙂 but our postings about that issue were definitely helpfull.

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

                                I would like to place orders while market is inside of a coloured rectangle (Indicators buffers are not suitable).

                                There is something like "pick object by ..." .

                                Could you give me an example how to do the following:

                                while market is inside of a specific coloured rectangle (for example: red) a condition block or something similar should be executed to drive a buy or sell block. There is no name just the colour.

                                ......
                                screenshot.jpg

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

                                  "For each Object" is used to select an object by searching in all objects and pick one that matches it's filters. And it has filters to say what type the object should be (line, rectangle, whatever) and also what color. Also I recommend to set "Not more than..." to 1.

                                  Then in "Condition" go to Object on the chart. There in "Object source" select "Picked by loop" and select Price level 1. This should return one of both prices and it can be compared with Candle Close, Ask, Bid or something else. The same goes for Price level 2.

                                  It becomes more complex if you want to work with multiple objects, then "For each Object" must have empty "Not more than" to not stop when the first matched object was found, and have some Variable to set it to true if for any object conditions were true.

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

                                    I think I have understand your instruction and will implement it later but I don't know what two prices you mean. Is it Price 1 = ask and Price 2 = bid or what prices do you mean?

                                    There are manny object but EA should always take the object that is closesd to the market. The first object the market is hitting is always the right/correct one. As long as market is within the coloured rectangle condition should be true/open otherwise false/closed.

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

                                      This type of object is built from 2 points, each one with price and time - http://docs.mql4.com/constants/objectco ... _rectangle

                                      The closest to the price is most probably a object with name that is also closest to Z. As you know, objects are selected by their name and "For each Object" searches for objects from A to Z or from Z to A. Finding the first pink rectangle with Z-A sorting sounds to me like it will do the job. For this, set "Not more than..." to 1.

                                      Of course it is possible that A-Z will work better, just check the names of those objects to decide how to sort them.

                                      I will suggest to first play a little bit with "Indicator tester", until you get the idea and until you understand Price 1 and Price 2.

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

                                        Is that backtestable? As I have understand you right the Indicator is just providing the objects but is not added to EA. Of course I will add indicator to chart on live demo/real account.

                                        Do I have to add indicator somewhere and somehow to EA?

                                        There is a "indicator is visible" block, is that block necessary to make functionality working?

                                        I have the below. What have I to add to make funktionality backtestable?

                                        ......
                                        screenshot1.jpg

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

                                          If these rectangles are made by indicator, of course, first try to see what it's buffers can give you as signals. It's possible that you have access to the data you need exactly. I was talking in the case when the only way is to get some information out of the objects.

                                          Indicator is visible - this detects if some buffer is different than EMPTY_VALUE or 0. Basically it's the same if you use "Condition" to compare indicator with > 0. If one of the sides in "Condition" is "EMPTY_VALUE", it does not pass.

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

                                            I have attached the indicator. The buffers are appearing to me to be not sufficient but maybe you could find out how this indicator could work on EA.

                                            In case there is only the .exe data of an indicator available it is not possible to backtest EA with the objects the indicator is providing on live account?

                                            ......
                                            SS_SupportResistance_v07 (1).mq4

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 12
                                            • 13
                                            • 14
                                            • 15
                                            • 16
                                            • 22
                                            • 23
                                            • 14 / 23
                                            • First post
                                              Last post

                                            Online Users

                                            K
                                            E
                                            D
                                            E
                                            M
                                            H
                                            C
                                            I
                                            I

                                            22
                                            Online

                                            146.6k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors