Skip to content

Strategy guide

Build a breakout strategy with an AI agent

A breakout strategy waits for a completed price bar to close beyond a defined range, then checks whether the move satisfies a written confirmation rule. With Fensory MCP, a connected agent can read the candles, calculate the range and prepare a bounded perpetual-futures order for review.

The example below uses the previous 20 completed one-hour candles and a volume check. Those numbers are an inspectable example, not a claim that the rule is optimal. The connected client performs each evaluation, so the workflow stops checking new bars when the client or user-operated schedule stops. Fensory is not available to US persons.

Copy this prompt

Use the Fensory tools to assess a BTC perpetual-futures range breakout. Stay read-only first. Call get_perps_status, get_market and get_candles. Request at least 50 completed one-hour candles and ignore the candle that is still forming. Using the 20 completed candles immediately before the latest completed candle, calculate the range high, range low and average volume. Mark a long candidate only if the latest completed candle closes above the range high and its volume is greater than the prior 20-candle average. Mark a short candidate only if it closes below the range low with the same volume condition. Otherwise report no signal. Print the range window, timestamps, high, low, latest close, latest volume and average volume. Then call get_orderbook, get_account_state and get_open_orders. Report spread, visible depth near the current price, current position, available balance, allowed markets, access expiry and per-order cap. If a candidate exists, prepare but do not submit a limit order worth no more than $25. Use the broken range boundary as the invalidation reference and show the proposed stop arguments. Do not change leverage or margin mode. Show expected fees, slippage risk and liquidation risk, then ask for confirmation for the exact order. Stop if data is stale, the range window is incomplete or the order book is too thin to estimate execution.

Who this is for

This guide is for an eligible user who wants to turn a range-breakout idea into an explicit checklist that an agent can calculate and report. It is useful when the main goal is consistency, not a promise that a price move will continue.

What it is not

It is not a hosted strategy, a price forecast or a tested return record. Breakouts can fail immediately, gaps can create poor execution and a market order can fill far from the trigger in a thin book.

What you need

  • A range definition

    State the lookback, timeframe and whether the current candle is excluded. This example uses the high and low of the previous 20 completed one-hour candles.

  • A confirmation rule

    Define what makes a close count. The example requires a close outside the range and volume above the prior 20-candle average. The agent prints both tests separately.

  • An invalidation point

    Choose where the idea is wrong before an order is prepared. A breakout without a stop reference leaves no bounded response when price moves back into the range.

  • Account limits set in the app

    Allow only the intended market, set access expiry and keep the order below the per-order cap. A valid breakout signal cannot override those settings.

What the agent does

  1. 01

    Verify the market and history window

    The agent resolves the exact perpetual-futures market, removes the current candle and checks that the preceding range contains a continuous sequence of completed timestamps.

    Tools: get_perps_status · get_market · get_candles

  2. 02

    Calculate the range before reading the trigger

    The high, low and average volume come only from the preceding 20 candles. The latest completed candle is tested afterward so its own price and volume cannot move the boundary it is supposed to break.

  3. 03

    Require both price and volume conditions

    The client prints each condition and reports no signal when one fails. Volume does not prove the move will continue, but a separate test makes the rule explicit instead of relying on a visual impression.

  4. 04

    Check execution conditions and account state

    The signal is calculated from candles while the order executes against the current book. The agent therefore checks spread, nearby depth, existing exposure and account limits before it prepares a limit order.

    Tools: get_orderbook · get_account_state · get_open_orders

  5. 05

    Submit only after review and verify the outcome

    A confirmed limit order can rest or fill partly. The agent reads the venue records after submission and reports the remaining quantity instead of calling every accepted order a completed trade.

    Tools: place_perps_order · get_order_status · get_fills · get_open_orders

Failure modes and limits

  • Price closes back inside the range

    A break can reverse quickly. The previous boundary becomes the invalidation reference in this example, but a stop can still execute beyond its trigger during a fast move.

  • The latest candle was allowed to move the boundary

    Including the trigger candle in the prior range changes the test while it is being evaluated. The prompt separates the range window from the latest completed candle.

  • The order book is thinner than the candle suggests

    A candle records past trading. It does not guarantee current depth. Spread and slippage can change before an order reaches the book, particularly outside the most liquid markets.

  • A stop becomes a market order

    Hyperliquid documents that stop-loss orders trigger as market orders. The trigger limits when the exit starts, not the exact price at which every unit fills.

  • The agent is no longer evaluating new candles

    The current page describes a client-run workflow. Existing positions and orders remain live after the client stops, while no new breakout check happens until the routine runs again.

Read the result in the terminal

Market and position
Compare the live mark with the broken range boundary, then check side, size, entry, margin and liquidation price. Do not use the old candle close as the current execution price.
Order and fill records
A limit order may stay behind the market after a fast breakout. Read the remaining quantity and actual fills before deciding whether the signal produced a position.
Stop and account controls
Confirm the protective order exists where intended and keep the account cap, allow-list and access expiry visible. The prompt cannot repair an omitted venue-side stop after the fact.

Runs on

The client list comes from the same release record as the MCP page. Every verified client has its own setup guide.

Questions people ask

What counts as a breakout in this guide?
The latest completed one-hour candle must close outside the high or low of the preceding 20 completed candles, with volume above that preceding window’s average. It is an illustrative rule, not a Fensory return claim.
Why not use the still-forming candle?
Its price and volume can change before the period ends. A temporary move beyond the range may disappear by the close, so using it would make the result unstable.
Does higher volume confirm that the breakout will continue?
No. It is one measurable condition and does not remove false breakouts. The price can reverse even when the candle closes outside the range with higher volume.
Why check the order book after calculating the candle signal?
Candles describe completed trading, while an order faces the current spread and depth. A valid historical condition can still meet poor execution conditions at the moment of submission.
Can this strategy keep running after I close the client?
Not through this current workflow. The agent evaluates new candles only while the connected client or a schedule you operate is running. Existing venue orders and positions remain until managed or filled.