I have a strategy that uses
if (Close[0]>Open[0]
&& Close[1]>Open[1])
as a condition.
I want to be able to add more lines of Close>Open to that logic for a longer lookback...in order to test which is the most effective number of consecutive rising bars. Potentially going all the way to e.g. [10].
I cant do it with an integer, as changing the lookback period to [3] is not equal to having three Open>Close in a row...as one implies a strong deviation...while the other one could simply be a small rise.
Can anyone tell me how I can do that?
Thanks.
Comment