Get Price
The Get Price rule captures and delivers accurate price information at specific moments in time. It serves as a critical data source for trading strategies, enabling you to access historical or current prices on demand. By allowing flexible scheduling—either at specific times of day or at exchange session boundaries—this rule ensures your strategies obtain the exact price data they need, supporting more informed trading decisions.
How It Works
The Get Price rule is designed to capture price information at a specific point in time that you define. It operates in two distinct modes depending on your needs:
Price Mode (Single Price Capture): The rule monitors the market and captures the current bid and ask prices at a specific time you configure. You can choose either a custom time (for example, 14:30 UTC) or a preset exchange time (such as market open or market close). Once captured, the rule provides not just the raw bid and ask prices but also calculates useful derived values including the mid-price (average of bid and ask), the spread (difference between bid and ask), and several other technical price composites that traders commonly use for analysis.
Range Calculation Mode: Instead of capturing a single moment, this mode captures price data across a defined range—for example, from one day's open to another day's close, or across multiple trading sessions. The rule assembles all price movements within that range into a candle, which is a standard chart representation showing the opening price, closing price, highest price reached, and lowest price reached during that period. This is especially useful for technical analysis where you need to study how prices moved over time rather than just a snapshot.
Time Selection: You can specify when the rule captures prices in two ways. With Custom Time, you provide an exact time in hours, minutes, and seconds in UTC. With Preset Exchange Time, you select a major exchange or trading session (such as NYSE Open or Tokyo Stock Exchange Close), and the rule automatically uses that exchange's official session times.
Historical Lookback: Both modes support looking back into history. You can ask the rule to capture prices not from the most recent occurrence of your chosen time, but from earlier occurrences. For example, if your rule is set to capture at market close, you could look back 5 closes ago instead of using the most recent one. This is valuable when building strategies that compare current prices to prices from specific periods in the past.
Once the price data is captured, the rule automatically calculates multiple derived metrics including the spread, mid-price, HL2 (average of high and low), HLC3 (typical price), HLOC4 (average of high, low, open, and close), HLCC4 (weighted close average), full candle data for bid/ask/mid, body metrics, percentage change, and directional indicators.
Inputs
| Parameter | Description | Required | Default |
|---|---|---|---|
| Symbol | The financial instrument (stock, currency pair, commodity, or other tradeable asset) whose price you want to capture, along with its associated account. | Yes | — |
| Type | Determines whether the rule captures a single price at a point in time (Price) or assembles price data across a time range into a candle (Range Calculation). | Yes | — |
| Start Type | Determines how you specify the start time. Choose Preset to use an official exchange session time, or Custom to provide an exact time in UTC. | Yes | — |
| Open Time (hh:mm:ss Z) | The exact time at which you want the price to be captured when using a custom start time. Format is hours:minutes:seconds in UTC. | When Start Type is Custom | — |
| Preset | The exchange or trading session whose official time you want to use. Options include major global exchanges such as NYSE, NASDAQ, Tokyo Stock Exchange, London Stock Exchange, ASX, and many others. | When Start Type is Preset | Broker/Exchange Trading Day |
| Use Open or Close | When using a preset exchange time, specify whether you want the Open (session start) or Close (session end) time. | When Start Type is Preset | — |
| Start Offset | Look back to a historical occurrence of your chosen start time. Offset 1 is the most recent, offset 2 is the one before that, and so on. Must be greater than or equal to End Offset in Range Calculation mode. | Yes | 1 |
| End Type | Determines how you specify the end time of your price range. Choose Preset or Custom. Only used in Range Calculation mode. | When Type is Range Calculation | — |
| End Open Time (hh:mm:ss Z) | The exact time at which you want the price range to end when using a custom end time in Range Calculation mode. | When Range Calculation and End Type is Custom | — |
| End Preset | The exchange or trading session whose official time you want to use as the end of your price range. | When Range Calculation and End Type is Preset | Broker/Exchange Trading Day |
| End Use Open or Close | When using a preset end time, specify whether you want the Open or Close time of the exchange session. | When Range Calculation and End Type is Preset | — |
| End Offset | Look back to a historical occurrence of your chosen end time. Offset 1 is the most recent. Must be less than or equal to Start Offset. | When Type is Range Calculation | 1 |
Outputs
| Output | Description |
|---|---|
| Bid Price | The bid price (what buyers are offering to pay) at the captured time. |
| Ask Price | The ask price (what sellers are asking for) at the captured time. |
| Spread | The gap between bid and ask prices, indicating market liquidity and tightness. |
| Median Price | The middle price point within the range of all ticks in the candle. |
| Bid HL2 | Average of the bid high and bid low prices. |
| Ask HL2 | Average of the ask high and ask low prices. |
| Mid HL2 | Average of the mid-point high and mid-point low prices. |
| Bid HLOC4 | Average of bid high, low, open, and close for a balanced price perspective. |
| Ask HLOC4 | Average of ask high, low, open, and close. |
| Mid HLOC4 | Average of mid high, low, open, and close. |
| Bid HLC3 | Average of bid high, low, and close—the “typical price.” |
| Ask HLC3 | Average of ask high, low, and close. |
| Mid HLC3 | Average of mid high, low, and close. |
| Bid HLCC4 | Weighted average emphasising the close: (High + Low + 2 × Close) / 4. |
| Ask HLCC4 | Weighted average emphasising the ask close. |
| Mid HLCC4 | Weighted average emphasising the mid close. |
| Candle Bid Open | The opening bid price at the start of the defined range. |
| Candle Bid Close | The closing bid price at the end of the defined range. |
| Candle Bid High | The highest bid price reached during the defined range. |
| Candle Bid Low | The lowest bid price reached during the defined range. |
| Candle Bid Body High | The higher of the bid open and close prices (upper boundary of the candle body). |
| Candle Bid Body Low | The lower of the bid open and close prices (lower boundary of the candle body). |
| Candle Bid Body Length | The size of the bid candle body (distance from open to close). |
| Candle Bid Full Length | The total size of the bid candle from high to low. |
| Candle Ask Open | The opening ask price at the start of the defined range. |
| Candle Ask Close | The closing ask price at the end of the defined range. |
| Candle Ask High | The highest ask price reached during the defined range. |
| Candle Ask Low | The lowest ask price reached during the defined range. |
| Candle Ask Body High | The higher of the ask open and close prices. |
| Candle Ask Body Low | The lower of the ask open and close prices. |
| Candle Ask Body Length | The size of the ask candle body. |
| Candle Ask Full Length | The total size of the ask candle from high to low. |
| Candle Mid Open | The midpoint of bid and ask at the start of the defined range. |
| Candle Mid Close | The midpoint of bid and ask at the end of the defined range. |
| Candle Mid High | The highest midpoint reached during the defined range. |
| Candle Mid Low | The lowest midpoint reached during the defined range. |
| Candle Mid Body High | The higher of the mid open and close values. |
| Candle Mid Body Low | The lower of the mid open and close values. |
| Candle Mid Body Length | The size of the midpoint candle body. |
| Candle Mid Full Length | The total size of the midpoint candle from high to low. |
| Bid Candle | Complete candle data for bid (all OHLC values combined). |
| Ask Candle | Complete candle data for ask (all OHLC values combined). |
| Mid Candle | Complete candle data for midpoint (all OHLC values combined). |
| Bid % Change | The percentage change in bid price from the start to the end of the range. |
| Mid % Change | The percentage change in midpoint price from the start to the end of the range. |
| Ask % Change | The percentage change in ask price from the start to the end of the range. |
| Bid Change | The absolute change in bid price from the start to the end of the range. |
| Mid Change | The absolute change in midpoint price from the start to the end of the range. |
| Ask Change | The absolute change in ask price from the start to the end of the range. |
| Direction Up | TRUE if close prices are higher than open prices, indicating upward movement. |
| Direction Down | TRUE if open prices are higher than close prices, indicating downward movement. |
Tips
Use Price Mode when you need a snapshot of the market at a precise moment—for example, to capture the opening price each day. Use Range Calculation Mode when you need to understand how prices moved over a period, such as building custom candles aligned to specific exchange sessions. The historical lookback feature is especially powerful for strategies that compare today's session open to previous session opens.
Was this helpful? Let us know