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 ?
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 ?
Rename
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".
P.S. To make the choice default, click "Save as Default for New Strategies".
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.
I have this question because I have more data in SQL Server that my broker can give.
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.
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.
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).
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 ?
Is it correct ?
Yes that’s right. As mentioned above you could then create different DataSets linked to each provider.
Your Response
Post
Edit Post
Login is required