MIH8
- ago
Hi.

Today i have some time to trade with my paper account. Here is a situation i would like to know how it will be handled. The screenshots show the order manager, the position with the quantitiy left and the snippet from the trading history at IB.







So, the quantity in the sell of the order manager is 113. Now there was a partial sell of 100. Will there be a new signal for the 13 that are left?
More than half an hour has passed since the sell and it is strategy in 1 minute frame. The sell logic is trivial and sells after 2 bars.
0
403
Solved
8 Replies

Reply

Bookmark

Sort
MIH8
- ago
#1
Ok, the sell was placed after more than one hour (+2 minutes, bars?!)



0
Best Answer
MIH8
- ago
#2
Can someone please comment on why the signal came only after an hour (and 2 minutes)?
After all, there are no conditions and the time frame is one minute.
0
Cone8
 ( 28.32% )
- ago
#3
It's too difficult to answer precisely because we know almost nothing about the strategy, any of the preferences you've selected, and, you're only showing pieces of images instead of giving us "the big picture".

Strategies run with hypothetical positions (i.e., backtest) and when Portfolio Sync options are selected, exit orders will synchronize with account sizes. Orders are canceled when the strategy no longer creates a signal. Consequently, the strategy backtest will cancel the signal at the end of bar even after a partial fill.

The curious thing about your case is that a Market order didn't fill completely and quickly. I've never seen that happen and is certainly and edge case.
0
MIH8
- ago
#4
No problem. The delay is certainly related to the communication interruption (as mentioned in the other thread), at least the probability is high. I would tick that off at this point, since I can't provide more detailed information.

The strategy is a block strategy and the extract is the complete sell block, there is nothing missing. At this point I am already satisfied if partial sells are not a problem. After all, the position was finally sold. (very late).

All in all, I think this thread can be checked off. Thank you very much.
0
- ago
#5
Today I had a partial sell fill on a live position at a limit price. From Post #3 above I see that the backtest treats the partial fill as an exit and the strategy will not detect an open position to place another automated order to sell the remaining positions tomorrow.

What's the best way to recover from this? Manually place a sell order for the remaining positions? Is it possible to use the manually mimic the CancellationCode capability to stack a Limit order with an MOC, or will I have to monitor that myself?
0
Cone8
 ( 28.32% )
- ago
#6
Assuming that you are Auto-Trading, here's what I would expect if you were using...

1. Orphan Positions option
The remaining position would be exited at Market on the following bar.

2. Live Position option
The Strategy would continue processing the exit logic until it's removed from the Account.

Since you said "tomorrow", I'll assume that you're talking about End-Of-Day trading using the Strategy Monitor. If that's the case, I'd expect the same as above if WealthLab wasn't restarted. But it's not one of our test cases (we'll have to work on that), so maybe you can tell us if the strategy is still Signaling the limit order - if you enabled "Use Live Positions".

QUOTE:
Is it possible to use the manually mimic the CancellationCode capability to stack a Limit order with an MOC
Probably not because as you mentioned, price attained the limit, so hypothetically, the position is sold.
0
- ago
#7
Yes, daily strategy is run after market close, and places trades for next day open. I just checked that Live Positions was enabled via Trading Preferences. The market just opened, and I ran the strategy again from the SM.

And voila! The unsold positions have been placed to sell at Limit at the IB broker, along with an MOC which is now pending in the Order Manager as WaitForClose. So, I ended up testing two new features: Live Positions (B28) and the fix for stacking Limit and MOC Sells (B27), which both operated as expected for this use case. Impressive!

One question: I set the MOC place time before market close at 1 second. Is that cutting it too close?
0
Cone8
 ( 28.32% )
- ago
#8
Thanks for the update!

QUOTE:
I set the MOC place time before market close at 1 second. Is that cutting it too close?
Definitely too close. IB is fast, but there are differences in your computer clock and IB's, transmission delays, etc. I'd use 10 seconds to be on the safe side for IB. More for other brokers.
0

Reply

Bookmark

Sort