Introducing Webhook Alerts : Direct Order Placements on TradingView from Dhan

I see in the video that the JSON created for webhook has ** transactionType** static. Now if i want to use it for a strategy in tradingview, I would need this to be dynamic formatter provided by tradingview. How do I exit a trade that I have entered into without this being dynamic?

And BTW, great feature. This has pulled me into the Dhan ecosystem. I hope it wins me over. :slight_smile:

1 Like

Hi Pravin Jadhav ji
Good Dhan Platform with best of featuresā€¦

I need support in the following.

I have tradingview strategy wth buy and sell orders alert and also exit when opposite trend is startedā€¦ during webhook integration, there are json for buy and sell separately, but my strategy is having inbuilt all ordersā€¦
can you guide here how to auto trade this stategy.

Thanks
Amit Killedar

1 Like

Hi @CHACKIATH, looks like we missed responding to this.

Request you to please email us on help@dhan.co and we will have this checked. Webhooks is used by many users of TradingView everyday.

Hi @killedar.amit @wishabhilash @CHACKIATH

To make order placement dynamic using webhook and Pine script, you need to alter the json object. For transactionType write {{strategy.order.comment}} and add piece of comment in pine script for Buy & Sell or Entry & Exit signal with syntax B & S.

Also @CHACKIATH, request you to not share your webhook url and secret on public forum. This is like sharing your userid & password of trading account.

Hope this helps!

2 Likes

@Naman pls enable direct option order placement via webhook using option symbol names (we can construct the symbol name in pine code based on underlying price).

2 Likes

Hi @Naman ,
Please take a look on my request

Hi can you please tell me weather we can get alerts only , not order placement in web hook
Is it possible
Kindly reply
Thanks

Thanks Mr.Naman. This is cleared for stocks.

Can you explain how the call buy and put buy basket orders are created and autotrade using webhooks.
How the buy or sell signal is triggered for options using basket ordersā€¦and how this can be made dynamic tradingā€¦

Dhan need to publish detailed videos and also have online session for clarifying doubtsā€¦regarding webhooks auto trading etc.

i have created several scrips to auto trade through webhooks and tradingview.

if multiple scrips are created, it triggers only latest oneā€¦

only tradingview alert is popped up, but orders do not trigger although i use the same procedureā€¦

Hi @killedar.amit

Got your point. It appears you are generating new webhook URL every time you create an alert. When you do this, all your previous URLs get expired. Request you to use one active url for all the alerts.

But in case i select validity of Webhook URL as one day, then next day i can generate URL right? and
then it will be applicable for fresh strategy trades, right?

Correct. :+1:

Also you can generate webhook URL for validity more than 1day, if you want to continue same alert.

3 Likes

Mr.Naman, Request you to reply please.

Hi @killedar.amit

Apologies for delayed reply. To trade options via webhook you have to use basket orders. Create two different basket, one with Call Buy & another with Put Buy. For long signals trigger call buy basket & for short signal trigger put buy basket.

Hope this helps!

Thanks for reply.

is there any modification required in trading view strategy for call and put trigger or existing buy, sell signal helps

Presently I am trading on Dhan in Nifty ATM Options.

I am using webhook and is useful for automated trading ENTRY. But exit is manual presently. I am manually trailing Stop Loss on tv.dhan.co. I want to automate it with alerts on tradingview. Please guide me with syntax to be placed in tradingview alerts to TRAIL STOP LOSS.

I would like to place 10 points SL & 20 points TARGET in Nifty options through tradingview alerts. Please let me know syntax for that as well.

Thanks.

3 Likes

@Naman @Dhan_Help

Is webhook orders enabled for commodity futures directly (not via basket orders) ?

Hi @t7support

Currently, MCX trade execution facility via webhook is available through basket order only. MCX data feed on tradingview is delayed, hence little challenging to make direct webhook facility on commodity.

Its not delayed. Its real time. Please add this feature.