Markets move both up or down under different circumstances. Thus, two setups are shown.
One is good positioning and the other is a breakout play.
Note that you should not be buying if the price just gets hit but doesn't follow other breakout properties. It needs to be fast and strong. (Lacking wicks, full candle, etc.)