Okay, I had faced simillar problem few weeks back, where I had everything correct, and had used this utility for past 2 months, and then it stopped working suddenly..
I debugged the code and have optimized few lines, Now it worked for me.. I am sharing the same file here, Please try this and let me know.
https://docs.google.com/file/d/0BzEP8NL1S-irZEVSa2Y0LUtISXc/edit?usp=sharing
Since I am trading only with Nifty I have modified it for max 5 scrips to give better performance..
@Josh brother, please have look on the modified code and suggest..
Regards
Taiki