EA in Strategy Tester does not follow entry rules

 

Hello guys,

I think im a bit confused of the result that my ea is giving me in the strategy tester. I have wrote specific entry rules in my EA so that:

Buy when : rsi[0]>=50, +di[1]>-di[1], 0bv[0[>obv[1]>obv[2].

Although I know those conditions are met at least 5 times a week, the ea sometimes open buy orders when +di<-di or the obv0<obv1>obv2.

I get a few different cases where the ea does not follow the entry rules but does follow the exit rules, SL AND TP.

May somebody suggest how is that possible and what I may have done wrong?

I've checked countless time my ea and I am not able to spot the mistakes.

Any support would be highly appreciated.

 
DWriter:

Hello guys,

I think im a bit confused of the result that my ea is giving me in the strategy tester. I have wrote specific entry rules in my EA so that:

Buy when : rsi[0]>=50, +di[1]>-di[1], 0bv[0[>obv[1]>obv[2].

Although I know those conditions are met at least 5 times a week, the ea sometimes open buy orders when +di<-di or the obv0<obv1>obv2.

I get a few different cases where the ea does not follow the entry rules but does follow the exit rules, SL AND TP.

May somebody suggest how is that possible and what I may have done wrong?

I've checked countless time my ea and I am not able to spot the mistakes.

Any support would be highly appreciated.

Paste the relevant code