Best Method to set maximum N° of simultaneous trades
Best Method to set maximum N° of simultaneous trades
09 Mar 2023, 22:48
What is the best way to set a maxium number of simultaneous trades?
I would like to compare some systems and find the most stable and fast method for this purpose.
(this could help in case of extreme volatility / unstable connection)
Thanks in advance!
Replies
jacopotrono
12 Mar 2023, 15:05
RE:
firemyst said:
The first question is -- do you want to do this all under the same cBot? Or across different cBots? The answer to that question will affect the way you architecture things (and thus performance), because cBots cannot communicate directly with each other.
If it's the former, one thing you could try is setting a static variable that maintains the count. You'd have to make updating that variable thread-safe.
Thanks for the reply,
I was thinking for a method focus on a single acting bot. I tried at first to assign a ticket for every trade with a check before every signal; but with high volatility the bot starts to lose control and to overlap trades
@jacopotrono
firemyst
12 Mar 2023, 04:51
The first question is -- do you want to do this all under the same cBot? Or across different cBots? The answer to that question will affect the way you architecture things (and thus performance), because cBots cannot communicate directly with each other.
If it's the former, one thing you could try is setting a static variable that maintains the count. You'd have to make updating that variable thread-safe.
@firemyst