Fidelity limit doesn't place if 10% lower
Author: MustPlayOptions
Creation Date: 2/20/2020 2:28 PM
profile picture

MustPlayOptions

#1
I have a strategy I use the Quotes window for. every morning I have to watch it like a hawk and sometimes miss trades because of a Fidelity trading rule. Namely:

A limit order will produce an error if the limit price is 10% higher than the stock price (or maybe if the stock price is 10% lower)

So if a stock has bad news overnight and opens down 15%, my strategy might want to buy it, and the monitor will place the limit order, but it will produce an error.

I could just have the quote monitor convert all orders to market but I tried that and the slippage was terrible so that's not ideal.

I'm assuming there's no way, but is there a possibility of placing a market order if the price is >10% lower than the limit order automatically? This really only happens at the open but I'm tired of being tied to my computer every morning and rushing to switch errored orders to market orders hoping I don't miss my price target.

Thanks
profile picture

Eugene

#2
Have you tried the Convert to Market button in Quotes > Alerts Pane?
profile picture

MustPlayOptions

#3
Yes - but like I said that converts ALL the trades to market and the slippage is really high then.
profile picture

Cone

#4
I tried to get that changed years ago so that Fidelity would accept Wealth-Lab Pro orders even if limit or stop orders were immediately marketable - forget it, this cannot be changed.

The only thing that I can think of is to monitor premarket trading for large gaps with a quotes-like tool and manually adjust your triggers where required. Maybe fidelity.com has a tool that could alert you?

profile picture

Eugene

#5
QUOTE:
Maybe fidelity.com has a tool that could alert you?

Good idea. And in the unlikely case it doesn't there may be other sites e.g. https://www.marketwatch.com/tools/screener/premarket
profile picture

MustPlayOptions

#6
Ok, thanks for explaining. I asked the Active Trader group if they can change it too but haven't heard back.

That's a cool site thank you. I'll try that.

The only other thing I could think of but hate doing is have the quote window convert to market on the open but then stop that at 931. I still have to be at the computer though and I have to remember to change my trigger threshold from 80 to 100 pre-market then back to 80 for the limit orders.

Painful.

Thanks
profile picture

Eugene

#7
Just for fun I tried to come up with a parser for that page (70% done) but there's highly annoying anti-bot protection (captcha) that kicks in after 3 web page requests, making it nearly impossible to finish the code. Maybe later.
profile picture

Cone

#8
QUOTE:
..change my trigger threshold from 80 to 100 pre-market then back to 80 for the limit orders.
80% is a pretty low threshold. A strategy that I run bought 5 symbols yesterday triggering at 100%. 80% would have triggered more than 15 other symbols none of which would have been purchased. imho, 95% is plenty of "early warning" to get an order in place.
profile picture

MustPlayOptions

#9
Thanks. I don't mind having the extra orders. I had it at 90 and was missing several trades that barely touch my limit. I've only missed 1 trade after the open after changing it to 80.

The only drawback is that Fidelity sets aside margin for the open orders but I don't have enough triggers a day to fill my margin limit except rarely.

Thanks for trying Eugene.
profile picture

Eugene

#10
EDIT 07/02/2010: fixed crash

I got the damned thing working. MarketWatch pisses me off by banning all my IPs so I had to resort to a VPN.

REQUIREMENTS:

1. Add references to System.Core, System.Web and System.Xml on Editor's ".NET References" dialog > "NET Framework" tab. Tick the three boxes, OK the dialog, save with the Strategy.
2. WLP/D now includes HtmlAgilityPack which is required for this code to run. Previously, an installed Community Components included the library.

Notes:

1. There should be no red compiler errors at the bottom of the Editor. Otherwise the code wouldn't run. Disregard any "squiggly lines" in the code though.
2. The code runs once saving the web page to WL's global memory. Then you can run this code while WLP is running w/o risking to get caught by captcha.
3. You will see a blank PrintDebug output if the data is not actual i.e. no premarket yet.

CODE:
Please log in to see this code.
profile picture

MustPlayOptions

#11
Ok, so this will get premarket prices? Can you please explain briefly how to use it?

Thanks!
profile picture

Eugene

#12
Yes.

You must be bookmarking topics where you post? This explains the fast replies (here: 4 minutes since my post). With my posts it does not always work to reply to me instantly because I'm used to editing them several times until perfection is reached. :)

So I've added some guidelines while you were replying (see above) and guess I should add that the StockData contains the properties of a "laggard" (gap down) or "leader" (gap up). The PremarketChangePct is the key - you can filter on this property as you wish to look for symbols which gapped up/down only a certain magnitude or greater.
profile picture

MustPlayOptions

#13
This is really helpful. Thank you very much.

Nah, just had it open and walked in to check the market and saw you had replied - so lucky timing.
profile picture

Eugene

#14
Glad to help you!
profile picture

MustPlayOptions

#15
Just trying this now and got this error:

The System.Object is defined in an assembly that is not referenced. You must add a reference to the assembly 'System.Runtime, Version=4.0.0.0 etc.'

I added the references you mentioned about but System.Runtime isn't showing. Runtime.Remoting and Runtime.Serialization.Formatting.Soap show.

Any suggestions please?
profile picture

Eugene

#16
It's a well known bug since 6.9.20 but I think it's fixed in 6.9.23 beta as I don't see it there. Here's workaround for the production version 6.9.22:

WLP 6.9.20.7: New Editor has compiler error with LINQ methods, post #3
profile picture

MustPlayOptions

#17
Perfect Thank you!

That's so cool.
profile picture

Eugene

#18
Glad to help you! Good to hear it's working.
profile picture

Eugene

#19
Code in post #10 updated, crash fixed.
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).