Daily Calculation Functions
Daily Calculation Functions allow you to aggregate or extract specific daily data points over a defined date range. These functions make it possible to calculate maximums, minimums, averages, and sums, or to retrieve a value from the exact date another data point reaches a specified extreme. By combining offsets, ranges, and targeted data points, you can perform precise historical analysis and build advanced formulas tailored to your scanning needs.
DAILY_MAX
Returns the maximum value of a requested data point within a specified date range.
[DAILY_MAX(requested_data, start_offset_days, end_offset_days)]Parameters
requested_data- Data point to evaluate for the maximum value. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
[DAILY_MAX(price_high_adj, -10, -1)]This example returns the highest adjusted price from the previous 10 trading days.
[DAILY_MAX(volume_adj, 1, 20)]This example returns the highest adjusted volume from the next 20 trading days.
DAILY_MIN
Returns the minimum value of a requested data point within a specified date range.
[DAILY_MIN(requested_data, start_offset_days, end_offset_days)]Parameters
requested_data- Data point to evaluate for the minimum value. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example returns the lowest adjusted price from the previous 10 trading days.
This example returns the lowest adjusted volume from the next 20 trading days.
DAILY_AVG
Returns the average of a requested data point within a specified date range.
Parameters
requested_data- Data point to average. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example returns the average adjusted daily volume for the previous 20 trading days.
This example returns the average dollar volume for the next 5 trading days.
DAILY_SUM
Returns the total of a requested data point within a specified date range.
Parameters
requested_data- Data point to sum. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example returns the total dollar volume for the previous 5 trading days.
This example returns the total unadjusted volume for the next 5 trading days.
DAILY_VALUE_AT_MAX
Returns the value of a requested data point for the date another data point reaches its maximum within a specified date range.
Parameters
requested_data- Data point to return. This value is retrieved for the date whenmax_datareaches its maximum. Accepts any available daily data point.max_data- Data point to evaluate for the maximum value. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example finds the date with the highest price from the previous 10 trading days and returns the adjusted total volume for that date.
This example finds the date with the highest volume from the previous 20 trading days and returns the change percentage for that date.
This example returns the date with the largest daily trading range from the next 252 trading days (about one year).
DAILY_VALUE_AT_MIN
Returns the value of a requested data point for the date another data point reaches its minimum within a specified date range.
Parameters
requested_data- Data point to return. This value is retrieved for the date whenmin_datareaches its minimum. Accepts any available daily data point.min_data- Data point to evaluate for the minimum value. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example finds the date with the lowest total volume from the previous 10 trading days, then returns the change percentage for that date.
This example finds the date with the lowest change percentage from the previous 252 trading days (about one year), then returns the time of the highest price for that date.
DAILY_VALUE_AT_MIN_BEFORE_MAX
Returns the value of a requested data point for the date another data point reaches its minimum before a third data point reaches its maximum, within a specified date range.
Parameters
requested_data- Data point to return. This value is retrieved for the date whenmin_datareaches its minimum beforemax_datareaches its maximum. Accepts any available daily data point.min_data- Data point to evaluate for the minimum value. The function finds the lowest value of this data point before the maximum value ofmax_data. Accepts any available daily data point.max_data- Data point to evaluate for the maximum value. The function finds the date this value is highest, and then looks for the minimum ofmin_dataon dates prior to that. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example finds the highest price from the previous 252 trading days (about one year), then finds the lowest price that occurred before that high, and returns the relative volume for that date.
This allows you to analyze the relative volume on the day securities reach a low before beginning an upward move.
DAILY_VALUE_AT_MIN_AFTER_MAX
Returns the value of a requested data point for the date another data point reaches its minimum after a third data point reaches its maximum, within a specified date range.
Parameters
requested_data- Data point to return. This value is retrieved for the date whenmin_datareaches its minimum aftermax_datareaches its maximum. Accepts any available daily data point.min_data- Data point to evaluate for the minimum value. The function finds the lowest value of this data point after the maximum value ofmax_data. Accepts any available daily data point.max_data- Data point to evaluate for the maximum value. The function finds the date this value is highest, and then looks for the minimum ofmin_dataon dates after that. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example finds the highest price from the previous 252 trading days (about one year), then returns the lowest price that occurred after that high.
Put simply, this identifies the lowest price after a security's 52-week high.
price_low_adj is passed twice because it serves as both the data point used to find the minimum and the data point to return.
DAILY_VALUE_AT_MAX_BEFORE_MIN
Returns the value of a requested data point for the date another data point reaches its maximum before a third data point reaches its minimum, within a specified date range.
Parameters
requested_data- Data point to return. This value is retrieved for the date whenmax_datareaches its maximum beforemin_datareaches its minimum. Accepts any available daily data point.max_data- Data point to evaluate for the maximum value. The function finds the highest value of this data point before the minimum value ofmin_data. Accepts any available daily data point.min_data- Data point to evaluate for the minimum value. The function finds the date this value is lowest, and then looks for the maximum ofmax_dataon dates before that. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example finds the lowest price from the previous 252 trading days (about one year), then returns the date when the highest price occurred before that low.
DAILY_VALUE_AT_MAX_AFTER_MIN
Returns the value of a requested data point for the date another data point reaches its maximum after a third data point reaches its minimum, within a specified date range.
Parameters
requested_data- Data point to return. This value is retrieved for the date whenmax_datareaches its maximum aftermin_datareaches its minimum. Accepts any available daily data point.max_data- Data point to evaluate for the maximum value. The function finds the highest value of this data point after the minimum value ofmin_data. Accepts any available daily data point.min_data- Data point to evaluate for the minimum value. The function finds the date this value is lowest, and then looks for the maximum ofmax_dataon dates after that. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example finds the lowest price from the previous 252 trading days (about one year), then finds the highest price that occurred after that low, and returns the adjusted volume for that date.
DAILY_VALUE_AT_MAX_BEFORE_MAX
Returns the value of a requested data point for the date another data point reaches its maximum before a third data point reaches its own maximum, within a specified date range.
Parameters
requested_data- Data point to return. This value is retrieved for the date whentarget_max_datareaches its maximum beforemax_datareaches its maximum. Accepts any available daily data point.target_max_data- Data point to evaluate for the maximum value. The function finds the highest value of this data point before the maximum value ofmax_data. Accepts any available daily data point.max_data- Data point to evaluate for the maximum value. The function finds the date this value is highest, and then looks for the maximum oftarget_max_dataon dates before that. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example finds the highest price from the previous 10 trading days, then returns the highest adjusted volume that occurred before that high.
volume_adj is passed twice because it serves as both the data point used to find the maximum and the data point to return.
DAILY_VALUE_AT_MAX_AFTER_MAX
Returns the value of a requested data point for the date another data point reaches its maximum after a third data point reaches its own maximum, within a specified date range.
Parameters
requested_data- Data point to return. This value is retrieved for the date whentarget_max_datareaches its maximum aftermax_datareaches its maximum. Accepts any available daily data point.target_max_data- Data point to evaluate for the maximum value. The function finds the highest value of this data point after the maximum value ofmax_data. Accepts any available daily data point.max_data- Data point to evaluate for the maximum value. The function finds the date this value is highest, and then looks for the maximum oftarget_max_dataon dates after that. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example finds the highest price from the previous 10 trading days, then returns the highest adjusted volume that occurred after that high.
volume_adj is passed twice because it serves as both the data point used to find the maximum and the data point to return.
DAILY_VALUE_AT_MIN_BEFORE_MIN
Returns the value of a requested data point for the date another data point reaches its minimum before a third data point reaches its own minimum, within a specified date range.
Parameters
requested_data- Data point to return. This value is retrieved for the date whentarget_min_datareaches its minimum beforemin_datareaches its minimum. Accepts any available daily data point.target_min_data- Data point to evaluate for the minimum value. The function finds the lowest value of this data point before the minimum value ofmin_data. Accepts any available daily data point.min_data- Data point to evaluate for the minimum value. The function finds the date this value is lowest, and then looks for the minimum oftarget_min_dataon dates before that. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example finds the lowest price from the previous 10 trading days, then returns the date with the lowest volume before that low.
DAILY_VALUE_AT_MIN_AFTER_MIN
Returns the value of a requested data point for the date another data point reaches its minimum after a third data point reaches its own minimum, within a specified date range.
Parameters
requested_data- Data point to return. This value is retrieved for the date whentarget_min_datareaches its minimum aftermin_datareaches its minimum. Accepts any available daily data point.target_min_data- Data point to evaluate for the minimum value. The function finds the lowest value of this data point after the minimum value ofmin_data. Accepts any available daily data point.min_data- Data point to evaluate for the minimum value. The function finds the date this value is lowest, and then looks for the minimum oftarget_min_dataon dates after that. Accepts any available daily data point.start_offset_days- Start of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.end_offset_days- End of the date range to evaluate, specified as trading days relative to the scan date. Must be a whole number between-2,520and2,520.
This example finds the lowest price from the previous 10 trading days, then finds the lowest volume that occurred after that low, and returns the change percentage for that date.
Last updated
Was this helpful?