After Crossover EMA passing through the green candle

I have a EMA 10 and EMA 20 strategy where I have to find a suitable entry position after the crossover happens.

  • EMA line should pass/touch the green candle after crossover not necessarily immediately after the crossover.

I am finding some difficulty in implementing the logic in Tradetron as I cannot check the condition after the crossover because the limitation is that if crossover happens as some position then I cannot determine at which position the EMA passes through the Green candle whether it is -3, -2, -1 or 0th candle. Please help me find solution of this if anyone had gone through this.