Click here to Login




QS Trading Software: Global Script

Updated on 2010-10-26





Script Editor
This is a tool that lets you create global scripts using CSharp or JScript.Net programming languages. These scripts have access to a lot of QuantShare tools/functions and they can be used, amongst other things, to create programs to perform or automate tasks. An example of such program is a script that creates 10 charts, update each one's formula then arrange them. Another example is a script that automatically downloads data, every single minute, for open chart's symbols and updates the chart after the download is complete.

To open this editor, select "Tools" in the menu and then click on "Script Editor". To create a new script, select "File" then "New". For each script added to this editor, a new tab is inserted.
To keep the editor on top, select "Settings then "Linked to Main Form".



Script Main Classes
As with any formula editor in QuantShare, when you type CONTROL+SPACE a list showing the available functions/classes appears.

Here is a brief description of the main classes available in the global script:
Chart: Access, create and manipulate charts. Basic actions include opening charts, moving chart windows, adding panes and formulas.
Databases: A class that permits you to load and save database's data for a given symbol.
Downloader: Open and execute a download item. Execution can be performed silently and downloader parameters can be passed by the class functions.
Global: Load, Save and Remove global variables. Once a variable is created it survives until the trading software is closed. A variable can also be accessed from another script.
ParserTool: A powerful class that allows you to parse any formula and then read the variables that belong to this formula.
Quotes: A class that allows you to access and update historical, intraday and tick data.
Symbols: If you want to programmatically add symbols, markets, indices or remove/update symbols then this class will help you.

App: This class contains four other classes:
App.Main: The main class contains functions to perform actions and retrieve data from the application. You can for example Change the active account, pause the script, get template names, read the content of the output...
App.Forms: It allows you to create simple forms.
App.Net: It allows you to download webpages and to parse them.
App.StoredVariables: This class contains the same functions as the "Global" class. The difference lies in the fact that here, the variables are stored on the hard drive and therefore variables persist even after the application is closed.

Here is a simple script that opens a new chart:
Charts.OpenChart("GOOG", "", "");

Once your program is completed, you can run it by clicking on the "Execute" button on the top. During program run, the button will show "Stop".

Bookmark Panel
The bookmark panel is a button/folder container that is located under the drawing buttons. It contains folders and shortcuts of trading objects. You can directly create folders and shortcuts by right clicking on the panel.

In the Script Editor, you can add the current script to the bookmark panel by selecting "Settings" then "Add Current Script to Bookmark Panel". Once your script is in the bookmark panel, right click on it to display a menu and double click on it to execute the script (The button will turn Red during script run).











no comments (Log in)

QuantShare Blog
QuantShare
Search Posts




QuantShare
Recent Posts

Lock, Link and Undock your Charts
Posted 474 days ago

QuantShare
Previous Posts

QS Trading Software: Global Script
Posted 3250 days ago

Stock Market Prediction
Posted 3278 days ago

How to search for a trading item
Posted 3299 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 2019 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.