There are many functions available to help you layout your grid. The table below outlines syntax that is available within the Grid.
Item | Description | Syntax & Examples |
Comment | You can enter any comment or labels within the grid. | There is no special syntax, you simply type in your message. |
Strings, Symbols & Dates |
There is a distinct different between a string (Comment), a symbol and a date. Understanding this difference will empower you to make very dynamic Grids where converting a string to a symbol is needed. |
|
|
symbol() - You can create a symbol by referencing different strings, and then make it a "symbol". This is done by using the Symbol() function. You can also create a symbol by enclosing it in single quote marks, 'symbol'. | Syntax: 'CL 1!' Syntax: =symbol(<anyStringsorReference>) Example: =symbol(#A1 + " 1!") - This would make the symbol CL 1!, if CL was in the cell A1, giving you the real-time last price for CL 1!. Example: =symbol(#A1 + " 1!").'change' - This would make the symbol CL 1!, if CL was in the cell A1, giving you real-time change for CL 1!. Example: =symbol(#A1 + " 1!").'high'-symbol(#A1 + " 1!").'low' |
|
date() - You can create a date object by referencing a string, and then make it a "date" that can be used in other functions that require a date. | Syntax: =date("<String>") Example: =date("Jan 15, 2014") Example: =date("01/15/2014") |
Cell Reference | When creating tables in the Grid you can use cell referencing to create dynamically updating Grids. A cell reference starts with a # Sign and is followed by the cell identifier Note: Current version supports only Absolute References. In a future release of FutureSource we will support both Absolute & Relative. |
Example: #A2 would refer to cell A2. |
Streaming Quote Values | A streaming quote is created by enclosing the symbol in a single quote. If no field is defined it will default to last. | Syntax: '<Symbol>' Example: 'CL 1!' |
Streaming Quote Values with field defined | A streaming quote for a field other than last is created by enclosing the symbol in single tick marks, followed by a period and then the field desired enclosed in single tick marks. | Syntax: '<Symbol>'.FIELD' Example: 'CL 1!'.'Change' For a complete list of fields available, see the Field Page. |
Expressions (Real-time Quote) | An expression is created using the same syntax that is supported within the Watchlist, Chart and other windows. The expression is started with an equal sign, and appropriate parenthesis and math operators are used. Symbols are enclosed with single tick marks. | Example: ='CL 1!'-'CL 2!' Example: =('CL 1!'+'CL 2!'+'CL 3!') /3 |
Expressions (Real-time Quote) with Cell Referencing | An expression can include cell referencing for any and all parts. When creating your expression you can type in the Cell name or use your mouse to click cell. | Example: ='CL 1!' - #A2 |
Expressions (Time Series) | An expression can also be based on time series, as well as a streaming real-time quote. This is done by defining the time series interval and then using the bars back parameter. | Daily/Weekly/Monthly Syntax: =<Interval>((Expressions)(<BarsBack>)) Intraday Syntax: =Intraday(<Interval>,(Expression)(<BarsBack)) Example with current Daily Bar: =Daily('CL 1!'.high-'CL 2!'.low) Example with previous Daily Bar: =Daily(('CL 1!'.high-'CL 2!'.low)(1)) Example with current 5Min Intraday Bar: =Intraday(5,('CL 1!'.high-'CL 2!'.low)) Example with previous 5Min Intraday Bar: =Intraday(5,('CL 1!'.high-'CL 2!'.low)(1)) |
Expressions (Real-time Quote with Real-time Chart Study) | An expression can also contain both a real-time quote and a chart study. For a complete list of studies support, see Studies Page. | Example: ='CL 1!' - Daily(MA('CL 1!',14)) This would subtract the real-time 14 day moving average from the real-time last price of the nearby Crude contract. |
Real-time Chart Study Values | A cell can contain any of our supported studies and return the current real-time value of that chart study. See the Studies Page for a complete list. | Daily/Weekly/Monthly Syntax: =<Interval>(<StudySyntax>) Intraday Syntax: =Intraday(<Interval>,(<StudySyntax>)) Example with real-time 20 Day Moving Average Price: =Daily(MA('CL 1!',20)) Example with real-time 5Min Intraday 20 Bar Moving Average Price: =Intraday(5,MA('CL 1!',20)) Note: Remember cell reference, when creating grids. The symbol or Period can reference a master cell for creating dynamic grids. |
Date Functions |
Today () - This function will allow you to put today's current date in a cell. This is very powerful when building dynamic grids with various time-series analysis that are all date and time driven. | Syntax: =Today() |
|
adddays() - This can be used to derive a new date based on a reference to another date. This can be usefull when building out tables that analyze data on a day-by-day basis. It is used to add or subtract days | Syntax: =adddays(<SomeDate>,< #ofDays>) Example of subtracting 10 days from the date held in Cell A1: =adddays(#A1,-10) Example of adding 2 days to the date held in Cell A2 =adddays(#A2,2) |
|
addmonths() - This can be used to derive a new date based on a reference to another date. This can be usefull when building out tables that analyze data on a month-by-month basis. It is used to add or subtract months | Syntax: =addmonths(<SomeDateorReference>,< #ofDays>) Example of subtracting 3 Months from the date held in Cell A1: =addmonths(#A1,-3) Example of adding 1 month to the date held in Cell A2 =addmonths(#A2,1) |
|
day() - This is used to extract an exact day of the month from a date. | Syntax: =day(<Date or Reference>) Example: =day(#A1) |
|
month() - This is used to extract the month from a date. This is useful if you want to extract the current month to perform analysis on MTD data. | Syntax: =month(<Date or Reference>) Example: =month(#A1) |
|
year() - This is used to extract the year from a date. This is useful if you want to extract the current year to perform analysis on YTD data, prior years data, etc.. | Syntax: =year(<Date or Reference>) Example: =year(#A1) |
|
date() - This is used to construct a date with supplying 3 pieces separately. | Syntax:=date(<Month>,<Day>,<Year>) Example: =date(#D21,#D22,#D23) |
Date Ranges |
There are many different ways to create a date range that can be used for time series analysis. The following functions are available. | |
|
range() - This is used to specify a point in time, a date range. There are many different ways to utilize this function, they include:
|
Syntax1: =range(<month>,<year>) Syntax2: =range("<#>d") Possible values are: d, m or y Syntax3: =range("<dateStart>-<dateEnd>") Example: =range(4,2014) - This would give you the month of April 2014 as your date range. Example: =range("15d") - This would give you the prior 15 days as your date range Example: =range("05.01.2014-05.31.2014") Example: =range(addmonths(today(),-1),today()) |
|
open() - This is a compliment to the range function, it allows you to specify a start date and no end. | Syntax: =open(<month>,<year>) Example: =open(4,2014) - This would give you a range of April 1, 2014 to present. |
Statistical |
There are numerous statistical functions available to perform additional analysis on time-series aside from normal user defined expressions. | |
|
average() - This is a popular and often used function. It will average the time series for a given range of time and bar interval. | Daily/Weekly/Monthly Syntax: =<Interval>(average(<symbol>,<range>)) Intraday Syntax: =Intraday(<Interval>,average(<symbol>,<r ange>))) Example: =Daily(average('CL 1!',range(4.2014))) This would give you the average closing price for CL 1! for the month of April 2014, using daily time series. Example: =Daily(average('CL 1!'.'high',range(4.2014))) This would give you the average daily high for CL 1! for the month of April 2014, using daily time series. Example: =daily(average(symbol(#B1),Range(month(today()),year(today())))) - This will always give you the MTD average closing price for CL 1!, for the present month, using daily time series. Example:=Daily(average('CL 1!',range("10d"))) This would give you the average closing price for CL 1! for the last 10 days, using daily time series. Example: =intraday(5,average('CL 1!',range("5d"))) - This would give you the average closing price for CL 1! for the last 5 days, using 5 minute Intraday time series. |
|
stddev() - This will give you the standard deviation for the time series for a given range of time and bar interval. | Daily/Weekly/Monthly Syntax: =<Interval>(stddev(<symbol>,<range>)) Intraday Syntax: =Intraday(<Interval>,stddev(<symbol>,<range>))) Example: =daily(stddev('CL 1!',range("10d"))) - This would give you the standard deviation over the past 10 days, using daily time series. |
|
var() - This will give you the variance for the time series for a given range of time and bar interval | Daily/Weekly/Monthly Syntax: =<Interval>(var(<symbol>,<range>)) Intraday Syntax: =Intraday(<Interval>,var(<symbol>,<range>))) Example: =daily(var('CL 1!',range("10d"))) - This would give you the variance over the past 10 days, using daily time series. |
|
min() - This will give you the minimum value (Low) for the time series for a given range of time and bar interval. | Daily/Weekly/Monthly Syntax: =<Interval>(min(<symbol>,<range>)) Intraday Syntax: =Intraday(<Interval>,min(<symbol>,<range>))) Example: =daily(min('CL 1!',range("90d"))) - This would give you the Minimum (Low) over the past 90 days, using daily time series. Example: =daily(min('CL 1!',range("90d"))).time - This would give you a date of when that low hit. |
|
max() - This will give you the maximum value (High) for the time series for a given range of time and bar interval. | Daily/Weekly/Monthly Syntax: =<Interval>(max(<symbol>,<range>)) Intraday Syntax: =Intraday(<Interval>,max(<symbol>,<range>))) Example: =daily(max('CL 1!',range("90d"))) - This would give you the Maximum (High) over the past 90 days, using daily time series. Example: =daily(max('CL 1!',range("90d"))).time - This would give you a date of when that High hit. |
|
first() - This will give you the first value (open) for the time series for a given range of time and bar interval. | Daily/Weekly/Monthly Syntax: =<Interval>(first(<symbol>,<range>)) Intraday Syntax: =Intraday(<Interval>,first(<symbol>,<range>))) Example: =daily(first('CL 1!',range("90d"))) - This would give you the first value (open) over the past 90 days, using daily time series. Example: =daily(first('CL 1!',range("90d"))).time - This would give you a date of that value. |
|
last() - This will give you the last value for the time series for a given range of time and bar interval. | Daily/Weekly/Monthly Syntax: =<Interval>(last(<symbol>,<range>)) Intraday Syntax: =Intraday(<Interval>,last(<symbol>,<range>))) Example: =daily(last('CL 1!',range("90d"))) - This would give you the last value (close) over the past 90 days, using daily time series. Example: =daily(last('CL 1!',range("90d"))).time - This would give you a date of that value. |
Time Series Values | You can pull time series data into a cell by using the val function. This function takes 3 parameters; Symbol, Date and a Fill option. You can also specifically define a time series fields. Default is close. Field options are: Open, High, Low, Close, Volume and OpenInt. | |
val() - This will give you the historical value that is specified in the parameters. | Daily/Weekly/Monthly Syntax: =<Interval>(val(<symbol>,<date>,<filloption>)) Fill Options available:
Example: =daily(val('CL 1!',#B17, N)) - This assumes a date is in cell B17 Example: =daily(val('CL 1!',date(05,03,2014),I)) Example: =daily(val('CL 1!',date("05/29/2014"),N)) Example: =daily(val('CL 1!',#B17, N)).High |
|
IF Statement | You can utilize the IF statement to check a condition to decide what data to put into a cell. The IF statement is a powerfull tool for comparing values, dates and cells to then build on the fly dynamically updated grids. | Syntax: IF(<ConditionToCheck>,<ExecuteIfTrue>,<ExecuteIfFalse> Example: =IF('CL 1!' > daily(ma('CL 1!',10)),"Last above 10d MA", "Last below 10d MA") - This would display one of two messages in the cell, based on the condition statement. Example: =IF(month('BRN 1!-ICE'.expiration = month('CL 1!'.expiration), 'CL 1!'-'BRN 1!-ICE', 'CL 2!' - 'BRN 1!-ICE') - This would check the expiration months of 2 contracts, and based on them matching, would use one expression in the cell or the other. This is useful when you have contracts that roll at different times, and you want spreads to match delivery months. Example: IF(#D71 - 1.00 > #D74, (#D71-#D74),"") - In this example 2 cells are compared, and based on outcome the cell would display a spread or display nothing. |
Set a value to a link channel | You can set a value to a link channel and refer to it in other cells and grid windows. The available link channels are the same as the colors available for symbol linking, which can be seen from the symbol linking drop down on the Grid Window. When a cell is selected or clicked, value will be set. | Syntax: Set(<LabelToDisplay>,<WhatValueToSet>,<ChannelToStoreIn>) Example: =Set("x","cl","red") |
Get a value stored in a link channel | You can get a value that has been set to a link channel | Syntax: Get(<ChanneltoRetreive> ) Example: =Get("red") |
Create a list to toggle between | You can toggle between a list of values. | Syntax: Toggle(<Comma_Sep_List>) Example: =Toggle("CL 1!","NG 1!", "BRN 1!-ICE") |
Create a list to pick between | You can create a list to select from, from the cell context menu | Syntax: Pick(<Comma_Sep_List>) Example: =Pick("CL 1!","NG 1!", "BRN 1!-ICE") |
Symbol Link | You can symbol link a cell value to another window (i.e chart, detail quote, etc) | Syntax: Link(<WhatToDisplayInCell>,<WhatToSendToLinkedWindow>,<LinkChannel>) Example: =Link(RollSpread(-Cont('brn-ice')+Cont('cl')).recent,"=RollSpread(-Cont('brn-ice')+Cont('cl'))","green") |
You can receive a symbol link value in a grid as well | Syntax: Link(<WhatChannelToDisplay> Example: =Link("green") |