Hello,
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:
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.
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