WLP trying to close imaginary positions the morning after a shortened trading day
Author: Nikko
Creation Date: 12/2/2019 5:39 PM
profile picture

Nikko

#1
WLP failed to execute opening orders for active strategies this morning. Instead, it tried to close a number of imaginary day trade positions that were never placed on Friday 11/29/19. The imaginary positions are positions that would have been opened on Friday if I had run any strategies, which I did not because it was a shortened day. WLP sent closing orders for these imaginary positions this morning instead of opening new positions today. While I was updating the data sets premarket this morning, I noticed that the data update tried to update every symbol and returned "0.0" for each one, even though the data sets were updated over the weekend. It would seem that WLP cannot handle shortened trading days such as we had 11/29/19.

This has cost me $4086 in lost profit so far today.
profile picture

Eugene

#2
For sure WLP handles shortened sessions (special hours). At least in my Markets.xml file, 2019/11/29 is on the special hours list. You can easily find it out if you run the QuickRef code example for SpecialHours.

Please help me understand it. You did not place trades nor update data on Friday knowing it's a shortened day. The data came in after update on the weekend or today. The strategy processed the new bar as it should do. Is this WL's fault or am I missing something?
profile picture

Nikko

#3
I did not trade on Friday. WLP was not logged on live. I updated the data after Friday's close, over the weekend and twice before the market opened this morning. As noted, instead of showing that all symbols had been updated as would normally be the case, WLP continued trying to update the symbols one by one with "0" bars added. This is not normal behavior for the Data Manager and was the first clue that WLP might not be handling the shortened day on Friday correctly.

There were no standing active alerts premarket today: the alert window was empty. Then right after the open this morning, WLP created alerts to close 7 positions that would have run on Friday if WLP were online, which it wasn't. For example, WLP created 2 sell alerts and 5 buy-to-cover alerts to flatten positions that were never placed on Friday. This was the second indication that WLP might not be handling the shortened day on Friday correctly. The alerts did not become orders presumably because WLP was able to recognize that there were no corresponding positions to close in my account list.

Today, 8 new positions should have been opened. Instead, only 2 opening positions were placed by WLP today and they were for symbols that would not have run on Friday because they would not have met entry criteria specified by the strategies. This was the third clue that WLP might not be handling the shortened day on Friday correctly.

Note that all strategies currently running are day trades that are automatically flattened a few minutes prior to the close.

Something is indeed wrong on Fidelity's end. Hope this helps.
profile picture

Nikko

#4
Note that I have always set the "Range" in my strategies to 1 week. If I set the "Range" to 1 day, it seems the strategies won't work reliably, especially on a Monday.
profile picture

Eugene

#5
QUOTE:
If I set the "Range" to 1 day, it seems the strategies won't work reliably, especially on a Monday.

It's expected as there may not be enough seed data to build your indicators.

QUOTE:
I did not trade on Friday. WLP was not logged on live. (...) Then right after the open this morning, WLP created alerts to close 7 positions that would have run on Friday if WLP were online, which it wasn't.

Your system just went out of sync due to not trading on Friday. How is this WL's fault?
profile picture

Nikko

#6
WLP did not go out of sync because I did not trade for one day. In the past, WLP works fine the next day after I have taken a day off.

It went out of sync because WLP apparently doesn't handle shortened trading days as it should.

profile picture

Eugene

#7
We don't know anything about your system. If the unknown system got away by not taking trades then today it's out of luck (out of sync). So if loading 1 day of data is an issue (and I can imagine it can be), I'd suggest something like:

a) putting a date comparison condition into the code to ignore the days you won't be trading it
or if you load enough history to get out of sync,
b) initialize the first bar to the day after the missed trading session.

WLP has been handling shortened sessions for many years. Run code mentioned in post #2 to demonstrate that WLP is aware of the Friday's session (even though its duration doesn't have to do with getting out of sync at all - rather not trading and not handling it manually).
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).