fxDreema

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

    Count Trade Lots

    Questions & Answers
    5
    17
    2817
    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.
    • S
      Slashes @fxDreema last edited by

      @fxDreema what if I only want to count buy only or sell only?

      l'andorrà 1 Reply Last reply Reply Quote 0
      • H
        holygrailfx last edited by

        Is there an easy way to count the total number of open lots for buy and sell orders
        So in short if I have three open buy trades, one of 0.01 lot, one of 1.5lots and one of 2 lots it would return 3.51

        I must have overlooked something but I just cant find it

        PS after 2 weeks holliday it was refreshing to see some new colors to the website, looking forward to discovering the updates to the software, cheers

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

          This easy way is on the way. It will probably be a block that will select group of trades and then in Condition (or any other) it will calculate different values using those selected trades.

          But in fact this can be made pretty much easily using Variables and the result will be better. In "For each Trade", in it's second panel "Variables", if you have variable that is V1 there, write this in it's input (the orange color): V1+OrderLots(). Then use the yellow output of this "For each Trade" to connect something else.

          S 1 Reply Last reply Reply Quote 0
          • H
            holygrailfx last edited by

            Thanks

            I will have to look into how to do more with the variables option, I am missing out on something there

            But happy to see the lazy *ss option in a prefigured block as well 😉 Brilliant

            Would you mind droppping a message when the block has been added, so I can update my Ea before market open on Sunday night

            Cheers

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

              Well, I am always doing something, I didn't said that I will start doing exactly this right now. And you know... even if I do something new, it's probably not the best idea to use it right away.

              1 Reply Last reply Reply Quote 0
              • H
                holygrailfx last edited by

                Sorry, my enthusiasm got the better of me...
                When I get back from a holiday I am way too excited to implement my new ideas 😉

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

                  The thing is that if we select a group of trade in a single block, this will be just another term "group" in the builder. So I decided to color-code those groups. Instead of input field where you can write 1, 2, 3 or whatever, imagine that there is drop-down input with few options for color - red, green, blue, yellow... So in one block you select group of trades and certain color is associated with this group, then in "Condition" you can select that color and work with that group of trades. Does this sound good or it's better to use numeric or string values for this?

                  Another issue is, people don't really get the idea of such blocks that are loading something trade in the memory (like "For each Trade"). I was thinking to not making new block for this, but doing all the selection of trades in "Condition" directly. The problem with this is that 1) you need to manually edit all settings for each operand in each Condition block and 2) selecting group of blocks over and over again is not the best idea.

                  Well, it's very similar when using indicators. If I want to use the same indicator in multiple Condition blocks, I will select it over and over again in the blocks, then MetaTrader knows how to reuse it.

                  If you have some ideas, what will be the best way to do this...

                  1 Reply Last reply Reply Quote 0
                  • H
                    holygrailfx last edited by

                    Ok

                    The color coding sounds nice, visual probably easier to understand. But the current numeric is easy enough, especially if changing to colors is creating a lot work for you
                    Once you understand it, it works you know

                    Same for the changing "for each trade " type blocks
                    I prefer to et it up once instead of having to do it over and over again
                    It is actually quite logical, you select the trades you wnat to work with and then you apply all kind actions after it

                    I was just thinking that
                    if I have some variables like : number of buy orders open, total amount of buy lots open
                    you might even add them under account trade statistics, no need to create another block
                    just an idea, dont know if I make sense

                    1 Reply Last reply Reply Quote 0
                    • H
                      holygrailfx last edited by

                      I have been trying to create the LotsCounter using your suggested variable method
                      I cant seem to figure it out
                      It just keeps on counting, so the total amount of Lots just keeps going up

                      Some help please?

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

                        What if you reset the value somewhere (before counting)?

                        1 Reply Last reply Reply Quote 0
                        • H
                          holygrailfx last edited by

                          Tried that, but it keeps counting and counting
                          sorry

                          1 Reply Last reply Reply Quote 0
                          • H
                            holygrailfx last edited by

                            In case you want to ahve alook
                            https://fxdreema.com/shared/wevpLlGdc

                            1 Reply Last reply Reply Quote 0
                            • H
                              holygrailfx last edited by

                              NO even the counter for number of orders has stopped working

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

                                Just put 0 here: http://prntscr.com/88w5vs

                                This block "Counter: Reset" does something completely different and it does not work with Variables.

                                1 Reply Last reply Reply Quote 0
                                • H
                                  holygrailfx last edited by

                                  Thanks
                                  That works perfectly
                                  I also Made one that counts the orders 😉

                                  Cheers

                                  1 Reply Last reply Reply Quote 0
                                  • l'andorrà
                                    l'andorrà @Slashes last edited by

                                    @Slashes Then you will ned two different variables, one for buys and another one for sells.

                                    (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                                    (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                                    (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      Byens last edited by

                                      can you please reshare this project?

                                      https://entrepreneurstart.pw | https://www.mql5.com/en/users/byens8199

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

                                      Online Users

                                      X
                                      J
                                      A
                                      N
                                      S
                                      E
                                      A
                                      M
                                      T
                                      M

                                      20
                                      Online

                                      146.7k
                                      Users

                                      22.4k
                                      Topics

                                      122.6k
                                      Posts

                                      Powered by NodeBB Forums | Contributors