There are a few issues with the current code that you've provided.
First, in the buy and sell conditions, you are using the or operator when checking for crossovers. This means that the buy and sell conditions will be met if either of the moving averages cross the close price, not if both cross.
Second, in the exit buy and exit sell conditions, you are checking if the low or high of the candle is below or above both of the moving averages, respectively. However, you specified that the exit conditions should be met if the candle breaks either the high or low of both the EMA's. So the code should check if the low is below both the EMA's or if the high is above both the EMA's.
there are 2 more issues, I can fix it within an hour. Please verify your payment method and accept my bid for a quick and robust solution.