fxDreema

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

    Condition with unknowable candle ID

    Questions & Answers
    2
    9
    1548
    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.
    • K
      keyquest last edited by

      I have a question about creating a condition when there is no way of knowing its Candle ID. It could have happened one, two, three, or more bars earlier from a second condition that creates the buy signal.

      For example, I would like to buy when RSI reaches 40. But I want it to have previously been under RSI 30. How can I set this up if I do not know the exact candle ID when it rose to RSI 30 (at the time I want to buy)? Please see attached image.

      ......
      Rsi.jpg

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

        The only block who can probably do that is this one: Indicator moves within limits http://prntscr.com/8e7qt4

        1 Reply Last reply Reply Quote 0
        • K
          keyquest last edited by

          Thank you. It almost works, but it's not ordering at the correct time. I believe it may be because of the field 'with exception of few candles'. What does this field mean? I originally believed this meant that if you went back 12 periods then at least 1 period would require the indicator to move within the limit, with 11 being the maximum exceptions.

          Can I use this block like this...?

          12 periods - 11 possible exceptions = 1 required within the limit

          ......
          Indicator moves within limits.JPG

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

            This value was requested from another member before. It means that for X candles, the value is allowed to be out of the range. This value should be lower than the period or most often 0.

            1 Reply Last reply Reply Quote 0
            • K
              keyquest last edited by

              The problem Iโ€™m having with this block is I believe itโ€™s programmed to require the oldest candle to be within the range. If my settings are for 12 periods and 11 exceptions, then the block will not pass until 12 periods have expired, but itโ€™s requiring the oldest period to be within the range. This means that any of the future candles after candle 12 can be the exceptions, but not candle 12.

              This creates the problem of having to wait 11 candles before the block passes. Is this true and if so, can it be programmed so that any of the 12 periods can be the exceptions?

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

                It does not wait for 11 candles, it loops in the oldest candles that currently exists. But I think you want to find that minimum value which is located somewhere in between the current value and the same value found somewhere in the past. For this task I think that I have no block, but if I think more about it and find some good name for this functionality, I can probably make some block.

                1 Reply Last reply Reply Quote 0
                • K
                  keyquest last edited by

                  Thank you for your reply. BTW, thanks for your great work here also ๐Ÿ˜„

                  I made a test project. Would you mind checking it out? https://fxdreema.com/shared/IvaSKj68

                  In strategy tester, I looked at dates 06/22/15 to 06/30/15 for EUR/USD. This will create one result. RSI (14), 4 hour, typical price.

                  Shouldn't the block pass as soon as an indicator's period is within range, which happens at 6/23/15 12:00? But this doesn't pass until 12 candles later at 6/25/15 08:00.

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

                    I think you are right. In the code I was counting the number of exceptions that happened, and only when their number is as specified (11) it passed. But it should be the opposite - to count the difference between 12 and 11 and wait for only 1 positive condition.

                    Try it now.

                    1 Reply Last reply Reply Quote 0
                    • K
                      keyquest last edited by

                      Great! Thank you so much for looking into this. ๐Ÿ˜›

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

                      Online Users

                      A
                      A
                      F
                      E
                      A

                      16
                      Online

                      146.7k
                      Users

                      22.4k
                      Topics

                      122.6k
                      Posts

                      Powered by NodeBB Forums | Contributors