Look in the manual under "adviseLong" about how to use the FAST flag for candle patterns. Generally, make the manual "Search" function your friend - all the issues that you have are easily solved by finding the right place in the manual.

For converting the script to 1-hour bars, some more things have to be considered besides just changing the bar period. You can find a script version for 1-hour bars on the Financial Hacker page, under "Better tests with oversampling".