Price Data
Access real-time price data as ticks or candles for any supported financial instrument. The Price Data rule is the primary data source for most strategies, providing Bid, Ask, Mid, and Spread values along with full OHLC candle data, body range metrics, derived price calculations (HL2, HLC3, HLOC4, HLCC4) for each price source, and complete candle objects. It supports configurable periods, frequencies, candle start times, anchor points, trading sessions, offsets, imputation, and time-of-day range filtering to deliver exactly the data your strategy needs.
How It Works
The Price Data rule streams price information for a specified financial instrument and delivers updates to downstream rules. It operates in one of two modes depending on the Period setting:
- Tick mode — Delivers every individual price update as it arrives from the market, providing the most current bid and ask prices along with the spread. This is ideal for scalping strategies or precise entry timing that require the highest resolution of price data.
- Candle mode — Aggregates tick data into candles of the specified period (Second, Minute, Hour, or Day). Each candle provides Open, High, Low, and Close values for Bid, Ask, and Mid price sources, along with body range metrics and derived calculations. This is the most common mode for technical analysis strategies.
The Frequency setting controls how often candles are created. For example, a Frequency of 5 with a Period of Minute creates a new candle every 5 minutes. The frequency is hidden when the Period is set to Day.
For candle mode, you can fine-tune when candles start within each period using the Candle Start settings. Minute periods allow you to specify the starting seconds (ss), Hour periods allow minutes and seconds (mm:ss), and Day periods offer either custom start/end times (hh:mm:ss) or predefined trading session times.
The Anchor Type determines the daily reset point for candle generation. You can anchor to a custom time (the first candle of the day generates at your specified timestamp) or to the first trading session of the day as published by the selected broker.
The Period Offset parameter allows you to access historical candle values. An offset of 1 returns the most recently closed candle, 2 returns the candle before that, and so on. For ticks, an offset of 0 outputs the latest tick data, but for candles an offset of 0 means the rule waits for the current candle to complete before executing.
When Imputed is enabled, the rule fills gaps in the data (such as periods with no trading activity) by carrying forward the last known values. This ensures downstream rules receive continuous data even during illiquid periods. This setting is hidden when the Period is Tick.
The Set Time Range option restricts price data output to specific times of day. When enabled, you can configure a timezone, start and end times, and which days of the week to include. This is useful for strategies that should only operate during certain market hours or sessions.
The rule provides comprehensive price data across three price sources (Bid, Ask, and Mid), each with full OHLC values, body high/low, body range, and total range. It also calculates several derived values commonly used as source inputs for indicators:
- HL2 — The midpoint of the High and Low: (High + Low) / 2
- HLC3 (Typical) — The typical price: (High + Low + Close) / 3
- HLOC4 — The average of all four OHLC values: (High + Low + Open + Close) / 4
- HLCC4 (Weighted) — A close-weighted average: (High + Low + Close + Close) / 4
These derived values are provided separately for each price source (Bid, Ask, and Mid), giving you maximum flexibility in choosing the right input for downstream indicators.
Inputs
| Input | Description | Required | Default |
|---|---|---|---|
| Symbol | The broker account and financial instrument symbol for which to retrieve price data (e.g., EURUSD, GBPJPY, XAUUSD). This determines which market data feed the rule subscribes to. | Yes | — |
| Period | The time period over which to aggregate price data. Choose Tick for real-time bid/ask price updates as they occur, or select a time interval — Second, Minute, Hour, or Day — to create price candles aggregated over that period. | Yes | — |
| Frequency | How frequently to create new price data points. For example, a frequency of 5 with a period of Minute creates a new candle every 5 minutes. Must not be zero. Hidden when Period is Day. | No | 1 |
| Candle Start (ss) | For Minute periods, specifies the starting seconds within each minute for the price data (e.g., 00 for the beginning of the minute). Only shown when Period is Minute. | No | — |
| Candle Start (mm:ss) | For Hour periods, specifies the starting minutes and seconds within each hour for the price data. Only shown when Period is Hour. | No | — |
| Candle Time Type | For Day periods, specifies whether to use custom start/end times or predefined trading session times. Choose Custom to define your own daily time range, or Trading Session to use predefined market session times. Only shown when Period is Day. | No | Custom |
| Candle Start (hh:mm:ss) | For custom daily periods, specifies the starting hour, minute, and second for the price data. Only shown when Period is Day and Candle Time Type is Custom. | No | — |
| Candle End (hh:mm:ss) | For custom daily periods, specifies the ending hour, minute, and second for the price data. Only shown when Period is Day and Candle Time Type is Custom. | No | — |
| Anchor Type | Determines the daily reset point for price data used in candle generation. Choose Custom to anchor to a specific user-defined Anchor Time (the first candle of the day generates at this timestamp), or 1st Trading Session of the Day to anchor to the opening time of the instrument’s first trading session as published by the broker. Only shown when Period is not Tick. | No | Custom |
| Anchor Time | The time of day used to anchor the start of the first price candle for each day. Only used when Anchor Type is set to Custom. | No | 00:00:00 |
| Trading Session | For trading session daily periods, specifies which predefined market session to use. Only shown when Period is Day and Candle Time Type is Trading Session. | No | — |
| Period Offset | Delays the price data output by the specified number of periods. An offset of 1 outputs the previous period’s data. For ticks, an offset of 0 outputs the latest tick data, but for candles an offset of 0 means the rule waits for the current candle to complete. | No | 1 |
| Imputed | When enabled, allows the rule to execute using imputed data (derived from previous values when current data is unavailable). When disabled, the rule only executes when actual current data is available. Hidden when Period is Tick. | No | true |
| Set Time Range | When enabled, restricts price data output to occur only between the specified start and end times of day. This is useful for strategies that only need to process data during specific market hours. | No | false |
Time of Day Range
The following settings are only shown when Set Time Range is enabled.
| Input | Description | Required | Default |
|---|---|---|---|
| Timezone | The timezone for interpreting the start and end times for the time range restriction. | No | — |
| Start (hh:mm) | The time of day (hour and minute) when price data will begin to be output. | No | — |
| End (hh:mm) | The time of day (hour and minute) when price data will stop being output. | No | — |
| Days of Week | Select which days of the week to include within the time range restriction. | No | Mon–Fri |
Outputs
Core Prices
| Output | Description |
|---|---|
| Bid | The current bid price (the price at which buyers are willing to buy). |
| Ask | The current ask price (the price at which sellers are willing to sell). |
| Spread | The difference between the Ask and Bid prices, indicating the cost of trading. |
| Mid | The midpoint price calculated as (Bid + Ask) / 2. |
| Date Time | The timestamp associated with the current price data point or candle. |
Bid Candle Data
| Output | Description |
|---|---|
| Bid Open | The opening bid price for the current candle period. |
| Bid Close | The closing bid price for the current candle period. |
| Bid High | The highest bid price during the current candle period. |
| Bid Low | The lowest bid price during the current candle period. |
| Bid Body High | The highest price between the open or close bid prices for the candle. |
| Bid Body Low | The lowest price between the open or close bid prices for the candle. |
| Bid Body Range | The absolute difference between the bid open and bid close prices. |
| Bid Range | The absolute difference between the bid high and bid low prices. |
| Bid Candle | Complete candle object containing bid open, high, low, and close data. |
| Bid HL2 | The average of the high and low bid prices: (High + Low) / 2. |
| Bid HLOC4 | The average of the high, low, open, and close bid prices: (High + Low + Open + Close) / 4. |
| Bid HLC3 (Typical) | The average of the high, low, and close bid prices: (High + Low + Close) / 3. |
| Bid HLCC4 (Weighted) | The weighted average of the high, low, and double close bid prices: (High + Low + Close + Close) / 4. |
Ask Candle Data
| Output | Description |
|---|---|
| Ask Open | The opening ask price for the current candle period. |
| Ask Close | The closing ask price for the current candle period. |
| Ask High | The highest ask price during the current candle period. |
| Ask Low | The lowest ask price during the current candle period. |
| Ask Body High | The highest price between the open or close ask prices for the candle. |
| Ask Body Low | The lowest price between the open or close ask prices for the candle. |
| Ask Body Range | The absolute difference between the ask open and ask close prices. |
| Ask Range | The absolute difference between the ask high and ask low prices. |
| Ask Candle | Complete candle object containing ask open, high, low, and close data. |
| Ask HL2 | The average of the high and low ask prices: (High + Low) / 2. |
| Ask HLOC4 | The average of the high, low, open, and close ask prices: (High + Low + Open + Close) / 4. |
| Ask HLC3 (Typical) | The average of the high, low, and close ask prices: (High + Low + Close) / 3. |
| Ask HLCC4 (Weighted) | The weighted average of the high, low, and double close ask prices: (High + Low + Close + Close) / 4. |
Mid Candle Data
| Output | Description |
|---|---|
| Mid Open | The midpoint opening price for the candle period. |
| Mid Close | The midpoint closing price for the candle period. |
| Mid High | The highest mid price during the current candle period. |
| Mid Low | The lowest mid price during the current candle period. |
| Mid Body High | The highest price between the open or close mid prices for the candle. |
| Mid Body Low | The lowest price between the open or close mid prices for the candle. |
| Mid Body Range | The absolute difference between the mid open and mid close prices. |
| Mid Range | The absolute difference between the mid high and mid low prices. |
| Mid Candle | Complete candle object containing mid open, high, low, and close data. |
| Mid HL2 | The average of the high and low mid prices: (High + Low) / 2. |
| Mid HLOC4 | The average of the high, low, open, and close mid prices: (High + Low + Open + Close) / 4. |
| Mid HLC3 (Typical) | The average of the high, low, and close mid prices: (High + Low + Close) / 3. |
| Mid HLCC4 (Weighted) | The weighted average of the high, low, and double close mid prices: (High + Low + Close + Close) / 4. |
Tips
The Price Data rule is typically the starting point for any strategy. Connect its Close output to Moving Average, RSI, MACD, and other indicator rules as their source input. For multi-timeframe analysis, add multiple Price Data rules with different Period settings (e.g., one for 5-minute candles and another for 1-hour candles) and feed them into separate indicator chains. Use the HLC3 (Typical) or HLCC4 (Weighted) outputs instead of the raw Close when you want a smoother, more representative source for your indicators. The Bid, Ask, and Mid candle data each provide their own derived values, so choose the price source that best matches your strategy’s needs — for example, use Bid outputs for sell-side analysis and Ask outputs for buy-side analysis. Use the Anchor Type setting to align your candles with your broker’s trading sessions, ensuring consistent candle boundaries across different instruments. Enable Imputation if your strategy trades instruments with gaps or low-liquidity periods to avoid unexpected behaviour from missing data points. Use the Set Time Range option to restrict trading to high-liquidity sessions, such as the London or New York overlap for forex pairs, and configure the Days of Week to exclude weekends.
Was this helpful? Let us know