Introducing: Webhooks as Order Type on Dhan. Now do Options Trading on TradingView.com

Hello Super Traders,

We introduced our TradingView console (tv.dhan.co) that lets users trade directly from charts, introduced Dhan Trading Webhooks for free to trade via TradingView (tradingview.com), and introduced Dhan on TradingView’s Connect with Broker Trade Panel.

One of our unique products was the introduction of Dhan Webhooks for TradingView.

“Dhan Webhooks for TradingView” was built for all super users of TradingView who want to place orders on Dhan based on their TradingView indicators, strategies, alerts or pine scripts. We facilitated earlier by creating Webhooks, which helped you place trades by creating Alerts on TradingView, either on Single Instrument or as Basket Orders.

With the TradingView team, we leveraged their Alert feature to build one of a kind order execution system on Dhan, which can help you connect these two platforms, and give you control over your trade.

Building iteratively on user feedback, Dhan Webhooks are being used by hundreds of traders daily to place trades via TradingView. Today, we are expanding this product to infinite possibilities, and further enhancing the experience for all our users.

Introducing Webhooks as Order Type on Dhan

Now, with Webhooks on Dhan, you are not limited to scrips available on TradingView.com. You can place orders based on any chart in Equity, Futures, Options and even Multi-segments. Not just this, you can continue trading via Dhan Baskets on TradingView.com too.

With Multi-segment orders, you can build strategies with multiple legs across segments, and place orders via indicators on TradingView charts.

We have also created a detailed guide for you to get started with Dhan Webhooks and start placing orders via TradingView.com:

You can leverage Dhan Webhooks in any of your trading strategies, without the need to switch your existing Chart setup. Not only this, you can take a step towards systematic trading, with your TV strategy generating alerts and placing trades, with your monitoring.

Via Dhan Webhooks, it is now possible for you to build your automated trading strategies with zero coding experience or knowledge. We are building all of our products iteratively, and we plan to improvise it further. Let us know your feedback and ease of use.

Happy Trading!

– Hardik
Product

11 Likes

Game changer move by Dhan. Thanks Dhan team.

5 Likes

Does it support bracket order? I need to place order in option with fixed profit and loss in points.

Hello @yashbindlish

Bracket Order is an order type, which you can imitate by creating multiple alert triggers on TradingView, using these same Webhook Orders. We haven’t added Bracket Order as a separate order type.

Hi @Hardik
When I use webhook to place order in equity intraday, the order is getting placed in futures. The following webhook was triggered but as seen in the image, order was placed in future segment.
{“secret”:“1NneV”,“alertType”:“multi_leg_order”,“order_legs”:[{“transactionType”:“B”,“orderType”:“MKT”,“quantity”:“1”,“exchange”:“NSE”,“symbol”:“COALINDIA”,“instrument”:“EQ”,“productType”:“I”,“sort_order”:“1”,“price”:“0”}]}

I have raised a ticket yesterday as well but no response or solution was provided.

@Hardik - Thank you for your reply, But with bracket order we get additional flexibility to have Target profit and Stop loss in points defined. Can we not pass additional parameters (mentioned in Dhan API documentation) as part of JSON alert message? My requirement is, while placing an Order for options i need to define and send signal with Target Price/Stop Loss in points.

boProfitValue":“”,
boStopLossValue": “”,

How to add it pine script?? because when the alert triggered when to put buy and sell signal script…? This feature is great!! Thanks for saving my algoji subscription. THis is direct replacement of this. LOL

Thanking you very much and it is really fantastic and amazing place to do the dreams it is made with lots of love and zeal I am really delighted to be here part of these wonderful journey well it is my pleasure to be part of this great mission

@Hardik - would be great if you can share how to place bracket order through existing webhook. Any sample json would be super great to understand better. Thanks!

Hello @Jitesh

Alright, will look into this with the support team and deploy fix here if required.

Hey @yashbindlish

Understood. Currently, you cannot pass any additional parameters within the JSON as the system will simply reject the same. But I get your requirement here.

We want to keep the JSON simple enough for any customisation to be made with ease on pinescript end. There are a couple of users who place target leg and stop loss leg as well, simply by placing subsequent orders via triggers through pinescript. You can explore that for the time being. Meanwhile, we will assess the feasibility of adding different order types too, which currently might make the structure too complex.

Hello @lk7110 and @9980753567

Welcome to Dhan Community!

Great to hear your kind words and hope you will like this enhanced webhook orders. Do let us know your feedback, would be waiting for that.

@lk7110 To use it with pinescript, you simply need to first define your buy and sell conditions and then on getting these signal, you can generate alert and place orders via pinescript code itself.

Thank You, @Hardik This clarifies, Complex Json for experienced and advance users :slight_smile: Would love to know more about how other users are placing subsequent order for Option Buy or sell with target leg and stop loss leg. Any sample JSON or documentation that you can share. It would be great to see one example. For example, Nifty 19550CE place Buy at Market Price, with Target price of 10 points and 5 points of sell.

@Hardik
Introduction of enhanced webhooks is a nice move. In the video you have explained different types of orders in addition to existing basket orders. I think we were already able to place orders in futures, options, multi-segment, making straddles etc., all through baskets. Whatever is added in the basket will be executed at once on getting webhook alerts. Hope i am getting it correct. If yes, how these different types of orders will it help traders? Only difference I can see is that these are one time orders but baskets can be used multiple times. Any other major difference?

The big advantage for me with updated webhook is the time saved on setting baskets. TV script can directly fire orders on single leg options or multi leg options / futs. If one is firing a number of strategies the cumulative time saved is significant. Not to mention the possible hassle of setting baskets everyday among something pressing that life may throw at me.

1 Like

Hi…hardik
How to make both order i e buy and sell at atime?means once buy signal fron tv and next is sell signal from tv …both how to implement via dhan webhook?will it same exexute once buy position while sell signal recd from tv …pls show how to set?

Hello @parag212223

Welcome to Dhan Community!

You can either keep these two signal in separate alerts - one with buy JSON and other one with sell JSON. And as and when the respective signals are generated, the orders will be placed in your Dhan account.

Or if you know Pinescript, then you can define the buy/sell conditions there itself, so that the alerts are generated automatically.

can show how your JSON fits into the alert_message in pinescript.? how the quantity can be dynamic as per the order size mentioned in properties window of the strategy?

Hello @shoebwk

You can define your own variables like {{alert.quantity}} in the pinescript which can be based on your custom conditions and then also use the same variable inside of JSON of the webhook.