Retrieve current Fidelity positions?
Author: jheffez
Creation Date: 3/11/2015 7:07 PM
profile picture

jheffez

#1
Hey Guys,

Is there any way to retrieve current Fidelity positions so that not only the strategy can make decisions based on them but also sell them?? I can't understand why it is not possible.

In lieu of the above I tried using this.SimTradeFile2 and its variants. However. It only works in Daily interval and not minutes, which is unusable to me and I'm sure to many others here. Using this.EnterAtPrice forces me also to find the exact bar that matches the entry price and I don't think it works in minutes interval either.

Please help.

Jake

profile picture

Eugene

#2
QUOTE:
Is there any way to retrieve current Fidelity positions so that not only the strategy can make decisions based on them but also sell them?? I can't understand why it is not possible.

It's not required per the Wealth-Lab design where Strategies always operate in a theoretical trading environment (User Guide > Orders > Portfolio Synch).

QUOTE:
In lieu of the above I tried using this.SimTradeFile2 and its variants. However. It only works in Daily interval and not minutes,

No, that's incorrect. SimTradeFile is format agnostic: it would accept whatever .NET format is passed to it. You could find a pointer to a guide on specifying custom date/time formats in its online manual.
profile picture

Cone

#3
SimTradeFile is good (sometimes) for analyzing past trading in Wealth-Lab, but it doesn't make sense to use it for trading live.

QUOTE:
I can't understand why it is not possible.
Anything is possible, but a "good" solution is not as easy as you think, mainly because positions end up in accounts due to discretionary trading and strategy logic can't deal with a Position that it doesn't theoretically own.

Anyway, if you want Wealth-Lab to sell your account's discretionary positions, it can do that without any problem.

1. Enable "Exit Orders (Sell and Cover) should always..." in Preferences > Trading
2. For discretionary trading, create an "Exit Script" that has your exit logic.
3. Enable Auto-Stage/Place

Here's an example for intraday. It creates a hypothetical Position on the second bar (bar #1) that simulates holding a Position in your live account. The script runs the sell logic over the bars with today's date while the [hypothetical] Position is still active. You don't have to worry about the position size, because the option in #1 above will convert the Order to have the number of shares owned by your live account when the Alert is staged in the Orders tool.

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

jheffez

#4
First, thanks for the feedback!

Still, I strongly believe that, as a Fidelity tool, it should give us the option to use current active positions. We should not need to resort to the above fixes to compensate for the thought that "it's not suppose to do that". I urge you to implement this ability.
profile picture

Cone

#5
We (MS123, third-party Wealth-Lab support) run the website and create add-ins for WLP, but we can't help with a request like this one that deals with Fidelity accounts and the WLP thick client application. You have the option to call Fidelity Active Trader support and discuss it with them, but I can assure you that the request is beyond the scope of any planned change. A bit of history...

When Fidelity purchased Wealth-Lab assets in 2004, WLP4 had the ability to synchronize with live account positions. This was removed intentionally in the Version 5 design because a large group of the customers were trying to use Wealth-Lab to trade discretionary positions - but there was no way for a strategy to synchronize with a discretionary position. Consequently, in Version 5/6 Fidelity gave them the ability that the customers wanted - the ability to use WLP to trade discretionary positions easily. The script above is not a work-around; it is the way it's designed to work.

That said, WLP strategies also trade live account positions in a hypothetical way, and it works fine except for the occasional "edge case" with limit orders (and even more rarely with stop orders). The User Guide discusses it in detail with examples in Orders > Portfolio Synch.
profile picture

boreland

#6
I want to using WLP to exit a manually entered position will the above work around script do this form me?

Will the BuyAtMarket(1); statement actually place a live order for one share?
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).