- ago
I created a DataSet using the DataSetProviderExtension through code, I can successfully see the DataSet in the list of DataSets, however when I want to backtest a strategy on this DataSet, it is not an option in the Portfolio Backtest -> Select DataSet Dropdown.

Also it does not seem to be overriding the name I set in the code and using the default class name.

Am I doing something wrong or missing something?

CODE:
using WealthLab.Core; using WealthLab.Data; namespace PropTrading.Shop.WL.DataSets { public class DataSetProviderExample : DataSetProviderBase { public override string Name => "TestDataSetProviderExtension"; List<DataSet> dataSets = new List<DataSet>(); DataSet highVolatilityDataSet = new DataSet() { Name="Volatile"}; public override void Initialize() { List<string> highVolatilityStocks = new List<string> { "AAPL", "MSFT", "TSLA" };//Call my API to get volatile stocks highVolatilityDataSet.Symbols.AddRange(highVolatilityStocks); //Add symbols to DataSet dataSets.Add(highVolatilityDataSet); //Add DataSet to DataSetList base.Initialize(); } public override List<DataSet> DataSets => this.dataSets; } }
0
256
Solved
6 Replies

Reply

Bookmark

Sort
- ago
#1
Try suggestion in Post #1:
https://www.wealth-lab.com/Discussion/Update-DataSets-property-in-DataSetProvider-while-WL-is-running-8173
0
Glitch8
 ( 12.08% )
- ago
#2
This seems to be a flaw, the code you provided should cause the DataSet to appear in the Strategy window selection, but it's not. I'm taking a look. It is, however, appearing in the DataSet tree for me with the correct name, what name do you see for the DataSet?

0
Glitch8
 ( 12.08% )
- ago
#3
I've got it taken care of for Build 10.

1
Best Answer
- ago
#4
@Glitch, so just to confirm it was a bug and not an issue on my codes end?

Also to answer your question about the name of the dataset in the list, it shows my classes namespace (not even the full correct one at that). I had previously created the datasetprovider without overriding the name, then added the property for name so that can be why it is not updating to the new name provided in the code?
0
Glitch8
 ( 12.08% )
- ago
#5
Yes, and can you post a screen shot of how it appears in your tree?
0
- ago
#6
0

Reply

Bookmark

Sort