- ago
Not sure what's going on here, but here is my set-up. I have a couple strategies trading simultaneously and the limit/stoploss works fine during the day and many times overnight. However I've noticed today that I got a "FinalOrder" status at the end of the day, and found that all my orders were cancelled in ToS.

Here are some images of my preferences and one of the trades.

Preferences screen:


Order Manager:


ToS Order History:
0
222
15 Replies

Reply

Bookmark

Sort
- ago
#1
After waiting a bit, it turns out the limits were placed but the stop losses were rejected. Is this an issue with ToS?
0
Glitch8
 ( 8.41% )
- ago
#2
It’s hard to say without having the strategy to analyze. But it’s normal for the FinalOrder to pause for a while before getting submitted to the broker. We designed it that way because some brokers won’t accept orders submitted too shortly after the market close.
0
- ago
#3
That doesn't seem to be the issue. In the Order Manager the order is scheduled to be placed but Schwab returns an error. It doesn't seem to be a strategy or a WL issue but something with Schwab.

Occasionally an order gets an error during the day (this is an hourly strategy) but Schwab retains the existing order. At EOD, however, it randomly cancels either the limit or the stop order.
0
Cone8
 ( 4.27% )
- ago
#4
If any, what's the error message? Double click the order or look in the Log Viewer.
0
- ago
#5
Here's the message log from this morning:

Message Log - Use the green Connect button to connect to a Broker. You may need to Configure it first.
Schwab Broker: Error Getting Orders: Generic error
Schwab Broker: 03:30:19 Exception Getting Orders: One or more errors occurred. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (api.schwabapi.com:443))
03:30:47 Internet restored! Reconnecting...
Schwab Broker: Exception Checking Order Response: Object reference not set to an instance of an object.
Schwab Broker: Exception Checking Order Response: Object reference not set to an instance of an object.
Schwab Broker: Exception Checking Order Response: Object reference not set to an instance of an object.

Here are a couple examples of orders that were placed and were rejected or were placed on one side but not the other.

0
Cone8
 ( 4.27% )
- ago
#6
We can fix that Object reference error, but it won't change the result.
I'll experiment with Cancel/Replace GTC orders to see what can be found.
0
- ago
#7
Thanks.

Separate note, but Schwab does not like Short orders being placed at GTC, at least for thinly traded ETFs. I get a rejection notice on those. It will accept an Day order, but not GTC.
0
Cone8
 ( 4.27% )
- ago
#8
Canceling the GTC happens all throughout the days. Before placing the new orders the first thing that happens is canceling the order orders. It's just that during the trading day the new orders become Active quickly.

The last bar of the day is different like Glitch explained. The "Final Orders" aren't placed for another 15 minutes - and here's where the REJECT happens. It seems that in this case they're not being placed as OCO. After one order is placed, the other is rejected for a possible oversell condition.

We'll work on it.
0
- ago
#9
Thanks, let me know if you need any more data/info.
0
- ago
#10
I watched it closely today. All orders were cancelled at the end of day, then Schwab
treated the replacement orders 15 minutes after the close like separate (i.e. not OCO) orders. It randomly rejected the Limit or Stop order with the message that it "...may result in an oversold/overbought position in your account."
0
ww58
- ago
#11
What about stop orders for strategies overnight?

I ran into the following today: I didn't use “Use GTC for all”. Today I noticed that the sl/tp for the strategy was canceled at the end of the day, as it should be, I did not take this into account in the strategy. I saw this and enabled “Use GTC”, then in Strategy Monitor I manually executed before market opening, the orders showed up in Order Manager as FinalOrder, but I don't see them at the broker.
0
Glitch8
 ( 8.41% )
- ago
#12
FinalOrder orders are in a kind of holding pattern. They will get submitted after a delay of 15 minutes.
0
ww58
- ago
#13
QUOTE:
FinalOrder orders are in a kind of holding pattern. They will get submitted after a delay of 15 minutes.

I'm aware of that. I've modified the IB FinalOrder delay to 1 min, they never showed up. Anyway, I think there should be a separation of DAY for getting into position and GTC for sl/tp. Otherwise we may get execution on the account but not in the backtest.

Therefore, my suggestion is to make an option to enable GTC for exit orders only
0
Cone8
 ( 4.27% )
- ago
#14
When you say, "they never showed up", do you mean that:
a) your signal did not appear with a "FinalOrder" status in the Order Manager?
b) A FinalOrder did appear, but it was never Placed?

If that answer is "b", I'll suggest that 1 Minute is too soon to place a FinalOrder. I suspect what happened is that you have "Auto-Remove" options selected that auto-removed the order after it was placed and probably rejected.
0
ww58
- ago
#15
B. I didn't pay attention to the status btw. The important thing is that I just double-checked on an open position, the orders were placed immediately at the broker with execution at the opening of the session. So apparently everything is working as it should. Then I even have no need to use GTC.

I don't know what the reason is that that original order didn't go to the broker. I'll keep an eye on it
0

Reply

Bookmark

Sort