Click here to Login

Introduction to the Grid Tool

Updated on 2016-08-23

Today, we will introduce you to the QuantShare Grid Tool and give you some examples to help you get started with this powerful tool.

One important thing to know is that this tool is available only in the Premium version (real-time version).

What is the Grid Tool?

The grid tool allows you to create tables or sheets like excel. The main advantage of this tool is its full integration with QuantShare.
As with excel, you can create formulas, calculate the sum of multiple cells, edit cells format, create conditions...
In addition, you can easily add QuantShare language formulas, C# scripts, cells that updates with real time data...

A First Example

Select "Tools -> Grid -> Grid Editor". The grid editor will open with a default and empty sheet.

- Click on the B3 cell then type something like GOOG. Press "Enter".
- Click on the B4 cell then type AAPL.
- Click on the C3 cell and enter 10
- Click on the C4 cell and enter 11

To calculate the sum of the last two cell values:
- Click on the C5 cell then type "=sum(" then move your mouse and select both C3 and C4 cells. Type the closing parenthesis ")" then Enter.

Now, let us get the real close price for each of the GOOG and AAPL stocks.

- In the C3 cell, remove the value you previously added then click on the "FX" button at the top (next to the formula editor)
- Select the "Historical" category and the "GetCloseHisto" function
- Click on the button next at the end of the "Symbol Name" line, select the B3 cell then click on "OK" in the newly opened "Select Cells" control. You can also directly type the cell name in the formula editor.
- In the "Time Frame" field, type 1 then click on "Add" (1 for daily, 7 for weekly, 31 for monthly and so on)

To perform the same operation for AAPL, we can just copy and paste the previous cell. For this, select C3 then click on the bottom/right corner, move your mouse to the C4 cell then release it. Notice how the C3 cell now gets the last close price of AAPL and how the C5 cell was updated and now reflects the sum of GOOG and AAPL close prices.

To change the cells format, select the three cells (C3, C4 and C5), then right click and select "Cell Format". Select "Number" under "Cell Type" then click on "OK".

Add Real-time data to your sheet

In the previous example, we saw how we can set up a cell to receive the last daily close price for a particular stock. Now, let us show you how to make that cell receive real time data.

- Click on the C3 cell then remove the existing formula
- Click on the "FX" button at the top
- Select "Intraday" category then "GetClose" function
- Enter "B3" next to "Symbol Name", "0" as time frame then click on "Add"
- Right click on the "C3" cell, select "DataFeed" then select a data feed

Notice how the sum calculated in the C5 cell changes each time the last price of GOOG changes


To highlight the real time cell and update its background each time a new tick is received, right click on the C3 cell then select "Conditions".
Right click on the table in the new control then select "Add Condition"
- Under "Operator" column, select "Always". We want this condition to be applied on each cell change.
- Under "Result", pick a highlight color.
- Under "Valid For", type a number (Example: 5) to specify for how long you want the cell to be highlighted.

To open this sheet in the QuantShare workspace, you need to save it first. To save your sheet, select "File -> Save".
In QuantShare, select "Tools -> Grid -> Open Grid" then select the previously saved sheet/grid.

Before saving the sheet, you may want to change the output look by using these two options:
- "View -> Show/Update Output"
- "Set Grid Size" in the tool bar under the Grid menu.

In a next post, we will show more advanced features of the Grid tool. We will show you how to create controls (buttons, combo-boxes...), how to create QS/C# formulas, how to apply them to a cell, how to create graphs, how to sort cells...

no comments (Log in)

QuantShare Blog
Search Posts

Recent Posts

Create Graphs using the Grid Tool
Posted 1269 days ago

Profile Graphs
Posted 1374 days ago

Previous Posts

Introduction to the Grid Tool
Posted 2832 days ago

Trading the Strategy Equity Curve
Posted 2969 days ago

More Posts


Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2024
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
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.