I see some problems with this approach. At first, your 24-bar frame is not aligned to a trading day, which makes the patterns more random and unpredictive. There's an example on the "BarPeriod" page how to align a time frame to midnight.
Second, you're using an additional valley condition for entering a trade. It is probably rare that a profitable pattern and a valley occur at the same time. When you use pattern detection anyway, you could include the LTF_Trend of the last 3 bars as a separate pattern.