How to check through indicator values for a number of candle
-
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.
-
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
-
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
