Hello everyone,
I am testing my latest EA and everything works perfectly, except for the crossing signals with the Tekasen (ichimoku)
Conditions:
Open Buy:

Close Buy:

All conditions work correctly, except for crossings:
Buy Order: When candle 1 is bullish, and crosses the tekasen upwards
Close Buy: When candle 1 is bearish, and crosses the tekasen down
The problem is that it is not correctly detecting the crossings:
Real example of what happens:
1º This is a buy operation, the candle does not cross the tekasen but the operation enters.
2º This closing takes place after the bearish candle 1 crosses the tekasen downwards.
The tekasen is the red line

In short, I would like to know, if there is any way to confirm that the crossing is done correctly, since we cross the crosses with candle 1, I understand that it could give problems working on candle 0, but this is not the case .
The only question that occurs to me is that the signal is correct, and that later, we see the tekan in a different position, than at the time it occurs, and this leads us to make wrong conclusions.
Maybe you can give me some idea and how to solve it, if there is something to solve.
Thank you all!