themech / ms2txt Goto Github PK
View Code? Open in Web Editor NEWLittle utility to decode Metastock files and write them in text format
Home Page: http://themech.net/2008/08/reading-metastock-files/
License: GNU General Public License v3.0
Little utility to decode Metastock files and write them in text format
Home Page: http://themech.net/2008/08/reading-metastock-files/
License: GNU General Public License v3.0
Please tell me how to do the reverse operation: make F1.DAT from csv? Thanks in advance!
Ran into an issue where some symbols cannot be processed, throwing this error:
Traceback (most recent call last):
File "/Users/kennethlimcp/Desktop/read-ms/ms2txt/metastock/files.py", line 23, in dump
self.load_columns()
File "/Users/kennethlimcp/Desktop/read-ms/ms2txt/metastock/files.py", line 46, in load_columns
assert(len(lines) == self.stock.fields)
AssertionError
Processing FTBM (fileNo 2)
('Error while converting symbol', u'FTBM')
Dumping the info gives: (8, 7, ['"DATE",0,0', '"OPEN",5,5', '"HIGH",5,5', '"LOW",5,5', '"CLOSE",5,5', '"VOL",0,0', '"OI",0,0', '\x1a'])
It seems like there is an extra column with data '\x1a'
that is causing the length assertion.
Any idea what that might be?
Will it support intraday any soon?
Hey, mech, Thanks for this amazing tool.
I'm getting this error, can you help me?
File "C:\Users\ms2txt-master\metastock\files.py", line 280, in close
if self.file_handle is not None:
AttributeError: 'MSEMasterFile' object has no attribute 'file_handle'
The following lines should be using DatFile
instead
I got this error when I try to use it
Traceback (most recent call last):
File "ms2txt/ms2txt.py", line 49, in
main()
File "ms2txt/ms2txt.py", line 40, in main
em_file = MSEMasterFile('EMASTER', options.precision)
File "/Users/aomranj/Downloads/Daily-MEC_Saudi_All-21_03_2019/ms2txt/metastock/files.py", line 259, in init
self.stocks.append(self._read_file_info(file_handle))
File "/Users/aomranj/Downloads/Daily-MEC_Saudi_All-21_03_2019/ms2txt/metastock/files.py", line 230, in _read_file_info
dfi.stock_symbol = file_handle.read(14).strip('\x00')
TypeError: a bytes-like object is required, not 'str'
I can't understand what data to pass and to which class. Can you please show us a live example? It's hard to know when you first see it. Although, I understand that we are passing data to the metastockfiles class, but which ones exactly? What is 'encoding' in parameters of metastockfiles class?
the ascii codec isn't working, I believe the problem would be either from my terminal or from data itself, maybe it has some arabic characters. Any solutions?
Error while reading the stock name. Did you specify the correct encoding?
Current encoding: ascii, error message: 'ascii' codec can't decode byte 0xc7 in position 0: ordinal not in range(128)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.