fxDreema

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

    Trade Close event

    Questions & Answers
    3
    6
    1958
    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.
    • B
      BlueMoon last edited by

      I want to create a "Pending Order" exactly whatever the "Trade close" happened.
      What is the best way to do this?

      Example:
      If my trade is closed due to Take Profit. I want to create a new Pending Order at the exact same price just like the trade that was closed.

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

        It depends.

        • Under "on Trade" - you can detect the event when a trade is closed and then create a new order using the same parameters of the already closed trade. But for this to work you need the EA to be working. If for some reason the EA does not work when the trade closes, that event would not be detected and nothing will happen.

        • Under "on Tick". Here you can check the count of the trades (on every tick). And when the count is let's say 0 (you can use "No trade" for example) you can open new pending order. Play with this example: http://fxdreema.com/shared/mFkUb3omd It's probably not exactly what you want, but I'm only giving you for ideas.

        1 Reply Last reply Reply Quote 0
        • B
          BlueMoon last edited by

          I got that part about using the "Trade Close" event. What I need help with is to get the parameters of the closed trade so I can use the same for opening new Pending Order.
          For now..I need the the following parameters of the trade that just closed and open Pending Order with the exact same:

          1. Open Price
          2. Lot Size
          3. Buy or Sell
          4. Take Profit
          1 Reply Last reply Reply Quote 0
          • B
            BlueMoon last edited by

            I was able to figure out everything I need with exception of the "Lot Size" I really need to find out what was the lot size of my last closed trade.

            Please help me

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

              this find for you last closed trade lot size:

              0_1491500023207_upload-fe42e09f-8250-4d43-a224-38e534a72d56

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

              1 Reply Last reply Reply Quote 0
              • B
                BlueMoon last edited by

                Oh! Not sure how I could not see that! Thanks.

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

                Online Users

                A
                A
                F
                E
                A

                9
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors