What would be the code, whereby if nifty reaches 8300 that 8200 put option is purchased at market rate

What would be the code, whereby if nifty reaches 8300 that 8200 put option is purchased at market rate .So that i can put in the artificial intellegence script .

Arathi, using tradescript you can’t code to buy one contract based on code written on another.

So you need to have condition on the 8200 put contract directly.

That mean if 8200 put reaches a particular amt than only buy,else not