Request: Adding a "Delay" command

I got here following the “Request a feature” button. I hope this is the right place.

My request is the inclusion of a “delay” command in the syntax. The delay command would be used between position commands sent within the same alert, and it would wait to execute the next command for the duration of the delay.

I make this request because Kucoin expects to have at least 2 seconds between a position is closed before a new one is opened. If the open command is received withing the span of those 2 seconds the second command is ignored and it doesn’t even return an error. It returns the first command as succesful and the second is ignored.

I imagine the delay command could be benefitial to other exchanges as well, but I don’t know for sure. It definitely won’t hurt.

Currently I’m making the delay myself in TradingView, but Tradingview doesn’t refresh the scripts unless there is a price update, and those sometimes may take 5 or even 10 seconds, even 20 a couple of times, adding a very unnecesary extra delay.

EDIT: This is referring to Kucoin Futures. I haven’t tried spot.
An example of how an alert would look with the desired syntax:

delay 2000
Long XBTUSDTM q=1 L=6

Hello @falafel004
Thank you for the request, we will add it to the list of priority features.


Thank you. Looking forward for it.

1 Like

Hello @falafel004

I hope you have been keeping safe.

I am happy to announce that the Delay feature is now available for KuCoin.

The Delay parameter is D and the maximum delay time is 5 seconds. The parameter is added to the command you want to delay.

For example:


This will delay the buy command by 5 seconds after closing any open positions.


Hey! Would be great to have this feature for Bybit too… :pray:

Hello @giolivio

The feature is now available for all crypto platforms. Go ahead and try it out.


Hello Tash,
thank you for the update on the upgrade!
Bentash warned me on Discord and he says the delay just works with multi-command messages, is it really so?
Yet most strategies do have separate functions for “close the previous order” and “open the new one”.
This generate two distinct alerts, which are fired simultaneously on the same candle close, and are then translated into two distinct mono-command messages.

{{strategy.market_position}} BTCUSD Q={{strategy.order.contracts}} D=5

will result in my case in two orders

  1. flat BTCUSD Q=0.01 D=5
  2. long BTCUSD Q=0.01 D=5

these will be fired at the same time, which cause troubles
will your server delay both of 5 secs? this will results in having them sent also at the same time
or will it wait 5s for the first command, and just when executed, will wait 5s to send the 2nd order? this will solve my problem

thank you for your attention
kind regards