All open positions in a table?
Author: fredcbrown
Creation Date: 8/13/2018 1:57 PM
profile picture

fredcbrown

#1
Hi,

How can I export the daily accumulate open positions daily.
What I need is a table like the one in Portfolio Inspector.. but for every day, not for a selected date.

Tks
profile picture

Eugene

#2
Hi,

This is readily possible with this Performance Visualizer:

Trades+: Open/All trade lists with Priority and Multi-Column Sort

1. Install Performance Visualizers library
2. Restart WLD
3. Enable "Trades+" in Preferences > Performance Visualizers
4. Reopen Strategy window(s)

Voila.
profile picture

Cone

#3
QUOTE:
a table like the one in Portfolio Inspector.. but for every day, not for a selected date.

Trades+ will give you the current Open Positions. It sounds like you want to see the Open Positions for "every day". What would that table look like exactly?

Like this?
CODE:
Please log in to see this code.


If not, be specific.
profile picture

fredcbrown

#4
Hi,

I would like to see the Open Positions for every day not for just one day as displayed on the Portfolio Inspector.

date Symbol Quantity Profit $
date 1 AAPL 100 $1,000.00
date 1 IBM 10 $100.00
date 1 XOM -10 $50.00
date 1 TSLA 20 $10.00
date 2 AAPL -10 $(10.00)
date 2 IBM 20 $50.00
date 2 XOM 50 $100.00
date 2 TSLA 100 $1,000.00
date 3 AAPL -100 $(1,200.00)
date 3 IBM 20 $20.00
date 3 XOM 1 $-
date 3 TSLA 50 $50.00


tks

profile picture

Eugene

#5
By design, Wealth-Lab executes Strategy backtests with 1 share in Raw Profit mode and then applies a position sizing overlay. One can't get true "shares" and "profit" in a Strategy using the standard toolset only:

1. If you check out the QuickRef for Position.Shares, you're going to see that the real share size is only available to Performance Visualizers whereas your WealthScript code will always return 1 as the size while the Strategy is executing.
2. Exporting in a Portfolio Simulation mode may include trades excluded due to insufficient capital later when WL sizes positions already after your Strategy is through with processing your export.

Due to restrictions imposed by the way a portfolio simulation works, you can't get this printout from a WealthScript Strategy as intended.
profile picture

Cone

#6
It doesn't seem like a great way to look at the data. What's the purpose? How would you use it? Maybe we can come up with something else that works for you.
profile picture

KGo

#7
If you use SetShareSize() in strategy and select WealthScript Override position sizing the profit becomes available at each bar.
CODE:
Please log in to see this code.
profile picture

Eugene

#8
QUOTE:
It doesn't seem like a great way to look at the data.

+1
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).