fxDreema

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

    On every new position, place pending order in opposite direction with double volume

    Questions & Answers
    2
    6
    1190
    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.
    • A
      allprado last edited by allprado

      Can anyone help on how to, as soon as a new position is open, place a pending order, at a certain distance, in opposite direction, with double volume? I managed to work around all steps, excep how to double the volume!

      1 Reply Last reply Reply Quote 0
      • M
        miro1360 last edited by

        volume from previous opened trade save into variable for further use ... you can easily do math on variables

        Between trading and gambling is a very small gap, be careful.

        A 1 Reply Last reply Reply Quote 0
        • A
          allprado @miro1360 last edited by

          @miro1360 Thanks Miro, but how to get previous trade volume into a variable? Sorry if it´s obvious, but I didn´t figure out.

          1 Reply Last reply Reply Quote 0
          • M
            miro1360 last edited by

            0_1522497783563_62dd4034-181e-4dfb-8843-a5fe32d0ef05-image.png

            Between trading and gambling is a very small gap, be careful.

            A 1 Reply Last reply Reply Quote 0
            • A
              allprado @miro1360 last edited by

              @miro1360 Great! Thanks a lot! Just one more issue: The block keeps increasing lots every new tick (instead of just one time per trade). I tried "once per positions" block, but it in fact prevented the block to run. Also tried pasting into "on trade" tab, but it crashes like this:

              "2018.03.31 12:44:33.412 Core 1 2018.01.02 09:30:40 array out of range in '11323-21957.mq5' (6999,10)
              2018.03.31 12:44:33.412 Core 1 OnTrade critical error"

              Any last clue to get the block to run just once for every new trade?

              1 Reply Last reply Reply Quote 0
              • M
                miro1360 last edited by

                0_1522541639292_5c09ae0f-1778-4f06-bdea-dfa27fec2979-image.png

                Between trading and gambling is a very small gap, be careful.

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

                Online Users

                R
                P
                S
                L
                M
                F

                12
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors