Skip to content

Agent Skill · version 0.1.0

Download Fensory Trend-Following Agent Skill

Evaluate a transparent EMA trend-following rule with completed candles, inspect Fensory account controls and prepare a bounded perpetual-futures order for review.

Download and review

Download the public file, review every instruction, then place it in the skills directory documented by the compatible client you use. Client-specific paths are omitted until each workflow is verified.

Download
curl -fsSL https://fensory.com/skills/trend-following/SKILL.md -o SKILL.md
Install in Hermes
hermes skills install https://fensory.com/skills/trend-following/SKILL.md --name fensory-trend-following

What the skill instructs

  • Read the account and instrument before preparing an action.
  • Keep the proposal inside the user's ceiling and the account's per-order cap.
  • Show the exact symbol, side, order type and size before a write call. Include the limit price for a limit order, or the current quote and expected execution conditions for a market order, then ask for confirmation.
  • Report a prepared order, submitted order and fill as three different states.

SKILL.md

---
name: fensory-trend-following
description: Evaluate a transparent EMA trend-following rule with completed candles, inspect Fensory account controls and prepare a bounded perpetual-futures order for review.
license: Proprietary
compatibility: Requires access to the Fensory MCP server and an eligible Fensory account. Fensory is not available to US persons.
metadata:
  author: Fensory AG
  version: "0.1.0"
  source: "https://fensory.com/skills/trend-following"
---

# Build a trend-following strategy with an AI agent

## When to use

This guide is for an eligible user who wants a transparent, repeatable way to test a directional rule with completed candles and a small supervised perpetual-futures order. The example uses EMA alignment because every input can be printed and checked.

It is not a performance claim, a backtest or an unattended strategy. A moving-average rule can reverse late, trade repeatedly in a flat market and lose through fees, funding, slippage or liquidation. The agent should report a signal without presenting it as a recommendation.

## Operating rules

- Start with read tools and identify the signed-in account, market, venue and instrument before preparing an action.
- Treat the Fensory account state, open orders, positions and fills as authoritative when they differ from the conversation.
- Fensory enforces four controls on the account: a kill-switch, an access expiry, a market allow-list and a per-order cap. Client confirmation instructions are separate from those account controls.
- Never describe a perpetual future as a share or tokenized equity. State the instrument and its risks before discussing an order.
- Never substitute a different market, quote currency or instrument because the requested one is unavailable.
- Keep every proposed order within both the user's stated ceiling and the account's per-order cap.
- Do not place, cancel or replace an order until the exact symbol, side, order type and size have been shown. For a limit order, show the limit price. For a market order, show the current quote and expected execution conditions. The user must confirm that exact action.
- Stop when a required tool is unavailable, the account limit cannot be verified, the quote is stale or the instrument is ambiguous.

## Risk and scope

This file is operational guidance, not financial advice. Trading can lose the full amount committed. Perpetual futures use margin and can be liquidated. Spot assets can lose value. Stop if the instrument, current quote or account controls cannot be verified.

## Procedure

1. **Resolve the perpetual-futures market.** The agent verifies that perpetual-futures execution is available and that the requested symbol resolves to the intended Hyperliquid market. A familiar ticker is not enough because the same name may describe another instrument elsewhere in the app. Tools: `get_perps_status`, `get_market`.
2. **Read only completed candles.** The current candle can change before it closes. The agent removes it from the calculation, checks timestamps for gaps and prints the exact history window so another reader can reproduce the averages. Tools: `get_candles`.
3. **Calculate and explain the signal.** The client calculates both EMAs from the returned closes and reports whether alignment became true on the latest completed candle. Ongoing alignment is not a fresh entry signal. An existing position receives a separate exit check against EMA20. The client does not claim that this rule has been backtested by Fensory.
4. **Read exposure and account controls.** A valid signal does not authorize an order. The agent checks the current position, resting orders, account balance, expiry, market allow-list and per-order cap before preparing anything new. Tools: `get_account_state`, `get_open_orders`.
5. **Prepare one order and verify its state.** The agent applies the lower of the prompt ceiling and account cap, then shows the complete limit order and separate proposed stop-market order before submission. After a confirmed action it reads the venue state again. The stop is client-managed, and its eventual fill can differ from its trigger. Tools: `place_perps_order`, `get_order_status`, `get_fills`, `get_open_orders`.

## Request template

Use the Fensory tools to assess BTC perpetual futures with a transparent trend-following rule. Stay read-only first. Call get_perps_status, get_market and get_candles. Use the latest 100 completed one-hour candles and ignore the candle that is still forming.

Calculate the 20-period and 50-period exponential moving averages for the latest and immediately preceding completed candles. Mark a long entry candidate only when the latest close is above both averages, EMA20 is above EMA50, and the preceding candle did not have the same long alignment. Mark a short entry candidate only when the latest close is below both averages, EMA20 is below EMA50, and the preceding candle did not have the same short alignment. If the same alignment was already present, report existing alignment and no new entry candidate. Print both candle timestamps, closes, EMA values and the exact condition that passed or failed.

Then call get_account_state and get_open_orders. State the existing position, available balance, allowed markets, access expiry and per-order cap. If the account already has a long position, mark an exit candidate when a completed close falls below EMA20. If it has a short position, mark an exit candidate when a completed close rises above EMA20. If an entry candidate exists, prepare but do not submit a limit order worth no more than the lower of $25 and the current per-order cap, without changing leverage or margin mode. For a long candidate, use the lowest low of the latest ten completed candles, including the signal candle, as the proposed stop reference. For a short candidate, use the highest high of the same window. If a size calculated from the stop distance exceeds either ceiling, reduce the size instead of moving the stop. If the reduced size cannot meet the venue minimum, report no executable order.

Treat the stop as a separate stop-market order that the connected client must place and verify after confirmation. It is not an account-enforced loss limit, and its fill can differ from its trigger in a fast or thin market. Show the exact entry and stop arguments, current funding, estimated fees and liquidation risk. Do not place, cancel or replace anything until I confirm that exact action. Stop if candle history is incomplete, stale or contains a gap.

## Failure handling

- **A flat market creates repeated reversals:** Two averages can cross back and forth when price has no sustained direction. Each reversal can add fees and slippage even when the market finishes near its starting point.
- **The newest candle is incomplete:** An intraperiod move can make the EMA alignment appear and disappear before the candle closes. The prompt uses completed candles so the same timestamp produces the same calculation.
- **The signal arrives after the move:** Moving averages use past prices and can react late. The page does not imply that EMA alignment predicts the next move or that a faster setting is better.
- **A stop trigger is not a guaranteed fill:** The proposed stop is a separate venue order, not an account-enforced maximum loss. A stop-market order can fill beyond its trigger when price moves quickly or visible liquidity is thin.
- **Costs outlast the signal:** Perpetual futures add venue fees, the Fensory builder fee, funding and execution spread. A short-lived signal can be smaller than those combined costs.
- **The client stops running:** Fensory MCP does not keep this prompt running by itself. No new candle is evaluated after the connected client or the user-operated schedule stops, although existing positions and orders remain live at the venue.

## Response contract

Report the account used, the exact instrument, the tools called, the controls that applied and the current order or position state. Separate a prepared order from a submitted order, and a submitted order from a fill. If no action was taken, say so directly.

## Sources

- [CME research: trend-following proxy systems and limitations](https://www.cmegroup.com/education/files/ac-the-market-environment-for-trendfollowing-sep19.pdf)
- [Hyperliquid perpetual-futures contract specifications](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/contract-specifications)
- [Hyperliquid order types](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/order-types)
- [Fensory MCP server](https://fensory.com/mcp)

Product behavior and client permissions verified 2026-10-19.

Questions people ask

What does the Fensory Trend-Following Agent Skill install?
It downloads one SKILL.md file containing operating instructions, risk boundaries, the tool sequence and a response contract. It does not install the Fensory MCP server or create an account.