My strategy is currently running on my live account but I got an issue with the auto-trading this morning.
At 9:20, I started WLP with a strategy on my live account with auto-trading enabled.
At 9:40, buy alert was generated, auto placed and the order was filled. Right after that, stop sell alert was generated due to RiskStopLevel and it was auto placed.
At 13:00, stop sell alert was generated with increased stop price. However it was not auto placed and the alert was just sitting in the Alerts pane in Strategy Monitor.
Thereafter, all stop sell alerts were not automatically placed even if the stop sell prices were increasing.
So I had to manually cancel the previous sell stop order and manually place the new sell stop order.
I just restarted WLP and now the stop sell alerts are automatically placed.
Do you have any idea why this happened?
I think I have seen the same issue in the past when I was testing paper account but only once or twice. I'm little concerned because it happend with live account too.
Size:
Color:
QUOTE:
At 13:00, .... the alert was just sitting in the Alerts pane in Strategy Monitor.
This is the first time that you mentioned the SM. Were all the orders placed by the strategy running in the SM?
QUOTE:
Do you have any idea why this happened?
It sounds like Auto-Trading was disabled for some reason. Did you you try checking (or toggling) that selection on the Orders tool?
QUOTE:
I just restarted WLP and now the stop sell alerts are automatically placed.
One of the steps you must have done was to enable Auto-Trading on the Orders tool since this is never selected automatically.
Size:
Color:
QUOTE:
Were all the orders placed by the strategy running in the SM?
Yes, they were all placed by the strategy running in the SM.
QUOTE:
Did you you try checking (or toggling) that selection on the Orders tool?
Yes, I did. In fact, I tried toggling it but it didn't fix the problem until I eventually restarted WLP.
QUOTE:
One of the steps you must have done was to enable Auto-Trading on the Orders tool since this is never selected automatically.
Yes, I enable auto-trading each time. While this problem was happening, the auto-trading was enabled always.
Any idea?
Size:
Color:
The only thing that comes to mind is that you were looking at an Alert from a Strategy that was not on Auto-Place. I'm pretty sure there's a logical explanation like that, but it seems clear that I'm not going to be able to discover it based on your observations alone. Next time it happens, "take a picture" of the Workspace with the SM and Orders, and attach it to a Support Ticket.
Size:
Color:
No. Only Strategy Monitor window and Orders window were opened at that time.
I will take a picture when next time it happens.
Size:
Color:
Well, "no" for sure only if there was one Strategy running in the SM. Otherwise it's a possible explanation, though I'm not saying that's definitely THE explanation. I'm just suggesting that it's "a logical explanation like that".
Size:
Color:
Yes, there was only one Strategy runing in the SM.
Anyway, I will keep my eyes on and see if it will occur again.
Size:
Color:
Looking at wlp.txt in the log folder, I found the followings in the yesterday's log.
Do you think it has something to do with the problem?
QUOTE:
2009-06-01 10:01:24,027 [Runner3] ERROR Fidelity.Components.RequestManager.RequestManager [(null)] - Unhandled re-direct.
2009-06-01 10:01:32,026 [Runner0] ERROR Fidelity.Components.RequestManager.FidelityWebService [(null)] - Error within PSL response. Error Text: Processing error was returned from base server program.
2009-06-01 10:01:32,026 [Runner0] ERROR Fidelity.Components.RequestManager.FidelityWebService [(null)] - Error within PSL response. Error Text: Processing error was returned from base server program.
2009-06-01 10:01:40,396 [Runner0] ERROR Fidelity.Components.RequestManager.FidelityWebService [(null)] - Error within PSL response. Error Text: Processing error was returned from base server program.
2009-06-01 10:01:40,396 [Runner0] ERROR Fidelity.Components.RequestManager.FidelityWebService [(null)] - Error within PSL response. Error Text: Processing error was returned from base server program.
2009-06-01 11:52:18,811 [1] ERROR WealthLab.DataProviders.FidelityAuthenticationProvider [(null)] - 10: Change in tick lag.
2009-06-01 11:52:18,828 [21] ERROR WealthLab.DataProviders.FidelityStreamingProvider [(null)] - 10: Change in tick lag.
Size:
Color:
Anything's possible. I'll ask someone to take a look.
Size:
Color:
This issue happened again this morning. Buy alert got auto placed fine but subsequent Stop Sell alerts didn't get auto placed and stucking in Alerts pane. No errors or nothing in the Message pane but auto place just didn't happen for Stop Sell alerts. Restarting WLP fixed the problem but it is not acceptable solution for me becaue I'm not always monitoring WLP.
I contacted Fidelity and talked with technical support but they didn't have any idea and they have never heard a problem like this. They even asked me to work with you to figure it out.
Size:
Color:
Looking through WL User Guide, this problem could potentially happen if the strategy somehow gets out of sync with the live account in which case alerts to exit positions are not automatically transmitted to the Order tool.
Especially the following two cases below, the exit alerts are visible in Alerts view but not placed/staged to the Order tool. I think this may explain
why the enter alerts (buy) work fine but not the exit alerts (stop/market sell).
Is there any way I can confirm if this is the case? Debug spew, debug log or special debug build or something?
QUOTE:
Alerts to exit positions that are not owned in your account are not automatically transmitted to the Orders tool when Auto-Stage or Auto-Place is enabled. These Alerts will still be visible in the Alerts views, however.
QUOTE:
Your account (or Paper account) holds 0 shares of XYZ, and, a strategy generates an Alert to sell 300 XYZ. Since the account associated with the strategy does not hold a Position that matches the Alert, Wealth-Lab will not stage the order in the Orders tool.
Size:
Color:
QUOTE:
Is there any way I can confirm if this is the case? Debug spew, debug log or special debug build or something?
IMHO the best way would be to create a support ticket and summarizing your problem there or simply leaving a link to this thread.
Size:
Color:
Just created a support ticket.
Size:
Color:
Hi Kazuna. 2 months later, did you find a solution to your problem? I have a similiar problem.
Size:
Color:
I'm glad you tied these two together, thanks. We're working on the following bugs that you and he have identified.
1. For some customers exit orders are not Auto-Staged/Placed even though it's clear that the Position exists. (Internal ref. 128239)
2. Same-bar exit orders error out. Once this occurs, the first subsequent stop orders for the same position errors out as well. (Internal ref. 123422)
3. If a Position is filled by partial orders, an exit order may contain a larger share size and therefore error out. (Applies only if the Preference to exit "all" shares held is enabled. Internal ref. 127267)
kazuna initially created a ticket for this bug (#1), but the discussion switched to a more obvious problem (#2) that we were able to identify. #2 doesn't apply to your script, however for #2 to occur, #1 must have solved itself. So I'd be happy to know if kazuna was able to identify something specific to solve the exit Alert Auto-Stage/Place problem.
Size:
Color:
The only solution working in the past couple of weeks is to restart WLP after the enter alert is placed and the order is filled.
Size:
Color:
Correct me if I'm wrong, but our discussions indicated that that was the solution after exit orders start erroring out. Here we're interested in just getting the exit orders to the Orders tool in the first place. Your Orders history shows exit orders being placed the very next minute after fills, so there's no way you could have restarted and logged in after the order was filled and place the exit order the very next minute.
Size:
Color:
Yes, I look at stop exit orders to be generated and placed, if not I restart WLP.
Size:
Color:
Then is it fair to say that you still occassionally experience Alerts that fail to Auto Stage/Place? i.e., the Alerts appear but aren't Auto routed to Orders when Auto Stage/Place is enabled? If so, about how often? When it happens, how do you solve it?
Size:
Color:
Yes, I'm still experiencing sell Alerts failing to Auto Place. It fails almost every trading day, I would say 80%. I cannot solve it but I just have to restart WLP to get the subsequent sell Alerts to be Auto Placed.
Size:
Color:
So after you restart once, it works for the rest of the day?
Before starting a new trading day, do you restart WLP?
Size:
Color:
Yes, once I restart WLP, it works for the rest of the day but not always. Sometime the subsequent sell alerts are still not staged/placed after restarting WLP in which case I keep restarting WLP until it works.
I always close WLP after market close and start WLP before market open.
Size:
Color:
Do you normally start "flat" with cash each day? Falden8703 found that if he left some "residual shares" in his account, that Auto-Stage exits always seem to work. Think about that angle next time you run into this.
Size:
Color:
Unfortunately, my strategy cannot lefy any shares but have to close all position.
But it was still good to know that finding.
Size:
Color:
From the report, it just takes 1 (or 2) shares.
The truth is that it really doesn't make sense how it would help. It's pretty clear that the "Portfolio Synch" logic that bounces the account positions against the Alerts is failing; hence the exit Alert is blocked from going further. So it's difficult to see the connection with having "extra" shares in the account. Anyway, when someone discovers the error, no doubt it will be obvious, as it almost always is.
Size:
Color:
The logic in the Order Manager needs improvement.
Buying Power = $550,000.
Preferences = Enable Buying Power Threshold = $500,000.
BuyAtLimit 1,000 shares of SPY at $100.00 ($100,000 order).
Buying Power is correctly reduced to $450,000 while the order is open.
The strategy then issues a REPLACEMENT order at $100.01 (for the same 1,000 shares).
The Order Manager rejects the $100.01 order due to insufficient buying power.
The buying power test should account for the cancellation of the $100.00 order,
and do a cancel/replace at the new price.
Size:
Color:
Please create a support ticket for follow up.
Size:
Color:
QUOTE:
Yes, I'm still experiencing sell Alerts failing to Auto Place. It fails almost every trading day, I would say 80%. I cannot solve it but I just have to restart WLP to get the subsequent sell Alerts to be Auto Placed.
Random failure is a key point.
I can identify both random and constant failures.
In my constant experience, If there is not an excess of shares in the account, then 'sell' auto-stage fails 100% of time.
In my random experience, on one occasion, I experienced a failure to auto-stage a 'buy' alert. This was a random failure, in my judgement, as it happened after a succession of successful buy and sell auto-placed orders on an unattended computer. The strategy buys and sells the same shares throughout the day in 'Raw Profit Mode'. Auto-stage/place is active.
The strategy execution was as follows:
Buy 1000 shares (auto-staged okay).
Sell 1000 shares (auto-staged okay).
Buy 1000 shares (auto-stage failed, so the 'buy' order wasn't placed).
Sell 1000 shares (only 2 shares were in account, so 2 shares were sold and an 'error message' was returned in order message box about trying to sell more shares than were in account).
Buy 1000 shares (once again the alert fails to auto-stage, so the 'buy' order is missed).
Sell 1000 shares (there are 0 shares in my account, but yet the alert is auto-placed anyway. This is the first time I have ever seen 'sell' auto-stage work with 0 shares in account).
This is the first time that 'buy alerts' failed to auto-stage. In the past it was always 'sell' alerts.
It seems that something is toggling within WLP.
Whatever produces the initial auto-stage failure also sets the failure type for subsequent failures (ie. buy or sell type auto-stage failures)
Kazuna, have you ever experienced 'buy' type auto-stage failures?
Size:
Color:
QUOTE:
Kazuna, have you ever experienced 'buy' type auto-stage failures?
Yes, I have experienced the entry order failures and already created a support ticket for it. Apparently it is specific to a script running in Strategy Monitor. So I have switched to Strategy Window and then the problem disappeared.
Size:
Color:
Unless I'm thinking of something that you're not, those (kazuna's) order entry "failures" were errors based on: 1) the same-bar exit bug, and/or, 2) the first order following the same-bar exit failure. My bug queue is pretty full, so if you've got a ticket number to refresh my memory, please point me to it.
Size:
Color:
The ticket # for the entry order issue is 18216.
Apparently the ticket was closed automatically due to inactivity.
By the way, this issue occured even if same-bar exit was disabled.
Size:
Color:
I recall that one. The issue was that the Strategy did not "generate an Alert". I can never recall a case that a Strategy failed to Alert when it should have, even for that ticket and that's why it was closed.
On the other hand, the issue very well could have been that the Alert was generated but was not Auto-Staged/Placed. At the time we discussed that ticket, we weren't aware of these Auto-Stage/Place bugs. So thanks for this reference. I'll add it to Falden8073's report as another suspected case of the same problem.
Size:
Color: