Hello ,
I have made a basic scanner which simple checks whether an inside bar has formed on 15 min candle which just closed. But sometimes, it is giving me false alerts.
Eg the screenshots below, why did i get this alert on BharatFin when the inside bar was formed 2 bars back and not the immediately closed bar. Kindly see the last 3 bars , the alert was provided to me based on 3 bar from last when it should be provided based on 2nd bar from last. Please see the code as well as chart and please help me understand what am I doing or interpreting wrong??