fxDreema

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

    Pending orders query

    Questions & Answers
    2
    7
    1284
    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.
    • H
      hugo08642 last edited by

      Hi everyone,

      Firstly thanks for your help. My problem is I have created an EA that uses the buy pending orders in grid function. The idea is to buy or sell 5 pending orders with given grid size and S/L & T/P. I have 2 problems listed below.

      1.
      The EA seems to work fine when just on a chart on its own; however, I have numerous EA's on different charts - All the EA's are the same, but with different magic numbers for each chart and are on a virtual private server.

      The problem is, when a pending order action becomes executable it may only action 1 or 2 pending orders in the incorrect order, instead of the 5 desired. I have also, classified each line into their own group numbers.

      2
      Lastly, one other problem I have with this is deleting the pending orders if the price moves too far away from the open price. This doesn't seem to be working for me at all.

      What I was aiming for was to have all pending orders deleted if the price moved too far away from the open price. For example, the buy pending orders are opened and if the price moved away from the open price (buy my usual S/L distance) the pending orders would be deleted.

      It doesn't matter what I seem to do, I cant crack this one.

      Below is an example of what I have created:

      1

      0_1528938272847_91a3adae-b511-4e81-aca4-073e4b7fd179-image.png

      There are 14 different scenarios per EA, all with different group numbers. There are 33 different EA's, all with different magic numbers, and each on a different currency.

      2

      0_1528938485646_3bc7fe5f-ca61-4a8a-a899-32006397fd87-image.png

      As the pending orders are placed 40 pips away from the open price, I want the pending orders to close if it moves a further 40 pips away - so 80 pips in total.

      Any help with this would be greatly appreciated.

      1 Reply Last reply Reply Quote 0
      • H
        hugo08642 last edited by

        I should add, that sometimes the pending orders work, and sometimes they don't. I woke up this morning to find a jumbled mess. Deleted the errors, then some orders came through perfectly.

        1 Reply Last reply Reply Quote 0
        • H
          hugo08642 last edited by

          Also, the pending orders will not always delete on a winning trade.

          Any thoughts?

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

            If each EA works on a different Symbol, you can work with the same magic number, no problems.

            So, the problem is that "Buy pending orders in grid" is set to create 5 pending orders, but it doesn't? In this case, do you see some error messages? For the deletion my question is the same - do you have error messages or it seems that some block doesn't work at all or it does something, but not all?

            1 Reply Last reply Reply Quote 0
            • H
              hugo08642 last edited by

              Hi,

              Thanks for the response and sorry for my delayed answer. I was able to run one this morning and have the following information:

              0_1530491023363_79da05cd-12b3-490d-a9f9-062d19eae650-image.png

              0_1530491075348_b84fd6f0-4a84-4176-a5fe-626b687f4e66-image.png

              0_1530491225925_69cf0fd9-554b-49cd-b933-e275b605ece1-image.png

              I even tried to change the order of each pending order to once each x amounts of ticks to try and create some space between the orders.

              1 Reply Last reply Reply Quote 0
              • H
                hugo08642 last edited by

                I have slippage set to 0, could that be the problem?

                H 1 Reply Last reply Reply Quote 0
                • H
                  hugo08642 @hugo08642 last edited by

                  @hugo08642

                  This is not the problem

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

                  Online Users

                  E
                  V

                  12
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors