- ago
I am trying to test Building Block strategy using Open Position Count on a simple SMA strategy for a large portfolio.

Goal is limit # of open positions to <= 3.
My portfolio is the large WealthSignals.
Based on the backtest, I am presently getting 80 signals.

Can you please help.

Thank you,
Larry

Here is the Building Block screen:



0
305
Solved
12 Replies

Reply

Bookmark

Sort
- ago
#1
Check this out: https://www.wealth-lab.com/Discussion/Number-of-open-positions-across-portfolio-8899
0
- ago
#2
Eugene,

Are you saying that in order to use this Building block of "Open Position Count", you "must" also go into Strategy settings and enter Max Entry Signals?

Seems like if this is the case, that the Building Block "Open Position Count" is not working. What is this used for to not change Strategy settings?

Thank you,
Larry

0
Cone8
 ( 26.99% )
- ago
#3
You didn't say what you suspect to be problem. Only that you're getting 80 signals. What's wrong with that? Signals are not positions. (WealthLab will always generate all the signals unless you suppress them by some logic in your code.)

Aside from that, if the portfolio is large, why would you select "Multiple Positions"? This allows the strategy to open more than one position for the same symbol.
0
- ago
#4
I was also going to suggest to switch to "single position" as Cone just wondered.
0
- ago
#5
Cone,

I am getting a large number of "sell stop" signals on positions that are not held in portfolio. Also, sell market signals that have not been bought. Remember, only 5 open positions allowed.

What is the purpose of the Building Block Open Position Count. Does not seem to work unless you also specify settings in Strategy settings.

Thank you,
Larry
0
- ago
#6
QUOTE:
I am getting a large number of "sell stop" signals on positions that are not held in portfolio.

Help > Strategy settings > "Retain NSF Positions"
0
- ago
#7
Here is the strategy:

I use a large portfolio.

I want to limit maximum open positions to 5. If I have 5 open positions I don't want to see any buy signals. If I have less than 5 open positions, then the buy signals will be maximum of 4 if only 1 open position, if I have 3 open positions then a maximum of 2 buy signals. If I have 2 open positions, then maximum buy = 3 signals.

Only sell signals can be given on positions that are open.

The problem is that for Alert Signals, it is not considered which positions are open.

Can you please help.

Here are the screens:

Design Surface:



Strategy settings:


Open positions:


For signal alerts, since I already have 5 open positions, I would expect no buy signals. Instead, I see 5 buy signals.

Here is Signal screen:

0
- ago
#8
To repeat what Cone has already stressed:

(WealthLab will always generate all the signals unless you suppress them by some logic in your code.)

And let me quote the Help for you:

Strategy Settings > Max Open Settings

QUOTE:
The "Max Open" settings provide a way to backtest different Position options without the need to change your code. They are applicable in backtesting and not in live trading.
0
- ago
#9
Eugene,

Please look at the above settings in Strategy settings. Max Entry Signals is set to 5. Max open positions is set to 5.
Isn't this the settings that should be set. Otherwise, which settings are you referring to?

When you refer to live trading, are you saying that the Alerts settings can not be corrected within the settings that I already have, or other settings from the tab such as Strategy settings?

When you refer to Live Trading, are you referring to settings for Signals that give buy and sell signals?

Here is the print screen from previous answer. So I set the settings the way you said, or is there something additional. If I need to convert to "open as C# coded strategy, what is the code example for this?

Thank you,
Larry

0
- ago
#10
QUOTE:
When you refer to Live Trading, are you referring to settings for Signals that give buy and sell signals?

Hi Larry,

Yes. The "Max Open..." block is not applicable to the Signals tab. It controls historical (backtest) positions. To reiterate what Cone has said, all signals are generated.
0
Cone8
 ( 26.99% )
- ago
#11
QUOTE:
So I set the settings the way you said, or is there something additional. If I need to convert to "open as C# coded strategy, what is the code example for this?
You can use code to "remove signals", but that isn't even required. Just do this:

1. Turn on Preferences > Trading > Portfolio Sync > Live Positions
AND
2. Set up and run the Strategy in the Strategy Monitor.

This will automatically remove signals to exit Positions that aren't held in the Account.

However, you will get signals for all the symbol entries that are signaled. You just need to sort those signals by the Weight column and choose the top 5. If you have no Positions, you'd take the top 5. If you're already holding 3 Positions, you take the top 2 and ignore the rest.
0
Best Answer
- ago
#12
Cone,

Thank you,
Larry
1

Reply

Bookmark

Sort