Creating Filters and Columns Using Formulas
The Formula Editor allows you to build custom filters and columns using numbers, arithmetic calculations, data points, and built-in functions — similar to how formulas work in Excel. This gives you greater control over how data is filtered and displayed in your scans.
Formulas are ideal when the standard Filter Builder isn't flexible enough for your strategy. Use formulas to:
Create custom calculations and indicators
Access advanced built-in functions
Perform more complex calculations
Combine multiple data points, functions, or indicators
Syntax Rules
Unlike Excel, EdgeTracker formulas do not need to begin with an equal sign.
=Data points and functions must be surrounded by brackets.
[]Use standard arithmetic operators:
+-*/Use parentheses to group operations.
()Use comparison operators for filters:
>>=<<==!=A space is required between each element. An element includes:
Arithmetic operators
Comparison operators
Parentheses
Numbers
Functions
Data points
Example:
To scan for securities that had a gap percentage greater than 50:
Note that each element is separated by a space, as required.
Functions
The Formula Editor supports a library of predefined functions that return data points, perform calculations, or use technical indicators. This simplifies writing formulas without having to remember complex syntax. If you're familiar with Excel-style functions (e.g. =AVERAGE(A1:A10)), you'll find EdgeTracker functions similarly intuitive.
There are over 175 available functions, organized into the following categories:
Parameters
All functions, except those in the Security Information category, require at least one parameter and can be used in both filters and columns. Some functions accept up to seven parameters, depending on their complexity.
This function returns the adjusted opening price during regular trading hours. It takes one parameter:
offset_days- Number of trading days to offset from the scan date. (e.g.0for the current scan date,-1for the previous trading day)
This filter example returns securities that opened regular trading hours with an adjusted price of 10 or less.
This filter example returns securities that opened regular trading hours with an adjusted price of 10 or less on the previous trading day.
Let's take a look at a more complex function.
This function returns the intraday unadjusted VWAP for the time another data point (e.g. price, volume) reaches its maximum within a specified intraday time range. It takes six parameters:
max_data- Data point to evaluate for the maximum value. (e.g.price_high_unadj,volume_unadj).offset_days- Number of trading days to offset from the scan date. (e.g.0for the current scan date,-1for the previous trading day).start_time- Start of the intraday time range to evaluate (e.g.09:30or9:30 AM).end_time- End of the intraday time range to evaluate (e.g.15:59or3:59 PM).bar_minutes- Bar size to aggregate intraday date:15153060.anchor_time- Start time for the VWAP calculation (e.g.04:00or4:00 PM).
This column example returns the intraday unadjusted VWAP:
for the time of the highest unadjusted price
between 9:30 AM and 3:59 PM (regular trading hours)
using 5-minute bar data
calculating VWAP starting at 4:00 AM
Last updated
Was this helpful?