Lowest Price
The Lowest Price rule tracks and captures the lowest price from a stream of incoming price data. It continuously monitors price inputs and maintains a record of the minimum price reached, enabling your strategies to make decisions based on trough price levels within a specified lookback window or across the entire data history.
How It Works
The Lowest Price rule continuously processes a stream of price inputs and identifies the lowest price value among them. It operates in two modes based on the lookback period setting:
- Unlimited Lookback (All-Time Low): When the lookback period is set to 0, the rule tracks the lowest price across all historical inputs, creating a running minimum that only decreases when new lower prices are received. This is useful for tracking the absolute lowest value since the strategy began.
- Limited Lookback (Rolling Window): When the lookback period is set to a specific number (for example, 10), the rule only considers the most recent 10 price inputs when determining the lowest value, creating a sliding window of price analysis. As older values fall outside the window, the lowest price may increase if those older values held the previous minimum.
The rule provides two configurable execution options that control when and how frequently it fires:
Execute on Changes Only: When enabled, the rule only outputs a result when the lowest price within the lookback period changes. This prevents unnecessary downstream rule executions when the lowest price remains stable. When disabled, the rule outputs the current lowest price on every input regardless of whether it has changed.
Latest Price is Lowest: When enabled, the rule only executes if the most recently received price is the lowest in the lookback period, making it ideal for triggering actions only when new price lows are reached. When disabled, the rule executes whenever the lowest price changes, regardless of whether the change was caused by the latest input or by an old value falling out of the lookback window.
This rule is particularly useful for breakdown strategies, support level detection, trailing stop calculations from lows, and any strategy that needs to respond when prices reach new lows within a specific period.
Inputs
| Parameter | Description | Required | Default |
|---|---|---|---|
| Price | The latest price input to be compared with previous prices to determine the lowest price. This is the new price value that gets added to the analysis on each evaluation. | Yes | — |
| Lookback Period | The number of recent price inputs to consider when determining the lowest price. Set to 0 for unlimited lookback (all-time low), or a positive number for a rolling window. For example, a value of 5 considers only the most recent 5 price inputs. | No | 0 |
| Latest Price is Lowest | Controls when the rule executes. When true, the rule only fires if the most recently received price is the lowest in the lookback period. When false, the rule fires whenever the lowest price changes for any reason. | Yes | true |
| Execute on Changes Only | Controls execution frequency. When true, the rule only fires when the lowest price in the lookback period changes. When false, the rule fires on every price input even if the lowest price has not changed. | Yes | true |
Outputs
| Output | Description |
|---|---|
| Lowest Price | The lowest price value identified within the specified lookback period based on the configured criteria. This value updates as new lows are reached or as old lows fall outside the rolling window. |
Tips
Use an unlimited lookback (period 0) when you need to track the absolute lowest price since the strategy started—useful for calculating how far price has rallied from its low. Use a limited lookback when you need a rolling low, such as tracking the lowest price over the last 20 data points for dynamic support levels. Pair this rule with the Highest Price rule to create a dynamic price range or channel for your strategy.
Was this helpful? Let us know