@sssorsss I assume you want the buy to open at the point where the EMA5 crosses above both the EMA10 and the EMA 20, and to close the buy when the EMA5 crosses below both the EMA10 and EMA20? I can't think what else you could mean.
If my understanding is correct, I have built a project last night that opens and closes on those conditions.