- ago
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; }
0
507
Solved
5 Replies

Reply

Bookmark

Sort
Glitch8
 ( 10.62% )
- ago
#1
Hmm there’s no simple way to do that that I can think of 🤷🏼‍♂️
0
- ago
#2
The finantic.BestData extension offers that possibility.
0
Best Answer
- ago
#3
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.
1
- ago
#4
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];
0
Glitch8
 ( 10.62% )
- ago
#5
No there’s no way to do that 🤷🏼‍♂️
0

Reply

Bookmark

Sort