Pi Scripted Alert Issue

Hi, I am facing some issues with the scripted alerts in Zerodha Pi. I have put in two conditions with (AND operator. Does it alert when both the conditions are met in the same candle or can the conditions be met in different candles? The issue I faced was that second condition was met in the 6th candle from the candle in which the first conditions was met. Since both conditions are met in the 6th candle should it generate an alert? Also I have not selected the option to alert at the end of the candle so I presume that is should be alerting as soon as the condition is met? Please can someone advice what could be wrong?

Also I have noticed that the expert advisor has not generated an alert when the condition was met however when I run expert advisor that alert shows up.