10EMA strategy conditions

I need your help in formulating the strategy
10EMA strategy
For buy

  1. Entry condition: The previous candle should be above 10ema (should not be touching 10ema line) and should be red. The current candle should be green and entry triggers when the close crosses the high of the previous red candle.
  2. Exit: SL is the 10ema line or 5000rs (whichever is smaller)

@Market_Monarchs Check out the below image to learn how to create the conditions: