fxDreema

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

    Closing Pending Orders after 'N' bars

    Questions & Answers
    2
    5
    1031
    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.
    • K
      kketzal last edited by

      Hi, there!

      I was thinking about how to close pending orders (order not open yet, only pending orders waiting price level hits the open price) after 'n' bars...in his current timeframe and current pair...
      it's possible?? I want to close pending orders if they aren't open after 'n' bars or candles...

      Thanks in advance.

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

        What about setting expiration time?
        http://prntscr.com/3si4l8

        1 Reply Last reply Reply Quote 0
        • K
          kketzal last edited by

          Yes, I saw it. But, how it works??
          I need to know exact time??? (e.g: close pending order at 22:30:00)
          Or can I use N minutes or N hours to close pending order?? (e.g: close pending order at 115 minutes from open time).

          I want to close pending orders after N candles, e.g:

          TIMEFRAME: 15M
          Number of candles to close pending order: 5 candles

          15 minutes X 5 candles = 75 minutes...

          Can I set 75 minutes in the specified field in my pending orders??
          Or I need to calculate the exact closing clock time?? e.g:

          pending order put on the chart at 13:30:00 GMT + 75 minutes = 14:45:00 GMT....

          Thanks in advance.

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

            Yes, it works with 75 minutes.
            I wasn't added options to calculate the expiration based on candles and it's not it can't be added, but it can be done now as well, just place this value in Minutes: http://prntscr.com/3sp8dn
            Period() is some native function that returns the current period as minutes (http://docs.mql4.com/chart_operations/periodwindow)

            1 Reply Last reply Reply Quote 0
            • K
              kketzal last edited by

              Ok!

              Thank you so much! 🙂

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

              Online Users

              F
              H
              M
              H
              A

              14
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors