Finding a particular strike price & Tracking its price

Want to achieve following:
First, find out nearest 50 ATM strike relating to Open of Nifty 50 Spot.
Then, track price of that particular ATM strike PE & CE and take position only when LTP goes above certain % of their Open prices.
All is intra-day only.
Example:
Nifty 50 Spot opens @ 17232. So first, want to fix ATM strike at 17250 (nearest 50).
Then find out Open price of this ATM PE and CE strike. Say, its 100 Rs & 120 Rs respectively.
Want to take Buy position If & only when price of this ATM PE or CE goes above, say, 10% of Open. i.e. if & only when 17250 PE is > 110 Rs, Buy or if & only when 17250 CE is > 132 Rs, Buy.

Can someone help in this?

I am also looing the same.