|
IF summation[5](close > open) = 5 THEN ... |
Of course you might want to change the value 5 with one that best suits you.
Also, you my assign the result to a variable.
Should you need to check that the green candles need not be consecutive, i.e. 6 out of the last ten:
|
IF summation[10](close > open) = 6 THEN ... |
To adapt it to red candles you just need to replace “close > open” with “open > close”.
Roberto
1 user thanked author for this post.