fxDreema

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

    Working with market depth

    Questions & Answers
    2
    6
    2352
    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.
    • C
      carlosaas last edited by

      A good day to all

      Some time I'm studying the builder and I really enjoyed the variety of options and situations that we can handle with this tool, and so here are my congratulations.
      But seeing the conditions and the options of blocks that we have not seen anything that could be used to analyze the depth of the market, and I found in the forum nothing that said about this.
      In the custom mql5 block of code I can not put an array because when I send the file it turns a variable, and I do not know if I'm programming the wrong code (I'm still very bad in the language), but when I put MarketBookAdd in OnInit it does not Appears in the file mq5, I deleted the project but I did the way it was in the code sample that the site gives on OnInit, I put the pass block and then the custom mql5 code, and it did not work.

      Is there any way to access the depth of market data for me to do my analysis?

      Is that the information that is provided under the conditions are very specific and do not give much choice of analysis.

      Forgive me for any mistake, I used google translator.

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

        You know, I personally don't understand that market depth and I don't know how it works. Basically you can use any native MQL4/5 function pretty much in every block, in almost all input fields you can see (well, each of them has certain data type).
        But better show me what you are doing, because there are many reasons for something to not work ๐Ÿ™‚

        1 Reply Last reply Reply Quote 0
        • C
          carlosaas last edited by

          Look, I'm going to try to explain to you how it works, just the way I understood it, and I hope you and those who read also understand.

          From the programming point of view if you pull the information from MqlBookInfo it only brings a list that shows the volume of offers for the 15 values โ€‹โ€‹above and the 15 values โ€‹โ€‹below the current market price, these offers are all orders pending. And here to understand what they serve we have to remember a maxim of the market: "buy cheap and high sale", so the whole volume below the current market price are purchase orders, and the above volume are sales orders, And so when we buy we always buy from Ask (we buy from someone who is willing to sell) and we sell at Bid (we sell it to someone who is willing to buy it). In Metatrader's Book there are other functions, buy and sell buttons, tick charts, among others, but they involve some more practical concepts that use other Metatrader features.

          Now if you leave the Book of Metatrader open in such a contract you will see that in some moments the volume of offers for sale is much higher than the offers of purchase, and in some of these situations the price rises. But there are some situations in which the volume of sales offers is monstrously larger than that of purchase offers, that is, there is a huge amount of people willing to sell and realize their profits, and the chance of the price going up is even greater, but It's like I said, it's just chances. It is easier to see what happens in contracts that are highly liquid and highly sought after for daytrade operations

          What can be removed from this for analysis, if you make the sum of the offers of sale and soon after subtract the sum of the offers of purchase there we have an indicator that gives us the direction to where the market is pointing at that moment, and this is very Good for daytrade and scalper trade operations, from this image I took we can see a 30% bigger offer of buy offers than of offers of sale in that contract.

          0_1482350886934_mktdeep.png

          In this image there was a break and the price fell, so I think it is valid as an analysis tool.

          Already I'll put another suggestion here, just as you ticked the ticks per second option could make the volume per second, since each tick brings together a trading volume, and the volume is one of the most important indicators to analyze .

          The information in the upper left corner of the image is an expert that I did as a test, so the name is asdfg, but it can take those informations.

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

            So this is basically like inside information about how many people are sell and how many are buy? I wonder what is the chance for this information to be real.

            I also wonder what kind of value or block can I put in fxDreema. Because I will not make something to draw indicator lines for sure.

            There is one problem by the way. MqlBookInfo doesn't exist in MQL4 and I prefer to make blocks and function that can be used in both, MQL4 and MQL5. You know, people tend to copy blocks between projects and it's ugly when something is missing. Which is actually true right now, there are some blocks and their parts that are not the same in MQL4 and MQL5, but I wish to make everything equal and I'm planning to do that. Currently I'm working on a MQL4 to MQL5 converter, so at the end I will know the differences in both languages very well.

            Volumes per second. Now to be honest again (and to show that I don't understand markets even more), I have no idea what is the difference between both volume modes in MQL4. There is tick volume and real volume. I can also say that I don't really understand what volumes are and from where they come from ๐Ÿ˜„ I guess that more volumes means more trading was happening, but in MQL5 are those values even real

            1 Reply Last reply Reply Quote 0
            • C
              carlosaas last edited by

              Some ticks come only to change the position of ask and bid and others to change the position of the price, and the price only changes when there is a closed negotiation. The difference between the two is this, the tick volume adds the ticks that do not change the price and the ones that change, real volume only adds the ticks that change the price or that have volume.

              I've understood your position and your intent about the system, focusing on experts rather than on indicators, and reducing the disruption to whoever uses your system by making it comparable, and I think you're right about it.

              But I still need to put the mqlbook and I could not, I did as Metatrader's help says, I added it in OnInit and using the example (I put the pass block and then the custom mql code), I can use it or on OnBookEvent Has on your system) or OnTick of that case put it on OnTick between some conditions, and close it on OnDeinit, I did all this, when I downloaded the file mql5 the code that I had written for OnInit was not there and the array that I had Placed to save the mqlbook data has been transformed into a variable.

              MKTDEEP test

              This is the code that gives me those numbers in the upper left corner of the screen, you will see that it is pretty bad (I had to loop manually) if you can, take a look.

              Well, anyway our conversation was very enlightening, thank you.

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

                Well, I'm not against indicators or market depth, the thing is that I can only do things I understand... and want to play with. Indicators... I don't know, I was never interested in them, so I never worked with them seriously. Currently I'm interested in making MQL4 to MQL5 converter and I was working on it for the past few weeks.

                So, if market depth is a separate event... let's say that if someone decides to copy blocks from MQL5 to MQL4, he will intentionally skip any blocks in this event, because this is specific for MQL5. What else is needed, what kind of blocks? I literally see only 3 functions - MarketBookAdd, MarketBookRelease and MarketBookGet. I'm asking you for everything, because otherwise I feel that if it depends on me, I would never look at this thing and never make it ๐Ÿ™‚

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

                Online Users

                F
                T
                C
                G
                P

                10
                Online

                146.9k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors