- ago
Hi,

I’m getting a runtime error when testing the finantic.DynamicPortfolio extension.

Error message:
"Object reference not set to an instance of an object."

Setup details:





What happens:
When I start the backtest, the status bar shows first "Loading", then “Running Backtest…” and the dates count up as usual. Just before reaching the end of the test period, the error message appears.

Previously, I had a similar strategy that executed fine in Learning mode. However, I never managed to get any positions in Backtest mode. Now, it seems that no strategy runs at all when this Building Block is used — not even in Learning mode.

Additional observations:
- The folder WealthLabData\finantic.DynamicPortfolio remains empty — no XML or CSV files are written.
- All builds are current.
- When I remove the DynamicPortfolio block, the strategy runs without errors.

Any ideas what could cause this?
1
56
Solved
3 Replies

Reply

Bookmark

Sort
- ago
#1
Please change the "MinNumTrades" setting of the Dynamic Portfolio Block from 1 to 20.
20 is the minimum accepted for this parameter.

If you run your strategy as a C# coded strategy (after clicking "Open as C# Coded Strategy") a proper error message is shown.

I think it is a bug (of WL core) that the Building block ignores/skips/hides such an error message.
0
Best Answer
- ago
#2
I filed a #BugReport
0
- ago
#3
Thanks, DrKoch! Setting the parameter to 20 solved the problem — the strategy now executes to the end.
0

Reply

Bookmark

Sort