above 20 ema and next breaks previous high

Need help implement bullish crossover strategy in zerodha streak

When any green candle (DC) crosses 20 EMA, note high of the DC and low of DC. If next candle breaches high of DC - ENTER trade, mark low of DC as STOPLOSS.
exit on high of the following candle (DC+1) after close

@Streak can you help.

@hebbalhrk

You can write

Entry:
Close(0) higher than High(-1)
Close(-1) crosses above EMA(20,-1)

Exit:
Close(0) lower than Signal Candle (Low, -1)