fxDreema

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

    2 Conditions separeted by time

    Questions & Answers
    2
    5
    704
    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.
    • L
      Luquefer last edited by

      Hello.

      I have some difficulty establishing 2 conditions separated by time (not simultanously).

      No trade is running > Condition 1 > if yes then wait for Condition 2 > if yes Buy now

      If I directly connect Condition 1 to Condition 2 it interprets that the 2 conditions must be fulfilled at the same time but that is not what I want.

      Thanks

      1 Reply Last reply Reply Quote 0
      • L
        Luquefer last edited by

        One possibility is the following logic:

        No trade is running > Condition 1 > if yes Buy or Sell Pending Orden (Custom/Indicator including Condition 2)

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

          There are 2 ways to do that.

          1. To check for the second condition and when it is true, to check for the first condition back in the time. Candle ID is available, so we can check any candle or indicator value in the past. Of course, this method can be only used when the time between both conditions is fixed, because candles are fixed.
          2. When the first condition becomes true to remember that (in a variable). Then, also on every tick checking the second condition if the variable is set to true.
          1 Reply Last reply Reply Quote 0
          • fxDreema
            fxDreema last edited by

            Many people think that conditions follow one after another in the way you are talking about and they are connecting blocks one after another like each block is a step. This way is more limited, but I was thinking that I can add some workfield where the blocks will work like this. But if there are 2 chains of blocks, then maybe unexpected things can happen

            1 Reply Last reply Reply Quote 0
            • L
              Luquefer last edited by

              Thanks for the ideas. I will test them.

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

              Online Users

              C
              H
              S
              N
              M
              R
              F
              S
              T
              M
              P
              L

              20
              Online

              146.9k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors