Check if more conditions are true in the last "n" bars
-
Is possible to check if more contitions are true in a period of "n" bars?
It could be very useful to check and automate patterns using indicators.
-
Initially, yes it is. But it will also depend on the conditions you are looking for. Could you be a bit more concrete, please?
-
First of all thanks for your answer.
I have a custom indicator. This indicator has a Red Buffer if volatility increase and a blue buffer when volatility decrease under a certain level.In order to have a good entry pattern I need to check if initially, I have this Red Buffer and then the second blue buffer within a certain "n" of bars.
-
Did you check the indicator works correctly in fxDreema? Maybe the buffers are not correctly identified. Can you please share yor project?
-
https://fxdreema.com/shared/fGD1mD4Cd
This is the project actually. The indicator is red correctly by FXdreema I tested the buffers with "Status" one by one. I just want isolate those true events in "n" bars.
-
@fenixtrading There are no variables inserted into blocks 'Pelican_AutocloseBuy' and 'Pelican_AutocloseSell'.
-
@l-andorrà i know that, i don't know what should i do in order to archive my goal.
-
You can use an effective but inefficent way. Create a bool variable and evry time the condition is met move it to 'true'. Then create another variable counting candles once per bar'. If the boolean condition is true before the maximum 'n' bars is reached, you got it.