I like to export economic data out of WL to a csv file so I can use it in excel. Is there way of doing this? TIA
Size:
Color:
.NET would be pretty deficient if there weren't a way to save data to a file! ;)
Check out the
WL5Wiki Knowledge Base, search the page for
ASCII.
Size:
Color:
thanks Robert. I played around with a it. I was able to export data from datasets. However, There is no dataset for economic indicators. It seems that they are all in a symbol called "NonSymbol.wlf". I am not sure how to export data from this file. I am using the following code to export data. Also it only outputs seven data points. I thought this line of code "for(int bar = 0; bar < Bars.Count; bar++)" checks for the number of bars in each ticker and then export the results to a csv file.
CODE:
Please log in to see this code.
Size:
Color:
See the example for FundamentalDataItems to get an idea how to export fundamental data.
Size:
Color:
I can not find the example you are referring to. Would you please provide the link.
Size:
Color:
QuickRef - F11
Size:
Color:
I have not been able to figure out how to export economic data to csv files. If it is not too much trouble, would you please provide me with the code?
Size:
Color:
Why are you doing this? How will the data be consumed?
I don't want to work on a solution that will have to be reworked because I didn't do it right the first time.
Size:
Color:
I want to do some analysis in excel. With new programs I verfiy my in excel. Your help would be much appreciated.
Size:
Color:
Don't forget to create the VB reference identified in the comments -
CODE:
Please log in to see this code.
Size:
Color:
2 fastrade:
btw, InputBox is already repackaged as
Input (to match WL4's name) in
Community.Components. Considering this extension has lots of fun stuff, you might want to consider an alternative to adding Microsoft.VisualBasic to your references:
1. Add -
CODE:
Please log in to see this code.
2. Change -
CODE:
Please log in to see this code.
with
CODE:
Please log in to see this code.
Size:
Color:
thanks a million guys.
Size:
Color:
all data points were exported correctly except for "intial jobless claims" which I get the follwing error message:
Error exporting intial jobless claims
System.NullReferenceException: Object reference not set to an instance of an object.
at WealthLab.Strategies.ExportEconomicIndicators.Execute()
Size:
Color:
That's because it was spelled wrong in the string array. intial -> initial
Corrected above.
Size:
Color:
I used the example script in WL5Wiki Knowledge Base for exporting 1 minute data to csv, but I was able to export only part of the data. For ZION, there were 485708 bars in the data, but only 2727 bars were exported. Checked the number using the following, which also gave a number 2727. Any ideas?
CODE:
Please log in to see this code.
Size:
Color:
Data export depends on the loaded data range. Have you chosen "All data" to export all available data?
Size:
Color:
Still learning the script language, not sure where to find reference of the defined objects in WL. I used the following from wiki. Any places I could specific the data range?
Size:
Color:
Here I mean Wealth-Lab's own data loading control. Please refer to the Wealth-Lab User Guide, Reference > Data Panel > Data Range Control.
P.S. When posting code, please paste it in between a pair of CODE tags (next to IMG, QUOTE etc.)
Size:
Color:
Thanks, it works!
Size:
Color:
Is it possible to do the data exporting in a ticker-by-ticker fasion? For 1 minute data, data sizes are large, WL always tries to bring the data of all tickers of a data set into memory. Is it possible to read data of one ticker, export the data of this ticker, clear the data in memory, then proceed to the next?
Size:
Color:
The Wiki code for
Exporting to ASCII comma-separated files (CSV) was just designed to be run in single symbol mode, thereby processing data in a ticker by ticker fashion. If you were trying to run it in Portfolio Simulation mode, then WL's behavior was just like you said. In other words, you need to click a symbol in the Data Tree for that strategy to work w/o loading all data to memory.
Size:
Color:
kettle, would mind posting the code that you are using to export tick data? TIA
Size:
Color:
Which data vendor are you using to get tick data? Probably it's not in ASCII, or you wouldn't want to export it to ASCII ;) Fidelity doesn't have it. Otherwise, the Wiki code should do fine for that purpose.
Size:
Color:
I am using Fidelity. I thought fideliy provided tick data regardsless of the timeframe one chooses. My data is stored in 1 minute bars.
Size:
Color:
1-minute bars is the minimum time scale Fidelity data can be exported.
Size:
Color:
Clarifying: Fidelity Streaming builds new bars using ticks, but these data are stored in the chart's scale, which is then what you're able to export.
Size:
Color:
I get a 'System.OutOfMemoryException' when I run the following code. Do you why?
CODE:
Please log in to see this code.
Size:
Color:
QUOTE:
I get a 'System.OutOfMemoryException' when I run the following code. Do you why?
No, because we don't have anything from this checklist >>
How to report a Problem? . Although guess-work can be fun, we could help you better knowing the number of symbols, bars loaded and how do you run it (multi-symbol backtest mode vs. single symbol). Currently, my educated guess is that you're trying to execute this code -- designed to be run in single symbol mode (see the User Guide for difference) -- as a portfolio backtest.
Additionally, see the Wealth-Lab 5 Wiki FAQ:
Out of memory problems.P.S. When posting code, please hit the CODE button and paste code in between.
Bold Italic Underline LINK QUOTE
CODE IMG
Click "Edit" near the end of your message, select the code, click "CODE" and apply changes by clicking the green "Edit" button. Thank you.
Size:
Color: