I can see the JSON in alert_message worked but the problem is if I am using a strategy that does not repaint, then buying is at the open of the candle and due to premarket opening of NSE, Tradingview places the trade before 9:15 in pre open session (9:00-9:15). Since Dhan do not support AMO through webhook, the trade does not go through. I had already spoken to TV support and they can’t do anything related to trade initiated before 9:15.
I think your api should be modified to accept the request from TV during pre open session, otherwise the complete integration is a failure.
Then you can turn on tradingview “calc_on_every_tick” option and use time windows (user defined start and end time when order should fire) to trigger order only after market open. Be careful as “calc_on_every_tick” will fire an order every tick unless you restrict it using strategy.position_size in code to fire just one order per candle.
Free community support is limited to what I posted earlier. U should be able to find free code in tv public library on defining a time window, enable calc_on_every_tick and using
strategy.position_size to restrict order flow.