I had a little bit of a brainstorm and found a solution using fillmissing, although it is slower. Basically, you create two vectors, A = 1 when Torque>6, and B = 1 When Torque > 4. The final vector is initialized with NaN, and wherever A = B, set final vector is the same value, but will remain NaN anywhere else. use fillmissing with 'previous' method and it works fine. But is slow.
In my application, the For loop is 0.004 seconds, but the fill missing is 0.074s. This function will be run 100,000's of times doing some optimization, so that's why it needs to be as fast as possible.