Referring another script value

How do I refer events of another script in my algo?
Example : I am writing algo for buying/selling SBI using its technicals but would like to add dependency e.g. if nifty is above certain value. How do I code this?

Admin, Pl close this post as I have opened similar under streak algo category