I want to how to buy or sell any option automatically at certain price on spot chart or future chart. Ex. If bank nifty trading at 34708 and I have drawn a horizontal line at 34245 so when bank nifty touches horizontal line then 34100 CE should buy. If i want to set SL at 34100 and when bank nifty crosses 34100 it should exit my order.
Welcome to Dhan community. Yes, what you mentioned is possible using TradingView and triggering Basket with that positions you mentioned using Webhooks.
We have a detailed post on same for you here - Introducing: Now execute your Basket Orders via webhooks on TradingView
Hope this helps. Happy trading on Dhan