I could be wrong, but it doesn't look like the coding is correct as per the examples given.
On this chart, there is only 1 instance of the open being below the close - circled.
The others are the opposite of the examples, e.g. The open is not above the close for the short signals - highlighted in yellow.
Bars that meet the conditions do not have signals - highlighted in green.