trading in INDIA on LINUX

#11
Hi,
I finally managed to take some time in writing the scripts for downloading the nse historical and daily bhavcopies and to make the data compatible with qtstalker. Please download the tarball from the files section on this page.

I have already tested the scripts a couple of times on my easy peasy linux distro, it works perfectly well.

Please feel free to make any changes to the scripts as per your requirement.

If you make any changes you are welcome to upload them here or send them to my email address so that we could add the new changes in the forthcoming releases.

thanks,
ramakrishna surathu
email: xxxxxxxxxxxx
 
Last edited by a moderator:
#13
I am pretty sure that you could practically use qtstalker with anything as long as you have the required data in csv format, there are other formats too, but i haven't got any opportunity to look into them yet.

I am only interested in Equity and use EODs at the moment for analysis so I haven't tried to explore the live data much.

I tried yahoo's NSE EODs, then again I prefer to use the EODs from NSE, bcoz I never know how accurate the yahoo data is, that is the main reason of writing these scripts otherwise I would not have taken any trouble doing it :)

If you want to use Yahoo you could try the Scrip file with the yahoo's nse symbols that I attached here in the beginning of this thread.

I just started using 0.36, I am still a beginner with qtstalker

where did you find 0.37, i didn't find it in source forge website, the only thing i got is a source for 0.36 that when i tried to compile threw me some "head file" errors. and aborted

so i downloaded and installed the .deb packages from
http://zwets.com/debs/unstable/
 
Last edited:
#15
I encountered the following errors while feeding the data to qtstalker using dataplugin through csv mode, I checked the bhavcopies of NSE and found that they are faulty there are data consistency issues, I am presently working on filtering them in srk.

Any errors will be listed, otherwise silent.
Updating ...
EQ20000110 - - Line: 286 Bad value: Open
EQ20000110 - - Line: 998 Bad value: Open
EQ20000110 - - Line: 1460 Number of fields in file (22) != rule format (11)
EQ20000110 - - Line: 1461 Number of fields in file (0) != rule format (11)
EQ20000110 - - Line: 2002 Number of fields in file (22) != rule format (11)
EQ20000110 - - Line: 2024 Number of fields in file (0) != rule format (11)
EQ20000110 - - Line: 2774 Number of fields in file (22) != rule format (11)
EQ20000110 - - Line: 2784 Number of fields in file (0) != rule format (11)
EQ20000223 - - Line: 11 Bad value: Open
EQ20000223 - - Line: 199 Number of fields in file (22) != rule format (11)
EQ20000223 - - Line: 208 Number of fields in file (0) != rule format (11)
EQ20000223 - - Line: 716 Bad value: Open
EQ20000223 - - Line: 791 Number of fields in file (22) != rule format (11)
EQ20000223 - - Line: 801 Number of fields in file (0) != rule format (11)
EQ20000223 - - Line: 1196 Number of fields in file (22) != rule format (11)
EQ20000223 - - Line: 1206 Number of fields in file (0) != rule format (11)
EQ20000223 - - Line: 1345 Number of fields in file (22) != rule format (11)
EQ20000223 - - Line: 1355 Number of fields in file (0) != rule format (11)
EQ20000223 - - Line: 1372 Number of fields in file (22) != rule format (11)
EQ20000223 - - Line: 1382 Number of fields in file (0) != rule format (11)
EQ20000223 - - Line: 1463 Number of fields in file (22) != rule format (11)
EQ20000223 - - Line: 1464 Number of fields in file (22) != rule format (11)
EQ20000223 - - Line: 1468 Number of fields in file (0) != rule format (11)
EQ20000223 - - Line: 1480 Number of fields in file (0) != rule format (11)
EQ20000223 - - Line: 1580 Number of fields in file (22) != rule format (11)
EQ20000223 - - Line: 1590 Number of fields in file (0) != rule format (11)
EQ20000223 - - Line: 1606 Number of fields in file (22) != rule format (11)
EQ20000223 - - Line: 1616 Number of fields in file (0) != rule format (11)
EQ20000223 - - Line: 2466 Number of fields in file (22) != rule format (11)
EQ20000223 - - Line: 2476 Number of fields in file (0) != rule format (11)
EQ20000330 - - Line: 331 Bad value: Open
EQ20000330 - - Line: 392 Bad value: Open
EQ20000330 - - Line: 445 Number of fields in file (22) != rule format (11)
EQ20000330 - - Line: 455 Number of fields in file (0) != rule format (11)
EQ20000330 - - Line: 458 Number of fields in file (22) != rule format (11)
EQ20000330 - - Line: 484 Number of fields in file (22) != rule format (11)
EQ20000330 - - Line: 494 Number of fields in file (0) != rule format (11)
EQ20000330 - - Line: 498 Number of fields in file (0) != rule format (11)
EQ20000330 - - Line: 816 Number of fields in file (22) != rule format (11)
EQ20000330 - - Line: 819 Number of fields in file (0) != rule format (11)
EQ20000330 - - Line: 1179 Number of fields in file (22) != rule format (11)
EQ20000330 - - Line: 1209 Number of fields in file (0) != rule format (11)
EQ20000330 - - Line: 1479 Number of fields in file (22) != rule format (11)
EQ20000330 - - Line: 1481 Number of fields in file (0) != rule format (11)
EQ20000330 - - Line: 1482 Number of fields in file (22) != rule format (11)
EQ20000330 - - Line: 1492 Number of fields in file (0) != rule format (11)
EQ20000330 - - Line: 1752 Number of fields in file (22) != rule format (11)
EQ20000330 - - Line: 1762 Number of fields in file (0) != rule format (11)
EQ20000330 - - Line: 1945 Number of fields in file (22) != rule format (11)
EQ20000330 - - Line: 1955 Number of fields in file (0) != rule format (11)
Done 2010-12-24 03:00:33
Any errors will be listed, otherwise silent.
Updating ...
EQ20010222 - - Line: 791 Bad value: Open
EQ20010424 - - Line: 874 Bad value: Open
EQ20010426 - - Line: 541 Bad value: Open
EQ20010430 - - Line: 251 Bad value: Open
EQ20010430 - - Line: 1722 Bad value: Open
EQ20010511 - - Line: 53 Bad value: Open
EQ20010511 - - Line: 700 Bad value: Open
EQ20010511 - - Line: 1445 Number of fields in file (22) != rule format (11)
EQ20010511 - - Line: 1446 Number of fields in file (0) != rule format (11)
EQ20010511 - - Line: 1447 Number of fields in file (22) != rule format (11)
EQ20010511 - - Line: 1448 Number of fields in file (0) != rule format (11)
EQ20010511 - - Line: 1449 Number of fields in file (22) != rule format (11)
EQ20010511 - - Line: 1450 Number of fields in file (0) != rule format (11)
EQ20010511 - - Line: 1451 Number of fields in file (22) != rule format (11)
EQ20010511 - - Line: 1452 Number of fields in file (0) != rule format (11)
EQ20010511 - - Line: 1453 Number of fields in file (22) != rule format (11)
EQ20010511 - - Line: 1454 Number of fields in file (0) != rule format (11)
EQ20010511 - - Line: 1455 Number of fields in file (22) != rule format (11)
EQ20010511 - - Line: 1456 Number of fields in file (0) != rule format (11)
EQ20010511 - - Line: 1457 Number of fields in file (22) != rule format (11)
EQ20010511 - - Line: 1458 Number of fields in file (0) != rule format (11)
EQ20010511 - - Line: 1624 Bad value: Open
EQ20010511 - - Line: 2032 Bad value: Open
EQ20010511 - - Line: 2093 Bad value: Open
EQ20010511 - - Line: 2705 Bad value: Open
EQ20010511 - - Line: 2814 Bad value: Open
EQ20010511 - - Line: 3159 Number of fields in file (22) != rule format (11)
EQ20010511 - - Line: 3169 Number of fields in file (0) != rule format (11)
EQ20010511 - - Line: 4484 Bad value: Open
EQ20010511 - - Line: 5431 Number of fields in file (22) != rule format (11)
EQ20010511 - - Line: 5441 Number of fields in file (0) != rule format (11)
EQ20010514 - - Line: 601 Bad value: Open
EQ20011112 - - Line: 391 Bad value: Open
Done 2010-12-24 03:57:18
Any errors will be listed, otherwise silent.
Updating ...
EQ20020424 - - Line: 775 Bad value: Open
EQ20020424 - - Line: 1550 Bad value: Open
EQ20020925 - - Line: 591 Bad value: Open
EQ20021017 - - Line: 71 Bad value: Open
EQ20021017 - - Line: 1195 Number of fields in file (22) != rule format (11)
EQ20021017 - - Line: 1215 Number of fields in file (0) != rule format (11)
EQ20021030 - - Line: 201 Bad value: Open
EQ20021030 - - Line: 1245 Number of fields in file (22) != rule format (11)
EQ20021030 - - Line: 1255 Number of fields in file (0) != rule format (11)
EQ20021226 - - Line: 721 Bad value: Open
EQ20021227 - - Line: 730 Bad value: Open
EQ20021227 - - Line: 881 Bad value: Open
EQ20021227 - - Line: 1388 Number of fields in file (22) != rule format (11)
EQ20021227 - - Line: 1398 Number of fields in file (0) != rule format (11)
Done 2010-12-24 04:51:46
Any errors will be listed, otherwise silent.
Updating ...
EQ20030317 - - Line: 717 Bad value: Open
EQ20030512 - - Line: 696 Bad value: Open
EQ20030526 - - Line: 291 Bad value: Open
Done 2010-12-24 05:35:07
 
#16
EQ20010511 - - Line: 1445 Number of fields in file (22) != rule format (11)


This is due to an error in the NSE bhav copy itself, two lines are combined without a newline, I didn't correct this error, as there are very few errors in the whole 10 year data, i would prefer ignoring them

There are several errors in NSE bhav copy files like empty lines etc, that would anyway be ignored by qtstalker

I also added few filters in the scripts to correct bugs in srk 1.0

I will release srk 2.0 very soon, it's still in the testing phase

I haven't been hearing from anybody on this thread, I guess there are nobody other than me using linux for trading, I will close this thread once I post the new release srk 2.0.
 
#17
I have been using Qtstalker for last 5-6 month and its TA-LIB is just awesome. The only thing its lacking is live data support (even delayed will do ). I was using NSE data downloader (windows application) to get the EOD equity and future data ( 10 day intraday data from Google is also supported) . I also tried your script to download data but it doesnt go well smoothly (got error while updating in rule format same as you mentioned above )

Number of fields in file (XX) != rule format (YY)
so currently sticking with NSE data downloader

For getting Intraday data into Qtstalker I did try using google finance/yahoo finance to get data into csv format using getprice() function in google finance and chartapi data in yahoo finance.

http://chartapi.finance.yahoo.com/instrument/1.0/^nsei/chartdata;type=quote;range=1d/csv/

http://www.google.com/finance/getprices?q=.NSEI&x=NSE&i=120&p=1d&f=d,c,o,h,l,v

GOOGLE data details here

Through the above two link I am able to get data in text format. The data also update itself on refresh.

The first column of data throws UNIX time stamp in sec ( start date 1/1/1970) and the rest in as usual OHLC and volume.

I dont know how to proceed further. so I am requesting other ppl to start from here and build application so that live data in csv format can be fetched from yahoo or google and fed to Qtstalker.

The reason dont want to move to window is its very rich TA-LIB on which i have become quite comfortable.

Hoping to get some quick response.
 
#18
There are about 900 views/hits on this thread, I thank you all for the encouragements.

I am finally releasing the long pending beta version srk-2.0_beta.tar.gz

Features added in srk-2.0_beta:
- menu driven
- added functionality for NSE, India Indices data download and conversion, about 11 NSE indices added
- eliminated the bugs prevalent in srk1.0

Future Plans:
- Planning to make "srk" as a GUI Application, this would enable you to run "srk" with your mouse clicks and window interface on your Linux.

Donations:
I invested a lot of time and energy in getting all this to work, I would be glad and welcome to donations, you may contact me at [email protected]


thanks for you all once again, I wish you all have a great time ahead and happy investing

-Ramakrishna Surathu
 
#19
please give more details on getprice() chartapi

are these functions available in Qtstalker for fetching live stock quotes /intraday ?

i could not compile Qtstalker on my own directly from Source (src) available
i am only using the qtstalker version that came with my Linux OS

if i could somehow compile qtstalker then i could try checking or try getting the getprice() function into working


I got the following errors while compiling, I did install "build_essentials" but no success, I thin there are few library files/headers missing that i need to install


---------
errors
---------

rama@rama:~/sources/qtstalker-0.36$ ls
configure docs i18n lib misc pics plugin.config plugins
qtstalker-cvs-0.33.ebuild qtstalker.pro README src
rama@rama:~/sources/qtstalker-0.36$ sudo ./configure
Building Makefile...
Done
Creating national language files in i18n...
Done
Compiling existing translations...
Done
You may now 'make && make install'
rama@rama:~/sources/qtstalker-0.36$ sudo make
cd lib && qmake lib.pro "DEFINES += QT_NO_COMPAT" "CONFIG += qt" -o Makefile
cd lib && make -f Makefile
make[1]: Entering directory `/home/rama/sources/qtstalker-0.36/lib'
g++ -c -pipe -g -ffast-math -Wall -W -O0 -D_REENTRANT -fPIC
-DQT_NO_COMPAT -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT
-DQT_NO_DEBUG -I/usr/share/qt3/mkspecs/default -I.
-I/usr/local/include/ta-lib -I/usr/include/qt3 -o QuotePlugin.o
QuotePlugin.cpp
In file included from DBIndex.h:27,
from QuotePlugin.h:35,
from QuotePlugin.cpp:22:
DBBase.h:26:16: error: db.h: No such file or directory
In file included from DBIndex.h:27,
from QuotePlugin.h:35,
from QuotePlugin.cpp:22:
DBBase.h:44: error: ISO C++ forbids declaration of DB with no type
DBBase.h:44: error: expected ; before * token
make[1]: *** [QuotePlugin.o] Error 1
make[1]: Leaving directory `/home/rama/sources/qtstalker-0.36/lib'
make: *** [sub-lib] Error 2
rama@rama:~/sources/qtstalker-0.36$


------------------------------
rama@rama:~/sources/qtstalker$ sudo make
[sudo] password for rama:
cd lib && make -f Makefile
make[1]: Entering directory `/home/rama/sources/qtstalker/lib'
g++ -c -pipe -g -ffast-math -Os -Wall -W -O2 -D_REENTRANT -fPIC
-DQT_NO_COMPAT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED
-DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I.
-I/usr/include/qt3 -o QuotePlugin.o QuotePlugin.cpp
In file included from Config.h:31,
from QuotePlugin.cpp:23:
DbPlugin.h:28:16: error: db.h: No such file or directory
In file included from Config.h:31,
from QuotePlugin.cpp:23:
DbPlugin.h:95: error: ISO C++ forbids declaration of DB with no type
DbPlugin.h:95: error: expected ; before * token
make[1]: *** [QuotePlugin.o] Error 1
make[1]: Leaving directory `/home/rama/sources/qtstalker/lib'
make: *** [sub-lib] Error 2
 
#20
Dear Godrama, thanks for the efforts you have put in. I have just started with qtstalker. It is 0.32 version. I just want to know is there great difference between versions 0.32 and 0.36? Also how can I install TA-LIB.