fxDreema

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

    saving lot size in variable

    Questions & Answers
    3
    12
    3698
    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.
    • J
      Jennifer last edited by

      how can I save the previously opened trade's lot size in a variable

      ===>Jennifer Syn<===

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

        Try this function: PositionGetDouble(POSITION_VOLUME)

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        1 Reply Last reply Reply Quote 0
        • J
          Jennifer last edited by

          is this the fxdreema block , or do i have to manually code it?

          ===>Jennifer Syn<===

          roar 1 Reply Last reply Reply Quote 0
          • roar
            roar @Jennifer last edited by

            @jennifer
            You can put custom code pretty much everywhere in fxdreema, like this for example
            0_1550075949968_11d95549-b5ad-4c54-9613-50b06213360d-image.png

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

            J 2 Replies Last reply Reply Quote 1
            • J
              Jennifer @roar last edited by

              @roar
              O.M.G seriously??????
              i never knew
              man if i had known this before i didn't have wasted so much time.
              anyways thanks
              i will try this and keep you posted
              thanks again

              ===>Jennifer Syn<===

              1 Reply Last reply Reply Quote 0
              • J
                Jennifer @roar last edited by

                @roar
                tried that but here is what happened
                0_1550078885335_ssfd.png

                ===>Jennifer Syn<===

                roar 1 Reply Last reply Reply Quote 0
                • roar
                  roar @Jennifer last edited by roar

                  @jennifer
                  Oh, sorry, it seems that function is only MQL5... I don't know if there is an MQL4 equivalent

                  Need small help? Tag me in your post
                  Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    Jennifer @roar last edited by

                    @roar
                    😭😭😭😭😭
                    Is there any other way to do it in mql4

                    ===>Jennifer Syn<===

                    roar 1 Reply Last reply Reply Quote 0
                    • roar
                      roar @Jennifer last edited by

                      @jennifer
                      I guess "OrderLots()" works. You need to first tell the EA which order you mean, hence the "for each trade"
                      0_1550082144242_2934ce5e-1d9b-41d3-beec-7df6ad41a3cf-image.png

                      https://docs.mql4.com/trading/orderlots

                      Need small help? Tag me in your post
                      Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                      J 2 Replies Last reply Reply Quote 0
                      • J
                        Jennifer @roar last edited by

                        @roar
                        Thanks, I will try it later and update the post. ☺️

                        ===>Jennifer Syn<===

                        1 Reply Last reply Reply Quote 0
                        • J
                          Jennifer @roar last edited by Jennifer

                          @roar said in saving lot size in variable:

                          OrderLots()

                          it worked perfectly , thank you very much

                          ===>Jennifer Syn<===

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

                            Also instead of Numeric -> Value -> OrderLots() you can use that:
                            0_1550590185923_354073aa-23e8-4204-a04c-ec7cf70091b1-image.png

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

                            Online Users

                            J
                            B
                            M
                            B
                            T

                            18
                            Online

                            146.7k
                            Users

                            22.4k
                            Topics

                            122.6k
                            Posts

                            Powered by NodeBB Forums | Contributors