Is there a way to export historical data to a file for further analysis?
Rename
Right click on a chart, select copy price data. paste into excel.
There's also a TimeSeries.WriteToFile function that will write an ASCII formatted file to disk.
CODE:BarHistory also has a similar function, but it writes a WL binary file, which can only be read by the BarHistory read function. A third-party application would have to know how to read that binary file to read it in. I'm not sure if there's an option for BarHistory to write an ASCII formatted file (like TimeSeries has).
public override void Initialize(BarHistory bars) { RSI rsi = RSI.Series(bars.Close, 14); PlotIndicator(rsi); //Write RSI data to a file string fileName = System.IO.Path.Join(WLHost.Instance.DataFolder, "RSIData.txt"); rsi.WriteToFile(fileName); }
Thank you.
See finantic.Export extension for more advanced features like .xls files (Excel) or parquet files.
QUOTE:
See finantic.Export extension for [writing] parquet files.
I just review the design of parquet files and I really like its ability to index ("column" metadata) and compress the data. Moreover, many third-party applications such as R support it!
Having said that, I think I may use parquet files as an interchange format for getting data out of WL and into stat and numerical analysis packages like R.
Your Response
Post
Edit Post
Login is required