- ago
I created in c# both providers :
1. Historical Data Provider - read data from my broker
2. DataSetProvider - read data from SQL Server

How can I specify in Strategy settings which kind of provider data to use ?

0
562
Solved
6 Replies

Closed

Bookmark

Sort
- ago
#1
You cannot select the entity type. You just pick the DataSet - not its provider - in Strategy Settings. Optionally, tick "Obtain data from selected DataSet only". The settings will be saved with the strategy once you Save it.

P.S. To make the choice default, click "Save as Default for New Strategies".
0
- ago
#2
In which cases strategy call myDataSet.GetHistory(...) instead of myHistoricalProvider.GetHistory(...) ?

I have this question because I have more data in SQL Server that my broker can give.
0
- ago
#3
It's explained in the Help > Data Manager > Historical Providers.

All installed Historical Providers are shown in the list. You can disable a Data Provider by unchecking it. The order of Providers in the list is important. Whenever it needs historical data for a symbol, Wealth-Lab goes top down, trying each of the checked Providers in the list one by one until it finds one that can provide the required data. You can change the order of the Providers by drag and drop.
0
Cone8
 ( 4.98% )
- ago
#4
To complete the answer here, it might not be obvious that if you target a "Linked" DataSet, the linked provider is the first one used to access the data. Consequently, in your GetHistory calls, if you specify the dataSetName that is linked to your SQL provider, then that's where the data will come from (as long as the data is up-to-date).
0
- ago
#5
If I understood correctly, to have a possibility to select between "Historical" and "SQL" I have just to create two classes, one named myHistoricalDP, and second named mySqlDP. But technicaly both classe derives from DataProviderBase. The only difference first get data from my broker connexion and second from SQL DB
Is it correct ?
0
Glitch8
 ( 10.62% )
- ago
#6
Yes that’s right. As mentioned above you could then create different DataSets linked to each provider.
0
Best Answer

Closed

Bookmark

Sort