Is it possible to get the name of the active DataSet from within a coded strategy's code?
I find:
but
is always null.
I find:
CODE:
bars.DataSource bars.GetDataProvider().DisplayName bars.GetProvider().Name
but
CODE:
bars.GetDataProvider().DataSet
is always null.
Rename
You asked this question before, have you checked it for answers?
https://www.wealth-lab.com/Discussion/Name-of-Current-DataSet-6153
https://www.wealth-lab.com/Discussion/Name-of-Current-DataSet-6153
Use the ExecutionDataSetName property of UserStrategyBase.
That's what I meant, you answered it in Post #12 there ;-)
QUOTE:
Use the ExecutionDataSetName property of UserStrategyBase.
Well this one says:
QUOTE:
Returns the name of the DataSet that is currently being processed. If the Strategy was not executed on a DataSet (single symbol mode), returns null.
The thing is: I run in single symbol mode, so this one does not help me.
Also I have the same symbol in different DataSets (from different Providers), so simple search through all DataSets doesn't help either.
As far as I can see only WL knows which Data Provider/DataSet combination is used to produce results for the current Single Symbol run of the strategy.
So I'd suggest (#FeatureRequest) to make
CODE:
bars.GetDataProvider().DataSet
work in Single Symbol mode.
Use the bars.DataSource property then.
QUOTE:
Use the bars.DataSource property then.
Unfortunatetly this is not "good enough". I have severel DataSet from the same DataSource (HDP) and I need to know the DataDSet.
<deleted>
If it’s a single symbol backtest the data does not come from ANY DataSet. It comes from a Historical Provider.
Your Response
Post
Edit Post
Login is required