fxDreema

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

    Problem getting pending order's Stop Loss price

    Questions & Answers
    4
    7
    1893
    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.
    • N
      nilsen last edited by nilsen

      I need to get the stop loss price from a pending order to use it to set the TP for an opened trade, but I can't get it using a "For each pending order" loop.
      I'm attaching a script with the blocks I'm using.
      What I'm doing wrong?
      Thanks.

      alt text
      https://fxdreema.com/shared/k0NVXEtEc

      1 Reply Last reply Reply Quote 0
      • J
        josecortesllobat last edited by

        Check this out

        0_1530825850949_99958dd9-0e75-4f94-8ee9-5e572984a421-image.png

        1 Reply Last reply Reply Quote 0
        • J
          josecortesllobat last edited by

          0_1530825910241_1fadb30c-2b47-4034-bf81-eb09b79dd104-image.png

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

            Hi josecortesllobat,

            Just curious. Why did you change that Group mode? I don't see the difference between your fisrt and second reply.

            J 1 Reply Last reply Reply Quote 0
            • N
              nilsen last edited by nilsen

              Thank you, it works perfectly. It's not a very elegant approach but it works fine.

              I think that it would be more adequate to have different kinds of loops for orders and trades to avoid this problem but I'm happy to see it can be done with some workarounds.

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

                What if you do:
                Buy pending order -> For each Pending Order (with Not more than... set to 1, so you really select only the latest pending order that was just created) -> Buy now (and for SL select Custom (price level) and the pink (in loop) stuff)

                1 Reply Last reply Reply Quote 0
                • J
                  josecortesllobat @isp00rt last edited by

                  @isp00rt

                  It was a mistake in the first picture. The second one is the right one.

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

                  Online Users

                  P
                  R
                  A
                  D
                  A

                  16
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors