- ago
Is it possible to get the name of the active DataSet from within a coded strategy's code?

I find:
CODE:
bars.DataSource bars.GetDataProvider().DisplayName bars.GetProvider().Name


but
CODE:
bars.GetDataProvider().DataSet

is always null.
0
289
8 Replies

Reply

Bookmark

Sort
- ago
#1
You asked this question before, have you checked it for answers?

https://www.wealth-lab.com/Discussion/Name-of-Current-DataSet-6153
0
Glitch8
 ( 8.41% )
- ago
#2
Use the ExecutionDataSetName property of UserStrategyBase.
1
- ago
#3
That's what I meant, you answered it in Post #12 there ;-)
0
- ago
#4
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.

0
Glitch8
 ( 8.41% )
- ago
#5
Use the bars.DataSource property then.
0
- ago
#6
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.
0
- ago
#7
<deleted>
0
Glitch8
 ( 8.41% )
- ago
#8
If it’s a single symbol backtest the data does not come from ANY DataSet. It comes from a Historical Provider.
0

Reply

Bookmark

Sort