fxDreema

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

    pending order open price

    Questions & Answers
    2
    5
    1508
    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.
    • S
      santony last edited by

      Hello,
      I want to set a pending order's open price to be at a given X percentage above or bellow current price, instead of setting a specific amount of pips as price offset.
      For example, if current price is 1.1000 and X=2, I want to be able to place a pending order's open price at
      1.1000+(0.02*1.1000)= 1.1220.
      Thanks in advance for your time.

      M 1 Reply Last reply Reply Quote 0
      • M
        moreirajbn @santony last edited by moreirajbn

        @santony

        See image below.. in the example, a buy limit order will be place 1% below the market (see the "Adjust" field, where it says *(0.99), that means current market price minus 1%).. then you can create a constant with the value you want and choose how far, in %, the order will be from current market price.

        0_1547487816980_Screenshot 2019-01-14 at 15.43.16.png

        1 Reply Last reply Reply Quote 0
        • S
          santony last edited by santony

          @moreirajbn
          Thank you very much for the answer mate. However I do not understand why do I need to create the constant. In order to be able to change the value more easily?

          M 1 Reply Last reply Reply Quote 0
          • M
            moreirajbn @santony last edited by

            @santony

            If you already have a percentage you will use forever (let's say 1%), then you can just use 0.99 (1% below market) or 1.01 (1% above market) in the Adjust field. However, if you want to optimize it or plan to change it in the future, it will be much more convenient if you have a constant you can change without the need of changing the source code.

            Your choice !

            Cheers.

            1 Reply Last reply Reply Quote 0
            • S
              santony last edited by

              @moreirajbn
              thanks again for the clarification. gonna test it soon.

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

              Online Users

              C
              E
              K
              M
              D

              11
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors