fxDreema

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

    Updating loop criteria as the loop happens

    Questions & Answers
    4
    5
    2085
    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.
    • X
      Xander last edited by

      Hi Guys

      So basic idea is I have a set of three conditions applied to candles 0, 1, and 2. If the conditions fail I want the conditions to run again but "shifted" one back (ie use candles 1, 2 and 3) and so on until all conditions pass. I really have no clue where to start on this one so would appreciate any suggestions.

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

        Also interested but really have no idea

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

          This might be a starting point (not tested)

          0_1541093850238_d162d32d-d299-49de-a9c1-70eb64cb0a9c-image.png

          If the 3 conditions are not met at the same time, false output of block 4 passes and the Candle IDs are incresed by one. The conditions Will be evaluated again for the next tick or bar but with the increased candle IDs.

          1 Reply Last reply Reply Quote 0
          • X
            Xander last edited by

            Thanks that does work. Just one question. In the below example the loop works perfectly and keeps drawing lines lets say 10 days back. When I add the condition for a bull/bear day(using either condition blocks or bull blocks) it stops working and only passes block 26 going forward. Not sure why?
            0_1542021419876_5399f742-d7d5-4169-9af0-08c3250d0592-image.png

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

              Do you reset Candle ID to 0 before the loop starts?

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

              Online Users

              P
              C
              J
              V
              G
              E
              H
              C

              20
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors