fxDreema

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

    pending orders

    Questions & Answers
    3
    9
    3159
    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.
    • E
      elarafi last edited by

      hello can someone help me please, what i want to do is
      *1: open buy position and pending sell limit order with 10 pips difference on the same time
      *2: when the sell limit order is activated i want to put a buy stop order with 10 pips difference from the first pending order (sell limit ) please if anyone can help i'll be so thankful
      thank you

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

        what you tried to do for now? can you post example?

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

        1 Reply Last reply Reply Quote 1
        • E
          elarafi last edited by

          what i want to do is :
          -open a buy position at midnight 00:00
          and put a sell limit order with 10 pips difference.
          when the pending order is activated i want to put immediately a buy pending order one the same first buy position.

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

            maybe something like this:
            https://fxdreema.com/shared/vTHzS6uXb
            but you need modify it for your purposes ... and both section are used, on Tick and on Trade
            0_1492362594206_upload-3ff1215d-b632-47b3-ae38-078b12c3973a

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

            1 Reply Last reply Reply Quote 0
            • E
              elarafi last edited by elarafi

              You are the best Thank you so much i really appreciate it, just another question please.
              when the buy pending order position is activated, how can i add another sell pending order on the same price of the first sell pending order.
              i really appreciate your respond thank you so much.

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

                If a pending order is just deleted, I don't know how to then get it in MQL4. If a pending order is triggered (turned into a trade), then you can work with that trade.

                How to get data from the latest trade/order/history trade?
                It's good to understand what these blocks do: https://fxdreema.com/examples#Loop-(For each...)
                So, depending on what you need to load (trade, pending order, history trade), you would use one of these darker pink blocks whose name starts with "For each...". To only load 1 trade (or order, depending on the block), open the block and set the value of 1 in "Not more than n ...." parameter. You will find this parameters, it's somewhere at the bottom.

                Ok, so now we have that dark pink block that is supposed to load the latest one trade, order or whatever. Then what?

                • You can use any of the other light pink blocks, or...
                • Let's say you have "Condition" block. You have a category "(in loop) Trade/Order in Loop". Go to that category and select any of the things that will appear. Now you have values such as SL, TP, Open Price, Close price and everything that belongs to the loaded trade or order. But guess what - you can use these in any other block, not only in "Condition". For example, you can get the Open Price of that latest trade and use that Open Price to open pending order on it. Just navigate to Open Price, but in let's say "Buy pending order" block. Something like this: http://prntscr.com/eybpt2
                E 1 Reply Last reply Reply Quote 0
                • E
                  elarafi @fxDreema last edited by

                  @fxDreema thank you so much for your respond but i think that i didn't give you a good explication:
                  what i want to do is :
                  1:open a buy position at midnight 00:00
                  and put a sell limit order with 10 pips difference.
                  2:when the sell pending order is activated i want to put immediately a buy stop pending order one the same first buy position.
                  3 and the same process again when the buy pending position is activated i want to put immeiately another sell pending order on the same price of the first pending sell position
                  thank you so much for your respond i rally apreciat it

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

                    I always prefer to explain how things work in general 🙂

                    SL/TP of the trades is also important. And also what happens if that sell limit (in 2) for some reason is never reached... let's say that the price goes up

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

                      this was my reply, but it can crash, I have not tested it, no guarantee, it needs modifications:
                      https://fxdreema.com/shared/jltgTsAsd

                      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

                      A
                      F

                      9
                      Online

                      146.7k
                      Users

                      22.4k
                      Topics

                      122.6k
                      Posts

                      Powered by NodeBB Forums | Contributors