ww58
- ago
The strategy was running since yesterday. I noticed "partially filled" errors in the order manager log and decided to restart the program, and then paid attention to the available positions. There are shorts, which should not be there. How to avoid them?

0
178
8 Replies

Reply

Bookmark

Sort
Cone8
 ( 28.32% )
- ago
#1
Method 1:
Preferences > Trading > Portfolio Sync > check Block Exit Orders when Position not Found
This one's pretty self-explanatory.

Method 2:
Preferences > Trading > Portfolio Sync > check Live Positions
See the User Guide for more explanation. It can cause a strategy to act differently than the backtest (because it ignores the backtest).

You can enable both preferences simultaneously, but "Live Positions" in essence nullifies the first option.
0
ww58
- ago
#2
I already had these options both enabled, which is why I was surprised. This means that it is practically possible to get this situation on a real account
0
Cone8
 ( 28.32% )
- ago
#3
In that case you may have overfilled exits because you didn't have either of the Exit order sizing options selected:
- "Reduce size of Exit Orders.. " (prevents overfill)
- "Always set Exit Order Quantity to full Position Quantity" (prevents overfill and underfill)

If you tell me one of those was enabled, then you're seeing something I haven't seen after thousands of test trades.
0
ww58
- ago
#4
These options were also enabled, and this was the first time such a situation happened. Now we can only guess, and it was either a failure in the ib connector or in the ib gateway itself. If it happens again, I will save the logs
0
Cone8
 ( 28.32% )
- ago
#5
The IB connector isn't failing, but the size isn't being properly sync'd to a position. It's not clear when this happened to you, but if it was the result after a partial fill, we have an idea why.

In any case, please, start a new thread when you have a different topic. We're discussing something now that has nothing to do with the 1M$_strategy.
0
- ago
#6
QUOTE:
In any case, please, start a new thread when you have a different topic. We're discussing something now that has nothing to do with the 1M$_strategy.

OK, I've extracted offtopic into a new thread.
1
ww58
- ago
#7
The situation repeated. There were 2 positions. One has been closed, but another got sl & tp orders cancelled so it remained unprotected until the next bar. Not something I want it to happen on a real account.

0
Cone8
 ( 28.32% )
- ago
#8
I see some errors that indicate there were fills and some dialog about 2 positions that something happened to. Not enough information. An Order Manager log would help (don't use Auto Cancel), a screen shot of Trading Preferences, and the Strategy code - or at least the logic involved.

I've created many thousands of trades with the IB Paper Account and haven't seen this. So it's important to duplicate your conditions.
0

Reply

Bookmark

Sort