Scanner in Pi is not working properly?

I wanted to make code for close crossing up/below Bollinger Band MA. for which i tried this code with 4 scrips. Bankbaroda, bhel, tatasteel & ongc.


it gave me wrong signal (in case of BHEL & TATASTEEL) even though CLOSE was not  anywhere near BBM. 

Is my code OK for what I am trying to find. in fact i wanted to code for crossover of CLOSE up/below BBM. but the script is showing error. Even the script(not crossover but Bollinger Band Strategy) as it is taken from EA is also showing error. Why it is so?

you have referred middle line of the bolinger band, BBM and given > symbol as it says if close is greater than BBM

​verify your condition

You can write to [email protected] as I believe you missed on the point how to read the scanner.

but close was not above BBM, why got a signal?

signal will generate only if the pattern matches… backtest once again with some other script and check results…if still persist you can write email to [email protected]