Intraday Calculation Functions
Intraday Calculation Functions enable in-depth analysis of intraday market data. These functions can return basic metrics such as highs, lows, averages, and totals, as well as values relative to key events like intraday highs or lows. By combining parameters for time range, bar size, and data type, you can perform detailed intraday analysis across pre-market, regular, and after-hours sessions.
Calculation Functions
INTRADAY_MAX
Returns the maximum value of a requested data point within a specified intraday time range.
[INTRADAY_MAX(requested_data, offset_days, start_time, end_time, bar_minutes)]Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
[INTRADAY_MAX(price_high_unadj, 0, 9:30, 10:29, 1)]This example returns the highest unadjusted price from the first hour of regular hours trading.
[INTRADAY_MAX(volume_unadj, 0, 15:00, 15:59, 5)]This example returns the highest unadjusted 5-minute bar volume from the last hour of regular hours trading.
INTRADAY_MIN
Returns the minimum value of a requested data point within a specified intraday time range.
Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example returns the lowest unadjusted 15-minute bar volume across all sessions (pre-market, regular, after-hours).
This example returns the lowest unadjusted price from the first 3 hours of pre-market trading.
INTRADAY_AVG
Returns the average of a requested data point within a specified intraday time range.
Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example returns the average unadjusted volume of all 5-minute bars during pre-market trading.
INTRADAY_SUM
Returns the total of a requested data point within a specified intraday time range.
Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example returns the total unadjusted volume for the first hour of regular hours trading.
In this example, bar_minutes is set to 30, but using 1, 5, 15, or 30 will all produce the same result.
INTRADAY_FIRST
Returns the first value of a requested data point within a specified intraday time range.
Parameters
requested_data- Data point to return. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example returns the first adjusted price during pre-market trading.
This example returns the time of the first trade during pre-market trading.
INTRADAY_LAST
Returns the last value of a requested data point within a specified intraday time range.
Parameters
requested_data- Data point to return. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example returns the last adjusted price during after-hours trading.
Value at Min/Max Functions
INTRADAY_VALUE_AT_MAX
Returns the value of a requested data point for the time another data point reaches its maximum within a specified intraday time range.
Parameters
requested_data- Data point to return. This value is retrieved for the time whenmax_datareaches its maximum. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the highest price between 12 PM and 2:59 PM, then returns its time.
This example finds the 5-minute bar with the highest price between 12 PM and 2:59 PM, then returns its adjusted volume.
INTRADAY_VALUE_AT_MIN
Returns the value of a requested data point for the time another data point reaches its minimum within a specified intraday time range.
Parameters
requested_data- Data point to return. This value is retrieved for the time whenmin_datareaches its minimum. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the lowest price between 12 PM and 2:59 PM, then returns its time.
This example finds the 5-minute bar with the lowest price between 12 PM and 2:59 PM, then returns its adjusted volume.
Average Relative to Min/Max Functions
INTRADAY_AVG_BEFORE_MAX
Returns the average of a requested data point leading up to the exact time another data point reaches its maximum within a specified intraday time range.
Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the highest price during regular trading hours, then returns the average 5-minute volume for all bars that occurred before it.
INTRADAY_AVG_AFTER_MAX
Returns the average of a requested data point following the exact time another data point reaches its maximum within a specified intraday time range.
Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the highest price during regular trading hours, then returns the average 5-minute volume for all bars that occurred after it.
INTRADAY_AVG_BEFORE_MIN
Returns the average of a requested data point leading up to the exact time another data point reaches its minimum within a specified intraday time range.
Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the lowest price during regular trading hours, then returns the average 5-minute volume for all bars that occurred before it.
INTRADAY_AVG_AFTER_MIN
Returns the average of a requested data point following the exact time another data point reaches its minimum within a specified intraday time range.
Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the lowest price during regular trading hours, then returns the average 5-minute volume for all bars that occurred after it.
Sum Relative to Min/Max Functions
INTRADAY_SUM_BEFORE_MAX
Returns the total of a requested data point leading up to the exact time another data point reaches its maximum within a specified intraday time range.
Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the highest price during regular trading hours, then returns the total volume of all bars that occurred before it.
INTRADAY_SUM_AFTER_MAX
Returns the total of a requested data point following the exact time another data point reaches its maximum within a specified intraday time range.
Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the highest price during regular trading hours, then returns the total volume of all bars that occurred after it.
INTRADAY_SUM_BEFORE_MIN
Returns the total of a requested data point leading up to the exact time another data point reaches its minimum within a specified intraday time range.
Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the lowest price during regular trading hours, then returns the total volume of all bars that occurred before it.
INTRADAY_SUM_AFTER_MIN
Returns the total of a requested data point following the exact time another data point reaches its minimum within a specified intraday time range.
Parameters
offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the lowest price during regular trading hours, then returns the total volume of all bars that occurred after it.
Value at Min/Max Sequence Functions
INTRADAY_VALUE_AT_MIN_BEFORE_MAX
Returns the value of a requested data point for the time another data point reaches its minimum before a third data point reaches its maximum, within a specified intraday time range.
Parameters
requested_data- Data point to return. This value is retrieved for the time whenmin_datareaches its minimum beforemax_datareaches its maximum. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the highest price during regular trading hours, then returns the time when the lowest price occurred before that high.
This example finds the 5-minute bar with the highest price during regular trading hours, then finds the 5-minute bar with the lowest price that occurred before that high, and returns the unadjusted volume of that bar.
INTRADAY_VALUE_AT_MIN_AFTER_MAX
Returns the value of a requested data point for the time another data point reaches its minimum after a third data point reaches its maximum, within a specified intraday time range.
Parameters
requested_data- Data point to return. This value is retrieved for the time whenmin_datareaches its minimum aftermax_datareaches its maximum. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the highest price during regular trading hours, then returns the time when the lowest price occurred after that high.
This example finds the 5-minute bar with the highest price during regular trading hours, then finds the 5-minute bar with the lowest price that occurred after that high, and returns the unadjusted volume of that bar.
INTRADAY_VALUE_AT_MAX_BEFORE_MIN
Returns the value of a requested data point for the time another data point reaches its maximum before a third data point reaches its minimum, within a specified intraday time range.
Parameters
requested_data- Data point to return. This value is retrieved for the time whenmax_datareaches its maximum beforemin_datareaches its minimum. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the lowest price during regular trading hours, then returns the time when the highest price occurred before that low.
This example finds the 5-minute bar with the lowest price during regular trading hours, then finds the 5-minute bar with the highest price that occurred before that low, and returns the unadjusted volume of that bar.
INTRADAY_VALUE_AT_MAX_AFTER_MIN
Returns the value of a requested data point for the time another data point reaches its maximum after a third data point reaches its minimum, within a specified intraday time range.
Parameters
requested_data- Data point to return. This value is retrieved for the time whenmax_datareaches its maximum aftermin_datareaches its minimum. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the lowest price during regular trading hours, then returns the time when the highest price occurred after that low.
This example finds the 5-minute bar with the lowest price during regular trading hours, then finds the 5-minute bar with the highest price that occurred after that low, and returns the unadjusted volume of that bar.
INTRADAY_VALUE_AT_MAX_BEFORE_MAX
Returns the value of a requested data point for the time another data point reaches its maximum before a third data point reaches its own maximum, within a specified intraday time range.
Parameters
requested_data- Data point to return. This value is retrieved for the time whentarget_max_datareaches its maximum beforemax_datareaches its maximum. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the highest price during regular trading hours, then finds the 5-minute bar with the highest volume that occurred before that high, and returns the unadjusted volume of that bar.
volume_unadj is passed twice because it serves as both the data point used to find the maximum and the data point to return.
INTRADAY_VALUE_AT_MAX_AFTER_MAX
Returns the value of a requested data point for the time another data point reaches its maximum after a third data point reaches its own maximum, within a specified intraday time range.
Parameters
requested_data- Data point to return. This value is retrieved for the time whentarget_max_datareaches its maximum aftermax_datareaches its maximum. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the highest price during regular trading hours, then finds the 5-minute bar with the highest volume that occurred after that high, and returns the unadjusted volume of that bar.
volume_unadj is passed twice because it serves as both the data point used to find the maximum and the data point to return.
INTRADAY_VALUE_AT_MIN_BEFORE_MIN
Returns the value of a requested data point for the time another data point reaches its minimum before a third data point reaches its minimum, within a specified intraday time range.
Parameters
requested_data- Data point to return. This value is retrieved for the time whentarget_min_datareaches its minimum beforemin_datareaches its minimum. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the lowest price during regular trading hours, then finds the 5-minute bar with the lowest volume that occurred before that low, and returns the unadjusted volume of that bar.
INTRADAY_VALUE_AT_MIN_AFTER_MIN
Returns the value of a requested data point for the time another data point reaches its minimum after a third data point reaches its own minimum, within a specified intraday time range.
Parameters
requested_data- Data point to return. This value is retrieved for the time whentarget_min_datareaches its minimum aftermin_datareaches its minimum. Accepts any available intraday data point.offset_days- Number of trading days to offset from the scan date. Must be a whole number between-2,520and2,520.start_time- Start of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.end_time- End of the intraday time range to evaluate. Must be a time between4:00 AMand7:59 PM.bar_minutes- Time interval, in minutes, of each intraday bar used in the calculation. Accepts1,5,15,30,60.
This example finds the 5-minute bar with the lowest price during regular trading hours, then finds the 5-minute bar with the lowest volume that occurred after that low, and returns the unadjusted volume of that bar.
Last updated
Was this helpful?