fxDreema

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

    "Trailing Stop pending order" in two direction

    Questions & Answers
    2
    8
    1290
    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.
    • R
      re0306 last edited by

      .

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

        On every 5 minutes do this: For each Pending Order -> slide order

        But if there are multiple orders at different levels and you want to keep them at the same relative position from the current price, it will be more complicated.

        All "Trailing..." blocks are designed to move only in one direction. That's why they have the word "Trailing" in their names

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

          .

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

            excuse me radoslav
            I found that function in mt5 but not in mt4

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

              http://prntscr.com/bydy9z
              http://prntscr.com/bydyh0

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

                READ BELOW

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

                  .

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

                    "check age" works with OrderOpenTime(). There are only few available functions to get parameters of the orders - https://docs.mql4.com/trading OrderOpenTime() and OrderCloseTime() are two of the parameters, but there is nothing about the last modified time. In theory such time can be collected while the EA is working, but I prefer to work only with functions that would continue to work the same after the EA is restarted.

                    But I don't see why you need Modified time. Isn't your idea to move orders every X seconds? "Once per seconds"... I will suggest to put this block on top level. I don't exactly remember how this block worked, but I think that it doesn't work at exactly equal periods of time. If you want exactly 5 seconds, then you can work under "on Timer", but in this case you will not be able to backtest this functionality because "on Timer" doesn't work in the Tester.

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

                    Online Users

                    H
                    R
                    A

                    10
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors