Skip to main content

'Market Property' in the Trade Rule Block

Fetch current, high, or low prices over a set candle or time period for use in your trading rules, with full control over a range.

Updated over 4 months ago

Purpose
The Market Property data type lets you fetch real-time or historical market prices and values to use in your trading logic. This is useful for referencing the current ask, bid, or mid price, as well as the highest or lowest price over a specific candle or time period.


How It Works
When selecting Market Property in the Trade Rule block, you can choose from:

  • Current Ask Price – The current sell price from your broker.

  • Current Bid Price – The current buy price from your broker.

  • Mid Price – The midpoint between bid and ask.

  • Highest Price in Candle Period – The highest price between a defined start and end candle ID.

  • Lowest Price in Candle Period – The lowest price between a defined start and end candle ID.

  • Highest Price in Time Period – The highest price in a specific time range.

  • Lowest Price in Time Period – The lowest price in a specific time range.


Example: Highest Price in a Candle Period

  1. Start Candle ID – Where the calculation starts (e.g., Candle ID 5 means 5 candles ago).

  2. End Candle ID – Where the calculation ends.

  3. Return Value – Choose whether to return the price value (most common) or time value.

  4. Adjust – Modify the returned value by adding, subtracting, multiplying, or dividing.


Example: Highest Price in a Time Period

  1. Time Source

    • Server Time: Broker’s server clock.

    • Chart Time: Time displayed on the candlestick chart.

    • Local Time: Time from your PC, laptop, or VPS.

  2. Define Time Range – Select the start and end times within the day.

  3. Day Offset – How many days back to start from (e.g., offset 5 = 5 days ago).

  4. Return Value – Price value or time value.

  5. Adjust – Apply a modification to the returned value if needed.


Use Cases

  • Fetching current market prices for comparison with indicator values.

  • Identifying the highest or lowest points in a session for breakout logic.

  • Pulling price levels from custom time ranges for session-based strategies.

Tip: Always ensure your time source matches the context of your strategy to avoid mismatches between chart data and execution timing.

Did this answer your question?