Hello - I am in the process of trying to determine if it is possible to store(and potentially retrieve) certain values in SQL server database(or any other database) for further statistical analysis. Has any one done it using Power Language by using any external dll's or other means? I can think of c++ external dll based solution for this but not good at making these external dll's. Wondering if anyone has done this kind of work in the past.
Thanks
Storing critical values in database
Re: Storing critical values in database
Not done but have thought about it 1 year ago. Then gave-up because MC is not fit to do that "easily" (but MC is not alone in this case).
For what I know, this would probably requires at least:
1) an API for accessing data stored in MC databases
2) another language than EL
For 1), I do not know if TS Support allows it.
For 2), we can hope that it may be easier with MultiCharts.NET
I also remember another third-party "link" between TS & an SQL DB : DBTrader, but never tried it, and probably not working with MultiCharts.
An OO language is really missing...
For what I know, this would probably requires at least:
1) an API for accessing data stored in MC databases
2) another language than EL
For 1), I do not know if TS Support allows it.
For 2), we can hope that it may be easier with MultiCharts.NET
I also remember another third-party "link" between TS & an SQL DB : DBTrader, but never tried it, and probably not working with MultiCharts.
An OO language is really missing...
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Storing critical values in database
I would imagine this would be fairly easy to implement in MC.net.
Re: Storing critical values in database
Not an expert, but if I had this project, I would look to use a CSV text file. Look in ELCollection on how to manage file with MC.Hello - I am in the process of trying to determine if it is possible to store(and potentially retrieve) certain values in SQL server database(or any other database) for further statistical analysis. Has any one done it using Power Language by using any external dll's or other means? I can think of c++ external dll based solution for this but not good at making these external dll's. Wondering if anyone has done this kind of work in the past.
Thanks
Good luck
Martin
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Storing critical values in database
It can be done.Hello - I am in the process of trying to determine if it is possible to store(and potentially retrieve) certain values in SQL server database(or any other database) for further statistical analysis. Has any one done it using Power Language by using any external dll's or other means? I can think of c++ external dll based solution for this but not good at making these external dll's. Wondering if anyone has done this kind of work in the past.
Thanks
The database architecture and its complexity depends on a few variables:
1. how much data? 20 data fields per second? 5 per hour?
2. how do you want to retrieve the saved data? during RTH for real time analysis? or offline EOD?
3. how often do you need to retrieve the data? in real time once per second? or excel crunching over the weekend?
if you simply want a set of data (indicator value included) for offline excel analysis, you can export the data anytime at the end of the day. No special tools or programming is needed.
Files > Export data
if you want read and write capabilities, then it will require a bit more work.
Re: Storing critical values in database
TJ - Thanks for the reply. Here are the details.
1. how much data? 20 data fields per second? 5 per hour?
- the number of records expected are around 50 per day per instrument and total of less than 10 instruments. Each row would have only date/time/price values/short string values. The idea here is to collect this data from various sources and store them in database(central place) - where there would be external program that would be crunching the numbers and would generate the summary data realtime based on the data that is being stored by various sources.
2. how do you want to retrieve the saved data? during RTH for real time analysis? or offline EOD?
- whatever the data being "processed" externally and stored in the database would be fetched back into the MC and represented either through text file on the chart or S/R lines or some other means ( data presentation).
3. how often do you need to retrieve the data? in real time once per second? or excel crunching over the weekend?
- This would be done real time - but data would be fetched at the end of each bar ( theoritically every 5 minutes or so data fetch would happen). The number crunching would happen by external means operating on the collective data that is being populated by various sources.
Please note that I currently use ELC/ADE based solutions but finding it difficult to use MC platform from all aspects ( can't replay the entire market/ no level 2 replay / no trade simulation during replay etc along with many limitations with automated trading ). As I am comfortable with easy language and have spent significant time in building something for myself - wanted to continue use MC/TS for easy language but order execution etc wanted to use something else.
Thanks
1. how much data? 20 data fields per second? 5 per hour?
- the number of records expected are around 50 per day per instrument and total of less than 10 instruments. Each row would have only date/time/price values/short string values. The idea here is to collect this data from various sources and store them in database(central place) - where there would be external program that would be crunching the numbers and would generate the summary data realtime based on the data that is being stored by various sources.
2. how do you want to retrieve the saved data? during RTH for real time analysis? or offline EOD?
- whatever the data being "processed" externally and stored in the database would be fetched back into the MC and represented either through text file on the chart or S/R lines or some other means ( data presentation).
3. how often do you need to retrieve the data? in real time once per second? or excel crunching over the weekend?
- This would be done real time - but data would be fetched at the end of each bar ( theoritically every 5 minutes or so data fetch would happen). The number crunching would happen by external means operating on the collective data that is being populated by various sources.
Please note that I currently use ELC/ADE based solutions but finding it difficult to use MC platform from all aspects ( can't replay the entire market/ no level 2 replay / no trade simulation during replay etc along with many limitations with automated trading ). As I am comfortable with easy language and have spent significant time in building something for myself - wanted to continue use MC/TS for easy language but order execution etc wanted to use something else.
Thanks
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Storing critical values in database
You can use PRINT keyword to output variable values to a text file,Thanks TJ.
Well at this point of time - I am only looking for a way to store the indicator output to database from MC
Thanks.
your database software can then read from the text file.