Bug info:
Using Combo long bot with DCA and SL on Kucoin. When doing a backtest the bot seems fine. But when running it on paper (Binance & Kucoin) and live (Kucoin) the bot is not working as designed.
- DCA orders are sometimes not placed on exchange
- SL is ignored
- Deal not closed
-
Bot URL → Combo Bot | Gainium App
-
[Optional] Steps to reproduce →
See screenshot, 1 Base order, 1 DCA order. I’m missing the second DCA order and why is selling with a negative TP?
-
Expected result →
Did some more testing on another combobot. I think there’s a bug in the SL function while using DCA in a combobot. Backtesting with the SL works fine.
Combo Bot | Gainium App
Transaction ID: 66e37ac690dba5152ab6ba32
Problem in this case that the bot activated the stop loss before the 2nd DCA order is hit. I configured the SL that it should hit after -2% MAX DCA.
Think I found out whats going wrong. Didn’t notice that the SL is leveraged.
In DCA bot the expected average loss is calculated:
In Combo this is missing:
@aressanch: Maybe good idea to add this expected average loss also to the combobot?
When using a SL of 2% and 50x leverage some of the DCA orders won’t get hit.
Will do some more test with higher SL
Yes, correct.
In your deal SL trigger and DCA filled happened simultaneously. Backtest at x50 leverage might be not accurate. It has strict order of methods, but in real bot we cannot guarantee that order os methods will be the same, especially on high leverage.
In bot events we added a Take Profit /Stop Loss categories. You can check current SL level of specific deal and compare it DCA orders. If SL level is very close to DCA there is a high chance that deal will be closed before DCA filled or processed.