In a simple rule, just compare EMA(13) one candle ago to EMA(13) on current candle. If the one candle ago is less than current, it is moving up.
If you want to check a local minimum, you can check if the value 2 candles ago was higher than 1 candle ago, and the value 1 candle ago is lower than current.