Is there a simple way to create a large combined superset from several wealth-data datasets, which can then be executed with the StrategyRunner (or saved to the Datasets Folder)?
CODE:
public override void BacktestComplete() { List<string> dataSetNames = new List<string> { "NASDAQ 100", "S&P 500", "DOW 30" }; DataSet combinedDataSet = new DataSet("Combined Superset", DataSetType.UserSymbols); HashSet<string> uniqueSymbols = new HashSet<string>(); foreach (var dataSetName in dataSetNames) { DataSet sourceDataSet = WLHost.Instance.FindDataSet(dataSetName); if (sourceDataSet == null) { WriteToDebugLog($"Source DataSet '{dataSetName}' not found."); continue; } foreach (var symbol in sourceDataSet.Symbols) { if (!uniqueSymbols.Contains(symbol)) { uniqueSymbols.Add(symbol); combinedDataSet.Symbols.Add(symbol); } } } DataSetFactory.Save(combinedDataSet); WriteToDebugLog($"Combined DataSet created with {combinedDataSet.Symbols.Count} symbols."); StrategyRunner sr = new StrategyRunner(); sr.DataSet = combinedDataSet; }
Rename
Hmm there’s no simple way to do that that I can think of 🤷🏼♂️
The finantic.BestData extension offers that possibility.
QUOTE:
The finantic.BestData extension offers that possibility.
The idea is to combine the content of existing datasets and not to combine and compare existing data providers.
QUOTE:
Hmm there’s no simple way to do that that I can think of 🤷🏼♂️
Is there a way to create a combined DataSet "on-the-fly" (in-memory) and feed it into the SR at the end?
CODE:
private List<DataSet> combinedDataSet; var myDS = new DataSet { Name = "Some Name", Symbols = ["TQQQ"] }; combinedDataSet = [myDS];
No there’s no way to do that 🤷🏼♂️
Your Response
Post
Edit Post
Login is required