fxDreema

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

    How to controle Trade and Pendings?

    Questions & Answers
    2
    3
    1039
    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.
    • D
      Dieter last edited by

      I have this problem: to get a signal, if the first order (market order) will be closed by the take profit from the blocks sell- or buy now.

      A trade Start with a fix take profit. In the same time starting two peending orders.
      The trade will be closed by take profit. So, I need a signal to close the two pending orders.

      Can you give an example to controle this??? ❓

      regards,
      Dieter

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

        Two ways to do that. One way is in "on Tick" to ask for "No trade is running" and then "Delete pending orders", if the strategy can work like this of course. And another way is in "on Trade" to wait for event "(on trade) Trade closed" and then again "Delete pending orders", and this method is similar to the first one because in order to detect that event somewhere in the code there is something that checks for new events on every tick. The first method will be faster in backtest I think.

        1 Reply Last reply Reply Quote 0
        • D
          Dieter last edited by

          Thank you,

          the first methode withe the good backtest time seems to be the best. 🙂

          Good Work!

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

          Online Users

          L
          A
          S

          11
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors