Skip to content

Syntax and Functions

cmdtyView for Excel Functions

BCD Function

Using the following function, cmdtyView for Excel users can pull in any of the streaming quote ‘Columns’ or fields into a specified cell in a worksheet:

=cmdty.udfs.BCD(“Symbol”,“Field”)

To get the lasted trade price for front month CBOT Soybeans (“ZS * 1”) - apart from using the UI and selecting the Quotes button and then searching for and selecting the symbol in question and then the desired field - you may type in a cell =cmdty.udfs.BCD(“ZS*1”,“Last”)



A single symbol and single field can be entered through a cell refence. In the below image, A2 contains the symbol and B1 contains the field. The formual for below is as follows =cmdty.udfs.BCD(A2,B1)



Single symbol and multiple fields can be inserted by locking the rows and columns. The single symbol with multiple field reference in B2 is =BCD($A2,B$1). The $ locks the columns and rows which enables you to drag and copy the formula across multiple columns or rows. Once finished dragging, the cell(s) will automatically update with that field’s value.



The same logic as above holds true for multiple symbols and and one field. The multiple symbol and single field reference in B2 is =BCD($A2,B$1) again. Now you can click and drag the formula to the other symbols cells. Once finished dragging, the cell(s) will automatically update with that fields value.



(Note: Expressions are supported instruments when using the BCD function as long as the instrument is formatted correctly, “F={ZSN25} - {ZSX25}” as an example).

BCF Function

Similar to =BCD, the =BCF function will independently populate a list of fields or arguments that can be inserted into your spreadsheet without needing to know the arguments name. Upon entering in =BCF, you can either scroll through the list or enter in a keyword to narrow the list’s results.



Once a field is selected, the symbol you wish to populate the corresponding data for can be entered as an argument.



BCD and BCF Field and Function Names Documents

Below is a text document that contains all BCD and BCF function field names. These fields can be copied and pasted into excel to pull in data via cell reference.

cmdtyView Fields
Ask
AskSize
Bid
BidSize
Change
ChangeExt
Close
ContractDate
ExchangeName
ExpirationDate
High
Last
LastExt
LastSize
Low
Name
Open
OpenInterest
PercChgExt
Percent Change
Previous
PrevSettle
Settle
SizexAsk
SizexBid
Symbol
SymbolDescription
TickDirection
Timestamp
UnderlyingFuture
Volume
VolumeTimestamp

Below is a text document that contains all of the BCF functions. Copy and paste any of the functions into Excel (with a ‘equals sign’ prefix) to quickly pull in data into your spreadsheet.

cmdtyView Functions
BCF_Ask
BCF_AskSize
BCF_Bid
BCF_BidSize
BCF_Change
BCF_ChangeExt
BCF_Close
BCF_ContractDate
BCF_ExchangeName
BCF_ExpirationDate
BCF_High
BCF_Last
BCF_LastExt
BCF_LastSize
BCF_Low
BCF_Name
BCF_Open
BCF_OpenInterest
BCF_PercChgExt
BCF_Percent Change
BCF_Previous
BCF_PrevSettle
BCF_Settle
BCF_SizexAsk
BCF_SizexBid
BCF_Symbol
BCF_SymbolDescription
BCF_TickDirection
BCF_Timestamp
BCF_UnderlyingFuture
BCF_Volume
BCF_VolumeTimestamp


BCH Historical Date Function

Using the =BCH function, daily, weekly, monthly, quarterly and yearly historical data as of a specific date can be called directly into a single cell in your Excel spreadsheet. When keying in =BCH, you will see a list of available historical date functions.



Historical data can be entered into the cell via absolute values or cell reference. For absolute values, similar to the =BCF function, after selecting the required function you will need to enter in the symbol and a date.

=BCH_Daily_Close(“Symbol”,”Date”)



For cell reference, in the below image, A2 contains the symbol and B1 contains the field. The absolute reference is B2.



Single symbol and multiple dates can be inserted by locking the rows and columns. The single symbol with multiple date reference in B2 is =BCH_Daily_Close($A2,B$1). The $ locks the columns and rows which enables you to drag and copy the formula across multiple rows. Once finished dragging, the cell(s) will automatically update with that fields value.



The same logic as above holds true for multiple symbols and one date. The multiple symbol and single field reference in B2 is =BCH_Daily_Close($A2,B$1) again. Now you can click and drag the formula to the other symbols cells. Once finished dragging, the cell(s) will automatically update with that fields value.



(Note: Using weekly and higher aggregations will require the correct start date to properly pull in the data. Example, for last week’s weekly close, Monday’s date will have to be entered) 

Futures data as of a date can be adjusted for both the ‘nearest’ and ‘continue’ aggregations based on roll options: days to expiration and volume and open interest.



To view historical data where the underlying future rolled on expiration, enter in ‘0’. To roll the historical data based on a date prior to expiration, enter in a days to expiration value. Leave this argument blank to roll based on a combination of volume and open interest.

BCH Date Function Document

Below is a text document that contains all of the cmdtyView for Excel Historical date functions. Copy and paste any of the functions into Excel (with a ‘equals sign’ prefix) to quickly pull in data into your spreadsheet.

cmdtyView Excel Historical
BCH_Daily_Continue_Close
BCH_Daily_Continue_High
BCH_Daily_Continue_Low
BCH_Daily_Continue_Name
BCH_Daily_Continue_Open
BCH_Daily_Continue_OpenInterest
BCH_Daily_Continue_Symbol
BCH_Daily_Continue_Volume
BCH_Daily_Nearest_Close
BCH_Daily_Nearest_High
BCH_Daily_Nearest_Low
BCH_Daily_Nearest_Name
BCH_Daily_Nearest_Open
BCH_Daily_Nearest_OpenInterest
BCH_Daily_Nearest_Symbol
BCH_Daily_Nearest_Volume
BCH_Daily_Close
BCH_Daily_High
BCH_Daily_Low
BCH_Daily_Name
BCH_Daily_Open
BCH_Daily_OpenInterest
BCH_Daily_Symbol
BCH_Daily_Volume
BCH_Monthly_Continue_Close
BCH_Monthly_Continue_High
BCH_Monthly_Continue_Low
BCH_Monthly_Continue_Name
BCH_Monthly_Continue_Open
BCH_Monthly_Continue_OpenInterest
BCH_Monthly_Continue_Symbol
BCH_Monthly_Continue_Volume
BCH_Monthly_Nearest_Close
BCH_Monthly_Nearest_High
BCH_Monthly_Nearest_Low
BCH_Monthly_Nearest_Name
BCH_Monthly_Nearest_Open
BCH_Monthly_Nearest_OpenInterest
BCH_Monthly_Nearest_Symbol
BCH_Monthly_Nearest_Volume
BCH_Monthly_Close
BCH_Monthly_High
BCH_Monthly_Low
BCH_Monthly_Name
BCH_Monthly_Open
BCH_Monthly_OpenInterest
BCH_Monthly_Symbol
BCH_Monthly_Volume
BCH_Quarterly_Continue_Close
BCH_Quarterly_Continue_High
BCH_Quarterly_Continue_Low
BCH_Quarterly_Continue_Name
BCH_Quarterly_Continue_Open
BCH_Quarterly_Continue_OpenInterest
BCH_Quarterly_Continue_Symbol
BCH_Quarterly_Continue_Volume
BCH_Quarterly_Nearest_Close
BCH_Quarterly_Nearest_High
BCH_Quarterly_Nearest_Low
BCH_Quarterly_Nearest_Name
BCH_Quarterly_Nearest_Open
BCH_Quarterly_Nearest_OpenInterest
BCH_Quarterly_Nearest_Symbol
BCH_Quarterly_Nearest_Volume
BCH_Quarterly_Close
BCH_Quarterly_High
BCH_Quarterly_Low
BCH_Quarterly_Name
BCH_Quarterly_Open
BCH_Quarterly_OpenInterest
BCH_Quarterly_Symbol
BCH_Quarterly_Volume
BCH_Weekly_Continue_Close
BCH_Weekly_Continue_High
BCH_Weekly_Continue_Low
BCH_Weekly_Continue_Name
BCH_Weekly_Continue_Open
BCH_Weekly_Continue_OpenInterest
BCH_Weekly_Continue_Symbol
BCH_Weekly_Continue_Volume
BCH_Weekly_Nearest_Close
BCH_Weekly_Nearest_High
BCH_Weekly_Nearest_Low
BCH_Weekly_Nearest_Name
BCH_Weekly_Nearest_Open
BCH_Weekly_Nearest_OpenInterest
BCH_Weekly_Nearest_Symbol
BCH_Weekly_Nearest_Volume
BCH_Weekly_Close
BCH_Weekly_High
BCH_Weekly_Low
BCH_Weekly_Name
BCH_Weekly_Open
BCH_Weekly_OpenInterest
BCH_Weekly_Symbol
BCH_Weekly_Volume
BCH_Yearly_Continue_Close
BCH_Yearly_Continue_High
BCH_Yearly_Continue_Low
BCH_Yearly_Continue_Name
BCH_Yearly_Continue_Open
BCH_Yearly_Continue_OpenInterest
BCH_Yearly_Continue_Symbol
BCH_Yearly_Continue_Volume
BCH_Yearly_Nearest_Close
BCH_Yearly_Nearest_High
BCH_Yearly_Nearest_Low
BCH_Yearly_Nearest_Name
BCH_Yearly_Nearest_Open
BCH_Yearly_Nearest_OpenInterest
BCH_Yearly_Nearest_Symbol
BCH_Yearly_Nearest_Volume
BCH_Yearly_Close
BCH_Yearly_High
BCH_Yearly_Low
BCH_Yearly_Name
BCH_Yearly_Open
BCH_Yearly_OpenInterest
BCH_Yearly_Symbol
BCH_Yearly_Volume


BCT Historical Time Series Functions

Similar in syntax to the =BCH historical date function, historical time series data can be called directly into an Excel spreadsheet using the =BCT cmdtyView for Excel function. Tick, intraday, Daily, weekly, monthly, quarterly and yearly historical time series data can be queried with the =BET function.



Historical data can be entered into the cell via absolute values or cell reference. For absolute values, similar to the =BCH function, after selecting the required function you will need to enter in the symbol, field, start date and end date.

=BCT_Daily(“Symbol”,”Field”,”Start Date”,”End Date”)

(Note: Expressions are supported when using the BCT historical time series function)



For cell reference, multiple symbols and multiple fields can inserted using a range of cells. In the image below, the symbol range is A1:C1.



After the symbol range is selected, a field range can be selected. Below the field range is A2:E2.



After the symbol and field ranges are selected, enter in the start date and end date. Once the parenthesis are closed, hit enter the time series data will populate in the spreadsheet.

Historical ‘rolling’ futures data is also available through either of the nearest or continuation aggregations found in the =BCT dropdown menu.



After selecting the desired aggregation enter in the various arguments and then customize the roll options argument.



To roll the contract forward on the current contract’s expiration, enter in ‘0’. To roll the current contract forward on a date prior to expiration, enter in a days to expiration value. Leave this argument blank to roll forward based on combination of volume and open interest.

Equity time series data can be adjusted for dividends by opting to use the following arguments following the symbol, field, start date and end date:

BE_ADJ_DIVIDEND()



Sample query for dividend adjusted and non split adjusted TSLA:

=BCT_Daily(“TSLA”,“Close”,“7/1/2020”,“9/20/2020”,BE_ADJ_DIVIDEND()

Historical data by default is returned in descending order, using the Sort argument at the end of the string, data can be returned in ascending order using an “A”.



Below is a sample query for unadjusted ZC*0 data sorted in ascending order:

=BCT_Daily(“ZC*0”,“Close”,“1/1/2024”,“2/7/2024”,,“A”)

BCS Historical Study Functions

Historical study data can be called directly into a cell or spreadsheet via the BCS function. When prompted to enter the symbol argument for the =BCH or =BCT function, entering in BCS will populate a list of technical indicators. 



After selecting a study, enter in the symbol and the study periods / parameters. Once the study is customized, enclose the study data and continue entering the next arguments of the BCH or BCT function. For historical study data as of a date, use the =BCH and BCS functions together. Below is the S&P 500’s ($SPX) 20 day Hull Moving Average on from 1/1/2024 to 3/17/2025.



When calling historical study data as of a date via the =BEH function, you will need to specify the study’s output to be queried. In the example below, the MACD, MACD-Histogram and the MACD-Signal are all of the outputs of the MACD Oscillator. Only one output can be called at a time using the =BEH function. After selecting the output, enter the symbol and date and hit enter.



=cmdty.udfs.BCH_DAILY_CLOSE(cmdty.udfs.BCS_MACD(“$SPX”,12,26,9),“3/17/2024”)

(Note: leaving the Period / Parameters blank will pull in the study’s default values)

For historical study time series data, use the =BCT and BCS functions in parallel. In the example below, historical Hull Moving Average daily time series data has been called for the S&P 500 ($SPX).



BCS Study Function Documents

Below is a text document that contains all of the cmdtyView for Excel study functions. Copy and paste any of the functions into Excel to quickly pull in data into your spreadsheet.

Studies
MA - Moving Average
CSHO - Cash Overlay
CSHB - Cash Basis
MAVOL - Volume Moving Average
OSCI - Oscillator
OSCIVOL - Volume Oscillator
MAENV - Moving Average Envelope
LINRCHN - Linear Regression Channel
MAENVEXP - Moving Average Envelope Exponential
MAENVSMO - Moving Average Envelope Smoothed
MAEXP - Moving Average Exponential
MASMO - Moving Average Smoothed
MATRI - Moving Average Triangular
MAWEI - Moving Average Weighted
MAHLC - Moving Average High/Low
MACD - MACD Oscillator
MACDEXP - MACD Oscillator Exponential
VOL - Volume
OPINT - Open Interest
RSI - Relative Strength Index
RSIMOD - Relative Strength Index Modified
RSISTO - Stochastic RSI
HHLL - Highest High Lowest Low
WGCL - Weighted Close
WPERCR - Percent R
STOCHF - Stochastic, Fast
STOCHS - Stochastic, Slow
BBANDS - Bollinger Bands
BWIDTH - Bollinger Width
BPERC - Bollinger Bands %B
OBVOL - On Balance Volume
ATR - Average True Range
ADJATR - Average True Range Adjusted
COTR - Change over True Range
ADX - Average Directional Index
ADXMOD - Average Directional Index Modified
ADL - Chaikin Accumulation Distribution
ADWM - Accumulation/Distribution Williams
CHAOSC - Chaikin Oscillator
TP - Typical Price
KELCHN - Keltner Channel
KELEXP - Keltner Channel Exponential
KELBND - Keltner Bands
DONCHN - Donchian Channel
DONWIDTH - Donchian Width
PVT - Price Volume Trend
ROC - Rate Of Change
TRIX - Triple Exponential
DEMA - Moving Average Exponential 2X
TEMA - Moving Average Exponential 3X
TSI - True Strength Index
PPMOV - Pivot Points Bands
ARNUPDW - Aroon Up/Down
ARNOSC - Aroon Oscillator
TCHN - Turtle Channel
TCHRE - Turtle Channel Retracement
ALLG - Alligator
PLTLN - Plot Line
AWEOSC - Awesome Oscillator
CLV - Close Location Value
CHAMF - Chaikin Money Flow
CHAVOL - Chaikin Volatility
DPO - Detrended Price Oscillator
MCGD - McGinley Dynamic
HMA - Hull Moving Average
COPP - Coppock Curve
CCI - Commodity Channel Index
EMV - Ease Of Movement
ERBLPOW - Elder Ray Bull Power
ERBRPOW - Elder Ray Bear Power
FI - Force Index
MI - Mass Index
MOM - Momentum
MFI - Money Flow Index
MSD - Moving Standard Deviation
PCTCHG - Percent Change
NVI - Negative Volume Index
PVI - Positive Volume Index
PPO - Percentage Price Oscillator
PVO - Percentage Volume Oscillator
HV - Historical Volatility
PERF - Price Performance
WASI - Wilder Accumulative Swing Index
WWVOL - Welles Wilder Volatility
PARTP - Parabolic Time/Price (SAR)
REATRHI - Retracement ATR High
REATRLO - Retracement ATR Low
MOVLR - Moving Linear Regression
TRSP - TrendSpotter
COTLC - Commitment of Traders
COTDAG - Commitment of Traders Disaggregated
COTFTR - Commitment of Traders Financial
PIVPTS - Pivot Points
CPP - Camarilla Pivot Points
IMPVOL - Implied Volatility (Futures)
CTM - Cycle Trading Momentum
GPMI - GBE Principal Momentum Indicator
GTPI - GBE Turning Point Indicator
GMMA - Guppy Multiple Moving Average
STOMOMIX - Stochastic Momentum Index
CHDMOMOSC - Chande Momentum Oscillator
VSTOP - Volatility Stop
SUPTR - Supertrend
ICHCLD - Ichimoku Clouds
VWAP - VWAP
MACDSIG - MA vs MA Buy/Sell Signal
MASIG - Close vs MA Buy/Sell Signal
VOIN - Vortex Indicator
DIFA - Distance From Average
DOSC - Derivative Oscillator
BSQUEEZE - Bollinger Bands Squeeze
MARIB - Moving Average Ribbon
HASMO - Heikin-Ashi Smoothed
TTMSQZ - TTM Squeeze

Below is a text document that contains all of the cmdtyView for Excel study outputs or fields. Copy and paste any of the functions into Excel to quickly pull in data into your spreadsheet.

Study Fields
MA - MA-Simple
VOLMA - MA-Volume
Volume - Volume
OSC - OSC
ENVU - Envelope-Up
ENVD - Envelope-Down
LINRUP - LinRegUpper
LINRMID - LinRegMiddle
LINRLOW - LinRegLower
ENVEXPU - Envelope-Exponential-Up
ENVEXPD - Envelope-Exponential-Down
ENVSMOU - Envelope-Smoothed-Up
ENVSMOD - Envelope-Smoothed-Down
EMA - MA-Exp
SMA - MA-Smoothed
TMA - MA-Triangular
WMA - MA-Weighted
MAHI - MA-High
MALO - MA-Low
MACD - MACD
MACDS - MACD-Signal
MACDH - MACD-Histogram
MACD - MACD
MACDS - MACD-Signal
MACDH - MACD-Histogram
Volume - Volume
OpenInterest - Open Interest
OpenInterest - Open Interest
RSI - RSI
RSI - RSI
STORSI - StochRSI
HH - HighestHigh
LL - LowestLow
WGCL - WeightedClose
PercR - %R
PercK - %K
PercD - %D
PercK - %K
PercD - %D
BOLLBU - Bollinger-Upper
BOLLBM - Bollinger-Mid
BOLLBL - Bollinger-Lower
BOLLBW - Bollinger-Width
BOLLBP - Bollinger-Percent
OBVOL - OnBalanceVol
ATR - AvgTrueRange
ATRMA - MA-ATR
ADJATR - AdjAvgTrueRange
COTR - ChgOverTrueRange
MDI - -DI
PDI - +DI
ADX - ADX
MDI - -DI
PDI - +DI
ADXM - ADX-Modified
ADL - AccDist
ADWM - AccDistWill
ADWMMA - AccDistWillMovAvg
CHAOSC - ChaikinOsc
TP - TypicalPrice
KCUP - KeltChan-Up
KCMID - KeltChan-Mid
KCLOW - KeltChan-Low
KCEUP - KeltChanExp-Up
KCEMID - KeltChanExp-Mid
KCELOW - KeltChanExp-Low
KBUP - KeltBands-Up
KBMID - KeltBands-Mid
KBLOW - KeltBands-Low
DONUP - Donchian-Up
DONMID - Donchian-Mid
DONLOW - Donchian-Low
DONW - Donchian-Width
PVT - PriceVolChange
ROC - RateOfChange
TRIX - Triple-MA-Exp
DEMA - Double EMA
TEMA - Triple EMA
TSI - True Strength Index
TSISIG - True Strength Index Signal
PVPTR - PvtPt-Resistance
PVPT - PivotPoint
PVPTS - PvtPt-Support
ARNUP - Aroon-Up
ARNLOW - Aroon-Down
ARNOSC - Aroon-Osci
TCHNUP - TurtleChn-Up
TCHNLOW - TurtleChn-Low
TCHRE - TurtleChnRetrace
ALJAW - Alligator-Jaw
ALTEETH - Alligator-Teeth
ALLIPS - Alligator-Lips
PLTLN - PlotLine
AWOS - AwesomeOsc
AWOSMA - AwesomeOsc-MA
CLV - CloseLocationValue
CHAMF - ChaikinMoneyFlow
CHAVOL - ChaikinVolatility
DPO - DetrendedPriceOsc
MCGD - McGinleyDyn
HMA - HullMovAvg
COPP - CoppCurve
CCI - CommodityChannelIndex
EMV - EaseOfMovement
EMVMA - EaseOfMovementMA
ERBLPOW - ElderRayBullPow
ERBRPOW - ElderRayBearPow
FI - ForceIndex
MI - MassIndex
MOM - Momentum
MOMMA - MA-Momentum
MFI - MoneyFlowIndex
MSD - MovingStdDev
PCTCHG - PercentChange
NVI - NegativeVolIndex
NVIEMA - NegativeVolIndexEMA
PVI - PositiveVolIndex
PVIEMA - PositiveVolIndexEMA
PPO - PercPriceOsc
PPOS - PPO-Signal
PPOH - PPO-Histogram
PVO - PercVolOsc
PVOS - PVO-Signal
PVOH - PVO-Histogram
HV - HistVolatility
PERF - Performance
WASI - WilderAccSwingIndex
WWVSARD - WilderVolSarDown
WWVSARU - WilderVolSarUp
PARSARS - ParabolicSarShort
PARSARL - ParabolicSarLong
REATRHI - RetraceATRHigh
REATRLO - RetraceATRLow
MOVLR - MovingLinRegression
GMMA3 - GMMA-EMA3
GMMA5 - GMMA-EMA5
GMMA8 - GMMA-EMA8
GMMA10 - GMMA-EMA10
GMMA12 - GMMA-EMA12
GMMA15 - GMMA-EMA15
GMMA30 - GMMA-EMA30
GMMA35 - GMMA-EMA35
GMMA40 - GMMA-EMA40
GMMA45 - GMMA-EMA45
GMMA50 - GMMA-EMA50
GMMA60 - GMMA-EMA60
STOMOMIX - StochMomIndex
CHDMOMOSC - ChandeMomOsc
VSTOPUP - VolaStop-Up
VSTOPLOW - VolaStop-Down
SUPTR - Supertrend
CONVLN - ConversionLine
BASELN - BaseLine
LAGGSP - LagginSpan
LEADSP1 - LeadingSpanA
LEADSP2 - LeadingSpanB
VWAP - VWAP
VWAPSD1U - VWAP Stdev1 Upper
VWAPSD1L - VWAP Stdev1 Lower
VWAPSD2U - VWAP Stdev2 Upper
VWAPSD2L - VWAP Stdev2 Lower