Click here to Login




How to create custom databases in your trading software

Updated on 2010-03-30





Usually, trading software programs offer a single database, the quotes database, which stores securities quotes. Few of them, allows you to access external databases from within the application and the trading software's programming language.

QuantShare offers you a way to easily create as many custom databases as you want. These databases can be used to store any kind of data; it can contain numeric or text data, historical or intraday data. You can store fundamental data and ratios, stock news, short selling data, put-call ratios, options data, economic releases...

How to create a custom database in your trading software:
To create a new database, you will have to open the database editor form. To do so, click on "Data" in the main menu, and then click on "Edit databases". Select "Manage databases" tab. In the new tab, and inside the "Create a new custom database" panel, type in a database's name and select the database's type. You can choose whether the database you are about to create is an intraday or historical database. Clicking on the "Add a new custom database" button instructs the trading software to create the database.

Once the database is created, switch to the "Databases" tab to create new fields and display database data. Select "Custom", then select the previously created database. Here you will get information such as the creation date, the last database update, the database type and the downloader that is associated with the database if any (When a downloader or download item creates a custom database, the trading software automatically associates this database with the downloader).
Within this tab, you can create new fields, remove old fields and update fields' data.

There five type of fields you can create:
Byte: This field accepts numeric values comprised between 0 and +255 (1 byte).
SmallFloat: Accepts numeric values comprised between -300 and +300 (2 bytes).
Float: Accepts float type numbers (4 bytes) and allows you to store large numbers.
Double: Accepts double type numbers (8 bytes) and allows you to store very large numbers.
String: This field accepts text data. It can be used to store stock news for example.

If the numbers you are storing are always comprised between 0 and 255. It is preferable to use a "byte" field than a "double" field, mainly because the "byte" field takes 8 times less memory and disk space and it is loaded faster by the trading software.

How to add data in your trading software database:
There are several ways to add data in custom databases. You can add data manually using the "Database Editor". In the trading software main menu, click on "Data" then "Edit databases". Select your database and a ticker symbol then right click on the grid, select "Add row" and then double-click on the appropriate cells to update the field's values. Do not forget to click on "Save" once done.

If you have a CSV, or Text file that contains data and you would like to use this data to populate your database, then the "ASCII Import" plug-in is the right tool to use. This plug-in is located in the "Data" menu.

Another way to import data in a database is to use the "Downloader" plug-in. As with the "ASCII Import", this plug-in parses the content and stores the parsed data in a quote and/or custom databases. However, instead of reading the content from a file, the "Downloader" plug-in gets the data from a URL (It could be a CSV, HTML, TEXT, RSS, EXCEL or ZIP stream).

Advanced traders can use the scripting language, offered by this trading software, to insert, read and update database's data. You can create scripts by clicking on "Tools" then "Script Editor". For those who have some programming skills, the rest is rather simple. Note: Use the CTRL+SPACE shortcut to display the list of available variables.











no comments (Log in)

QuantShare Blog
QuantShare
Search Posts




QuantShare
Recent Posts

Create Graphs using the Grid Tool
Posted 1467 days ago

Profile Graphs
Posted 1572 days ago

QuantShare
Previous Posts

Short Index - Part 2
Posted 5396 days ago

Short Index - Part 1
Posted 5403 days ago

Historical Market Data
Posted 5424 days ago

Historical volatility estimators
Posted 5437 days ago

Short Selling Stocks
Posted 5445 days ago

Stock split & dividend
Posted 5451 days ago


More Posts

Back







QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.