Skip to content

MATCHFUNFIELD() Function

By Optuma Team · Updated 2024-05-14

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.

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:

Capture

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

Match

Using the example script above, only codes in the Watchlist with an Asset Class of STOCK passes the criteria.

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)

Capture

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)

Capture

Choose which categories of cookies you allow. Strictly-necessary cookies are always on. You can change this any time via the "Cookie Settings" link in the footer.

  • Functional

    Remember preferences like dismissed banners and your dark-mode choice.

  • Analytics

    Help us understand how the site is used so we can improve it.

  • Marketing

    Measure our advertising and help us reach people who may be interested in Optuma.