- Desktop
- Scripting
- Formulas and Scripting Functions
- MATCHFUNFIELD() Function
MATCHFUNFIELD() Function
The MATCHFUNFIELD() scripting function allows you to reference any fundamental / data value, including text such as Sectors or Asset Class, or data imported via External Data Fields.
Examples
Section titled “Examples”If you wanted to run a scan across an entire exchange, but limit the results to just symbols that are Stocks (excluding ETFs, etc), you can add the following criteria to your script using the Asset Class field:
MATCHFUNFIELD(FEED=MA, FIELD=Asset Class, FIELDVALUE=Stock)Click on the Field option to select the required data from the data lilst, and enter Field Value:

Only codes with an Asset Class of Stock would be displayed in the scans results.

Using the example script above, only codes in the Watchlist with an Asset Class of STOCK passes the criteria.
Sector Scan
Section titled “Sector Scan”If you have Fundamental Data available on your account you can use MATCFUNFIELD() to filter for stocks in certain sectors. For example, for stocks in Health Services:
MATCHFUNFIELD(FEED=FD, FIELD=SectorName, FIELDVALUE=Health Services)
Nasdaq-only scan
Section titled “Nasdaq-only scan”To scan for only Nasdaq stocks from the US Equities exchange use the following with the market identifier MIC field and XNAS:
MATCHFUNFIELD(FEED=MA, FIELD=MIC, FIELDVALUE=XNAS)
Your privacy choices
We use cookies and similar technologies to make the site work, see how it's used, and improve it. Analytics and advertising cookies only run with your consent — see our Privacy Policy for details.