I am trying to export fidelity data into one ascii file and the code works except when it runs into an empty data how do I check for empty data.
CODE:
Please log in to see this code.
Size:
Color:
CODE:
Please log in to see this code.
Size:
Color:
Eugene,
Tried if( Bars.Count > 0 ) but I get the following error.
Error processing symbol MLV The process cannot access the file 'D:\WLPro-Ref\ASCII\Export.csv' because it is being used by another process.
Size:
Color:
It has
nothing to do with checking for
Bars.Count.
Please don't break the working example of exporting data by moving certain code lines where they don't belong. Notice the correct code that should be executed in
single symbol mode (not as a portfolio backtest):
Exporting to ASCII comma-separated files (CSV)
Size:
Color:
Also added
if( Bars.Count <= 0 )
break;
to break out of the for loop but still get the same error.
Size:
Color:
QUOTE:
...but still get the same error.
...because the code is broken. Revert to the working code from the Wiki, adding the check for
Bars.Count.
P.S. Finally, your code dumps the whole portfolio data into a single file.
Size:
Color:
Hi
Isn't there a simple export tool to target ascii, csv, xml as output formats for any selected data set we create in this product?
Did I miss that somewhere?
If not, why not?
Thanks
Jim Mason
Size:
Color:
Hi Jim,
For ASCII/CSV, you see this easy and flexible export "tool" above:
Exporting data out of WL6 to ASCII files. It shouldn't take long to come up with an XML (Database etc.) export routine if you're motivated. But the $64K question is: what's the point of exporting data? The purpose of Wealth-Lab is rather to
import data and solve computational tasks rather than be a bridge for 3rd party programs.
Size:
Color:
Hi Eugene, the export tool creates separate files for each stock. How do I get the list in only one file just with the close price?
Thank you for help.
Best
Niels
Size:
Color:
Size:
Color:
Hi Eugene, good starting point. But the file contains only stocks from the last day, not the ones of the whole period selected.
What do I have to change?
Size:
Color:
Size:
Color:
Hi Eugene, I tried this, but it doesn't work. Still the last day of the period is exported.
CODE:
Please log in to see this code.
Where is the problem?
Size:
Color:
Hi Niels,
The problem is that your code processes just one last bar:
CODE:
Please log in to see this code.
I wonder where did you get it from. The example I pointed you at yesterday clearly demonstrates. Here's a copypaste from that page:
CODE:
Please log in to see this code.
Size:
Color:
It is working now. Thank you Eugene.
Best
Niels
Size:
Color:
Using V 6.9.24.4
I have used code shown in #4 to export data to a CSV file. Before today the snippet was producing Hourly data series ending on the hour (xx:00...a common format) for non fidelity input data series but today it exported data as open +1hr (first hour at 10:30EST...fidelity format).
I also noticed the hourly charts are also displaying fidelity format even though input data is from non fidelity sources. Previousally, I was getting hourly chart from non fidelity sources as xx:00 and fidelity as Open+1hr.
How can I export hourly data in xx:00 format (for non fidelity sources)? My current source is from MetaTrader or a CSV file.
Size:
Color:
Not sure why you'd want to export to CSV from CSV but for both ASCII and MetaTrader it depends on the source data. In other words, different vendors set different ending hour formats. You might be able to affect this via the Market Manager but continuing discussion here would be offtopic in this thread.
Size:
Color: