fxDreema

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

    How to check through indicator values for a number of candle

    Questions & Answers
    2
    3
    549
    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.
    • U
      uchiha last edited by

      Hello

      This isn't a question, I just spent hours trying to solve this and I thought its best to share such examples, maybe you could expand your example list to include such, (it'll be a great reference).

      https://fxdreema.com/shared/LVzW0BxUd

      This loops through two buffers of an indicator for a chosen number of previous candles, subtracts the buffer values and returns the absolute result, the result is then checked on every new bar and if it satisfies the defined condition it passes on to the next blocks.

      Cheers.

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

        I don't really recommend creating such loops in fxDreema, mostly because they can't be stopped and they are heavier than the native code. Also, normally indicators does not need this, because they contain loop and calculations, they should give you what you want directly. But sometimes someone wants to extend them a little bit, there is a block named "Indicator moves within limits" for some specific scenario. But again, it's best if the indicator itself is giving the value that is needed

        1 Reply Last reply Reply Quote 0
        • U
          uchiha last edited by

          You're right, but you see while its possible to use [indicator moves within limits] to check the previous candle or any other candle, its impossible to use it to check 10 or 20 previous candles at the same time on every new bar...that's why I had to create the loop.

          Thanks for the warning though 🙂

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

          Online Users

          G
          H
          H

          10
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors