Floating Limit Price using Tradingview Dhan Webhook

Hello,

I’m new to Dhan. I want to trigger automated orders using my Tradingview strategy on Dhan. I want to buy at a floating limit price that is a small percentage point below the CMP. For example, setting the limit price 0.1% below CMP when alert is triggered. However, right now I can see that Dhan only allows either a fixed limit order or a market order when creating json code. Is it possible to place a floating limit price? This really helps in covering the loss due to increased STT.

Any help/guidance is appreciated!

STT was increased. But exchange transaction charges were reduced. So not much of a hit.

This u can do in pine itself. In strategy.order() use stop loss limit order. The alert will be fired only when this order condition is met. In JSON then you can specify a limit order.

https://www.tradingcode.net/tradingview/stop-limit-entry/

Thanks for the reply! In Tradingview, the alert call will be triggered based on the entry condition, but the entry price will be defined in the Json code, right? It doesn’t matter what the limit price is in the strategy.entry function in Tradingview. The order will be executed either as a market order or at a fixed limit price as defined in json. Please correct me if I’m wrong. For complete information, I’m planning to use webhook to trigger automated orders. I’m currently using a third-party bot called NextLevelBot which has functionality for a floating limit price built in. Trying to see if I can switch over to Dhan’s own API.

Alert is fired when the order is filled in Tradingview simulated order execution engine. So if u place the JSON in the alert message field of strategy.entry() and set a SL-L order in the function, the alert will be fired when that SL-L order is filled in TV only. JSON from the alert message then is sent to Dhan. If you have specified limit order in JSON you have got the use case mentioned by you covered.

Please understand that I want to trigger order at a predefined limit price that is decided on the basis of the current market price. For example 0.1% below the current market price. How can I do this?

I have already explained this. Now it’s up to you to try and implement in pine.

You need some basic pine script knowledge. Then you can fullfill your criteria what you are asking for. It’s not just a json object what you are asking. lt should be programmatically done by pinescript. If you try with some basic knowledge sir can help you. Already sir shared a link with you.

Ok, let me try.

Hi @banthiyaadvisoryserv
It’s created by sir @t7support