# Webhook Integration

**URL:** <https://community.delta.exchange/t/webhook-integration/2174>\
**Category:** APIs & Algo Trading\
**Tags:** tradingview\
**Created:** [October 11, 2025, 6:15am UTC](https://community.delta.exchange/t/webhook-integration/2174 "2025-10-11T06:15:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Biscuit](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.delta.exchange/biscuit/32/348_2.png) [@Biscuit](https://community.delta.exchange/u/Biscuit)\
**Post date:** [October 11, 2025, 6:15am UTC](https://community.delta.exchange/t/webhook-integration/2174/1 "2025-10-11T06:15:35Z")

</div>

Is it possible to a place limit order using webhook from TradingView?

Otherwise TradingView firers market orders on candle closing bases.

---

<div class="post-metadata">

**Author:** ![ayush.aggrwl](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@ayush.aggrwl](https://community.delta.exchange/u/ayush.aggrwl)\
**Post date:** [October 11, 2025, 7:52am UTC](https://community.delta.exchange/t/webhook-integration/2174/2 "2025-10-11T07:52:20Z")

</div>

Since TradingView only communicates one-way with Delta, we cannot confirm whether a limit order has been filled. If a limit order remains unfilled, subsequent algo trades may break logical flow. To avoid this risk and ensure execution reliability, Delta \<\> Tradingview integration currently supports only **market orders.**

---

<div class="post-metadata">

**Author:** ![Biscuit](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.delta.exchange/biscuit/32/348_2.png) [@Biscuit](https://community.delta.exchange/u/Biscuit)\
**Post date:** [October 11, 2025, 8:03am UTC](https://community.delta.exchange/t/webhook-integration/2174/3 "2025-10-11T08:03:25Z")

</div>

Thanks @ayush.aggrwl.

In that case, if a strategy is running on 1H timeframe, current open position will be closed only once 1H candle is completed even though TP has been reached in realtime. Is there any practical alternate to achieve this than placing a limit order?

---

<div class="post-metadata">

**Author:** ![ayush.aggrwl](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@ayush.aggrwl](https://community.delta.exchange/u/ayush.aggrwl)\
**Post date:** [October 13, 2025, 5:13am UTC](https://community.delta.exchange/t/webhook-integration/2174/4 "2025-10-13T05:13:26Z")

</div>

Set calc\_on\_every\_tick=true inside the strategy function. @Biscuit

`strategy(“My Strategy”, calc_on_every_tick = true)`

By default, strategies only update on bar close, meaning signals (like take-profit or stop-loss triggers) fire after the entire candle completes. When `calc_on_every_tick` is set to `true`, TradingView will recalculate your strategy on every incoming price tick while the current candle is still forming — instead of waiting for the candle to close. The strategy logic runs continuously within the live candle. As soon as price conditions are met (e.g., TP or SL), your script reacts immediately. On historical bars, this setting has no effect — it only applies to real-time execution.

---

<div class="post-metadata">

**Author:** ![Biscuit](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.delta.exchange/biscuit/32/348_2.png) [@Biscuit](https://community.delta.exchange/u/Biscuit)\
**Post date:** [October 13, 2025, 5:41am UTC](https://community.delta.exchange/t/webhook-integration/2174/5 "2025-10-13T05:41:15Z")

</div>

Thanks @ayush.aggrwl for taking your time out.

I found that `calc_on_every_tick` is good idea but it does not only affect exit position (TP/SL) but also opening a new position, basically all conditions are evaluated in realtime than candle closing, same as you explained.

On thinking deep, I find that using `strategy.exit()` can be better idea than `calc_on_every_tick` where it can be coded in a way to use only for TP, while `strategy.close()`can be used for SL on candle closing bases. Also, `strategy.entry()`remains to be delayed on candle closing.

Please feel free to share your thoughts on this.

---

<div class="post-metadata">

**Author:** ![ayush.aggrwl](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@ayush.aggrwl](https://community.delta.exchange/u/ayush.aggrwl)\
**Post date:** [October 13, 2025, 7:33am UTC](https://community.delta.exchange/t/webhook-integration/2174/6 "2025-10-13T07:33:11Z")

</div>

Since your strategy timeframe is above 15 minutes, you can definitely try this hybrid setup — using `strategy.exit()` for TP and `strategy.close()` for SL on candle close.

Try it out and let me know how it performs in your tests.

It should work well, if not, you can always toggle `calc_on_every_tick` as true.
