fxDreema

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

    Check if pending order exists at current price

    Questions & Answers
    2
    6
    1825
    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.
    • U
      uchiha last edited by

      Hello

      I want a pending order grid to be opened after certain conditions are met, but only if there are no pending orders at the price where the conditions are valid (i.e current price), any idea? 🙂

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

        I think the question is How to detect if we have a pending order near the current price. I got this question few times before and I did nothing about it, but I think that there can be some better way to do what you want. Actually it's not impossible to detect if such order exists by using "For each Pending Order", some pink block and maybe 1 variable, but this also means more calculations. Can you give some more information about what needs to be done, why is the current price important?

        If you just want to buy above the highest order or sell below the lowest, then only checking the open price of the latest order is enough.

        1 Reply Last reply Reply Quote 0
        • U
          uchiha last edited by

          Okay let me see if I can explain this,

          I have a self updating grid EA.
          It places pending orders as price moves up and down based on a range of pips (example: every 20pips).

          Now initially, say it places a grid of buy pending orders, at 1.000, 1.005 and 1.010 [1st level] and price goes higher by (20 pips),
          it will place another gird of buy pending orders, if price should then go back (lower) by (20pips), it is back to the first level,
          and it will place another set of pending orders at 1.000,1.005 and 1.010.

          I do not want that, since there are pending orders there already, I want the EA to skip placing pending orders there again.

          I hope its clear 🙂

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

            Wait a second, if you are now at price X and you place a new pending order at price X+1, when you reach price X+2 this pending order will not be pending order anymore, it will be turned into a running trade 😮

            1 Reply Last reply Reply Quote 0
            • U
              uchiha last edited by

              Ah yes, I forgot that detail, still the same, I wouldn't want another set of pending orders put there, unless no trades/pending orders is running at those prices.

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

                I added 2 blocks - No trade nearby and No pending order nearby

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

                Online Users

                V
                E

                6
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors