- ago
I've been running a new strategy overnight, and when I just checked the Order Manager in WL7 this morning, I see a bunch of "CancelPending" statuses. Does this indicate some sort of problem in the execution of the strategy?

0
1,250
31 Replies

Reply

Bookmark

Sort
- ago
#1
The list of "CancelPending" has continued to grow as the day has gone on:

0
Glitch8
 ( 8.38% )
- ago
#2
I'll take a look, but what about the previous issues around the HTTP errors? Are you able to submit active orders now?
0
- ago
#3
I redesigned my strategy to sidestep the previous issues that had been coming up, perhaps related to "One Cancels Other" usage. As far as I can tell, everything has been working exactly as expected with this strategy so far, with no warnings or errors. These "CancelPending" orders are the only issue I've come across.
0
Glitch8
 ( 8.38% )
- ago
#4
OK, I will investigate these cancel pendings. And, if we can isolate the OCO error to some order combination I can enter into the Order Manager I can look further into that as well. You can force an OCO by staging a Limit and Stop order and placing them both at the same time.
0
- ago
#5
I set up a different strategy on a different Remote Desktop, and also see the "CancelPending" status there. But in addition, I'm occasionally getting these "Collection was modified" error boxes:

0
- ago
#6
I restarted WL7, and have been running a strategy all day with no issues aside from the "CancelPending". But it just started showing "Binance Broker: Error Canceling Order: Unknown order sent."

0
- ago
#7
QUOTE:
OK, I will investigate these cancel pendings

Glitch, any luck with this? I'm still struggling with each of the issues mentioned in this thread, unfortunately.
0
Glitch8
 ( 8.38% )
- ago
#8
Not yet, we've had a number of other things come up but will look into it soon!
1
Glitch8
 ( 8.38% )
- ago
#9
I'm not seeing any problems locally performing cancels - is it a pervasive problem, or only related to specific symbols? Can you place on order in the Order Manager, for example, like below, and duplicate the issue?

1
- ago
#10
It does not appear to be limited to any specific symbols. Surprisingly, I just tried to manually cancel an order like you suggested, and it did in fact duplicate the issue:

0
Glitch8
 ( 8.38% )
- ago
#11
OK, I had a hunch and it turns out to be true. It's something related to the internet connection. I just connected the same computer to my phone's wifi hotspot, and now I am seeing the same thing.
0
Glitch8
 ( 8.38% )
- ago
#12
And, I was able to get it fixed for Build 44. The issue was that, with certain internet connections only apparently, the "Canceled" order status gets recieved before the processing of the cancel code is completed, which then overwrites CancelPending, even though the order is already canceled.
1
- ago
#13
Thank you for figuring that out, really appreciate it!
0
- ago
#14
Is there any chance this could be connected to the Kraken streaming disconnect/exception that I've struggled with for so long? My home computer is on a high speed fiber connection, and my remote desktops are on Amazon EC2 east coast. So I could potentially see network responses arriving unexpectedly fast, and potentially out of order, in such environments.
0
Glitch8
 ( 8.38% )
- ago
#15
I'm not sure, but there's little we can do about a Websocket disconnecting - I mean we are already reconnecting when we detect that it disconnected.
0
Glitch8
 ( 8.38% )
- ago
#16
Try the new Binance build to see if this solves your CancelPending issue.
0
- ago
#17
No luck, I'm afraid:

0
Glitch8
 ( 8.38% )
- ago
#18
Actually this was my mistake, the fix for this was done in the WL7 code base proper so unfortunately you won’t see it until build 44. I’m 95% confident you’ll see this resolved then.
1
- ago
#19
Two quick questions:

1) Any rough estimate on when we might see this fix released?
2) Would this bug potentially affect market buys/sells as well?

I converted my strategy to market buys/sells to try and sidestep the problem, but I noticed the strategy entered positions several days ago but then never exited, even though it should have by now, because I have a "Sell after N Bars" block.
0
Glitch8
 ( 8.38% )
- ago
#20
We should be releasing Build 44 in the next few days. And no it doesn’t affect market orders.
1
- ago
#21
The strategy seems to be working much better in build 44. However, I let it run overnight, and still encountered a "CancelPending" error at some point:

0
Glitch8
 ( 8.38% )
- ago
#22
That looks like an isolated instance, from what I gather it looks like there was a disconnect with the Binance back-end, I'm not sure what caused it.

But the pervasive cancel pending failure is fixed.
1
- ago
#23
Is the issue fixed for the Kraken extension as well, or just Binance for now? I'm trying to run the same strategy in Kraken, and my strategies all appear to be stuck in the "CancelPending" status in the Order Manager. But I don't see any warnings or errors in the log.

0
Glitch8
 ( 8.38% )
- ago
#24
They change was not specific to Binance.

I just tested some Kraken order cancelations at my side and could not reproduce the issue. But let me investigate and see what I can come up with here.
0
- ago
#25
I let the strategy keep running for a while to see if it would eventually correct itself, but I do believe it was fully stuck and non-functioning at that point. You can see in this image that the timestamps in the Order Manager are hours behind the timestamp in the bottom right of the WL7 window. When the strategy is working, the timestamps in the Order Manager were updating every 5 minutes.

0
- ago
#26
I had been running a strategy for several days using B44 with Binance, but last night it stopped working and the Order Manager shows "CancelPending" for all four symbols:

0
Glitch8
 ( 8.38% )
- ago
#27
It looks like this is a known issue with Binance, it sometimes has a timing issue causing a new order to fail. Here's the same report from a completely different Binance library than the one we are using ...

https://github.com/askmike/gekko/issues/2762

I'll research more and see if there was any solution forthcoming, we might need to introduce some small latency in the order placement but for obvious reasons would like to avoid that unless it's absolutely required.
1
- ago
#28
If this doesn't affect most users, I don't mind some sort of hidden option/setting to manually define a latency in the order placement. For me personally, the latency is of no importance, but the strategy sporadically failing is of critical importance.
0
- ago
#29
Any luck with this, by chance? I'm currently trying to run a strategy in Binance that uses "Buy at Limit" on a portfolio of 4 different symbols, but I keep encountering the "CancelPending" error. So far, my only option seems to be to only design strategies that rely on market orders.
0
- ago
#30
I'm having issues keeping a strategy running using the Binance extension. My Binance account is BinanceUS.

One of two cases is happening:
- A buy order that was filled will not be identified as filled. WealthLab attempts to cancel the order but because it's filled, Binance can't do that. The order status is set to CancelPending and it will sit in the Order Manager indefinitely. No sell order for the buy will be placed. This case doesn't always happen, only sometimes.

- An OCO sell order that has one part of it filled will not have both parts marked as filled by WealthLab, even though the unfilled part will be canceled in Binance. The part that wasn't triggered will then get switched to CancelPending status, where it sits indefinitely. E.g. with an OCO take profit + stop loss order, if the take profit is filled, the stop loss gets marked as CancelPending. This case happens every time an OCO sell order is filled.

It seems like a similar issue to what's discussed here, but this thread has been inactive since early 2022.

Does anyone know a way to fix or get around this?
0
Cone8
 ( 26.65% )
- ago
#31
A pending scenario means that WealthLab didn't get a status message for the order. It shouldn't happen, but In that case, you can right click and "Kill" the order. Then in the Accounts too, click "Request Updates from Brokers". If the position shows up there, all is good.

QUOTE:
This case happens every time an OCO sell order is filled.
Okay, thanks.. We'll look into that scenario.
0

Reply

Bookmark

Sort