Velocity
The Velocity rule calculates velocity and movement metrics for a series of data values over a specified time period. It provides comprehensive analysis of how values change over time, measuring speed, direction, efficiency, and distribution patterns to help identify trending behaviour, volatility, and potential reversals.
How It Works
The Velocity rule analyses a continuous stream of numeric data values over configurable time periods to calculate a wide range of velocity and movement metrics. It operates through a repeating cycle:
- Collects data values at user-defined frequencies (seconds or minutes)
- Stores values over the specified period length
- Performs calculations on the complete dataset when the period ends
- Outputs multiple velocity and movement metrics
- Resets and begins collection for the next period
The rule calculates several categories of metrics:
- Velocity: The net change from period open to close (Close Value minus Open Value), showing the overall directional movement.
- Max Velocity: The maximum range between the highest and lowest values in the period, measuring the full extent of movement.
- Efficiency Ratio: Net change divided by total movement, indicating whether the data is trending (values near 0) or choppy (values near 1).
- Average Speed and Max Speed: The mean and maximum rates of change between consecutive values, measuring the intensity of movement.
- Directional Metrics: The percentage and count of values moving up versus down, revealing the balance between bullish and bearish ticks.
- Range Analysis: The proportion of values falling within user-defined high and low ranges, identifying how much time the data spends near its extremes.
The rule supports two time period types: Second (collects data at specified second intervals) and Minute (collects data at specified minute intervals with an optional start time). You also define percentage thresholds for high and low range analysis, allowing you to customise what constitutes extreme values within each period.
Inputs
| Parameter | Description | Required | Default |
|---|---|---|---|
| Source | The numeric data source to analyse for velocity and movement metrics. This can be any numeric value such as prices, volumes, indicator values, or other numeric outputs from connected rules. | Yes | — |
| Period | The time unit over which data will be collected for velocity calculations. Choose Second for second-level intervals or Minute for minute-level intervals. | Yes | — |
| Frequency | Combined with the period, this defines the timeframe for each data collection cycle. For example, a frequency of 30 with a period of Second collects data over 30-second windows. Only shown when Period is Second. | When Period is Second | — |
| Start Time (ss) | The start time in seconds for data collection periods when using minute-based periods. This allows you to synchronise data collection with specific time points. Only shown when Period is Minute. | No | — |
| High Range % | The percentage threshold at which values are considered to be in the high range of the period’s high-to-low range. Used to calculate the High Range % and High Range Count outputs. | Yes | — |
| Low Range % | The percentage threshold at which values are considered to be in the low range of the period’s high-to-low range. Used to calculate the Low Range % and Low Range Count outputs. | Yes | — |
Outputs
| Output | Description |
|---|---|
| Velocity | The net change from the period’s opening value to the closing value (Close minus Open). Negative velocity indicates values moved lower over the period. |
| Max Velocity | The maximum range between the highest and lowest values in the period (High minus Low). A negative value indicates the maximum occurred before the minimum chronologically. |
| Efficiency Ratio | Net change divided by total movement. Values close to 0 indicate trending behaviour (mostly directional), while values close to 1 indicate choppy or sideways movement. |
| Max Velocity Ratio | Max velocity divided by total movement. Similar to the efficiency ratio but focuses on the maximum single directional move within the period. |
| Max Velocity 1:1 | The maximum change between two consecutive values in the period, representing the largest single-step movement. Negative values indicate downward movement. |
| Average Speed | The average rate of change between consecutive values in the period, calculated using absolute values regardless of direction. |
| Max Speed 1:1 | The maximum change between two consecutive values in the period, calculated using absolute values regardless of direction. |
| Up % | The percentage of values in the period that moved higher than the previous value, indicating positive momentum. |
| Up Count | The number of values in the period that moved higher than the previous value. |
| Down % | The percentage of values in the period that moved lower than the previous value, indicating negative momentum. |
| Down Count | The number of values in the period that moved lower than the previous value. |
| High Range % | The percentage of values within the user-defined high range of the period’s high-to-low range. |
| High Range Count | The number of values that fall within the user-defined high range of the period. |
| Low Range % | The percentage of values within the user-defined low range of the period’s high-to-low range. |
| Low Range Count | The number of values that fall within the user-defined low range of the period. |
| Count | The total number of values collected and analysed in the period. |
| Velocity Direction Up | Indicates whether the predominant direction (based on Up % versus Down %) is moving upward. |
| Velocity Direction Down | Indicates whether the predominant direction (based on Up % versus Down %) is moving downward. |
| Direction Up | Indicates whether the overall period direction (Close versus Open) is moving upward. |
| Direction Down | Indicates whether the overall period direction (Close versus Open) is moving downward. |
Tips
The Efficiency Ratio is one of the most powerful outputs from this rule—values near 0 suggest a strong trend (most movement is in one direction), while values near 1 suggest choppy, indecisive conditions. Use this to filter entries and avoid trading during low-efficiency periods. Combine the directional outputs (Up %, Down %, Direction Up/Down) with other rules to confirm momentum before entering a trade. The High Range and Low Range outputs are excellent for detecting when price is spending disproportionate time near session highs or lows.
Was this helpful? Let us know