Agent skill

Grid Trading

by Superior-Trade in Superior-Trade/superior-skills

A skill your agent uses when writing a profit-laddered position-adjustment strategy on Superior Trade — anything described as a grid bot, range fade, range harvest, ladder buy, scaling-in…

MITAuto-check passedBusiness, Finance & HR

Install Grid Trading

skills CLI
$ npx skills add Superior-Trade/superior-skills --skill grid-trading -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Superior-Trade/superior-skills grid-trading --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Superior-Trade/superior-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/grid-trading .claude/skills/grid-trading && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
grid-trading
GitHub stars
215
Token cost
~2.1k tokens
SKILL.md length
572 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when writing a profit-laddered position-adjustment strategy on Superior Trade — anything described as a grid bot, range fade, range harvest, ladder buy, scaling-in…

  • Works in 4 steps: Naive single-rung implementation. Using… → stoploss too shallow. With 5 ladder… → Letting minimal_roi close trades early.… → …
  • Writing a profit-laddered position-adjustment strategy on Superior Trade — anything described as a grid bot
  • SKILL.md covers When to use, Important caveat — explain…, Backtest reference and Reference implementation, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Grid Trading is an agent skill from Superior-Trade/superior-skills. Use when writing a profit-laddered position-adjustment strategy on Superior Trade — anything described as a grid bot, range fade, range harvest, ladder buy, scaling-in, pyramiding, or "buy more when it dips and sell partials when it rallies". Note this is a profit-driven ladder, not a true 20-rung order-book grid; explain that limitation when the user asks for true grid trading.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Business, Finance & HR, covering Trading and backtesting. The repository describes itself as: Open agent skills and tool schemas for Superior Trade — build, backtest, and deploy trading strategies on Hyperliquid. The licence is MIT.

When your agent uses it

  • Writing a profit-laddered position-adjustment strategy on Superior Trade — anything described as a grid bot
  • Buy more when it dips and sell partials when it rallies
  • Asks for true grid trading

Example prompts

  • “buy more when it dips and sell partials when it rallies”
  • “/grid-trading”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Naive single-rung implementation. Using populate_entry_trend with close < vwap × 0.94 and populate_exit_trend with close > vwap × 1.06…
  2. stoploss too shallow. With 5 ladder rungs at −1% spacing, a −6% stop kills the trade before the deepest rung fills. Use −30% (or deeper)…
  3. Letting minimal_roi close trades early. With the default {"0": 0.02}, the trade exits at +2% before the partial-TP ladder ever runs. Set…
  4. Forgetting current_profit is signed. current_profit <= -0.01 * n_entries reads "drawdown is at least n × 1%". Inverting the sign disables…

What it can do on your machine

Read from SKILL.md and the folder at commit 9d41db5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • freqtrade.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Grid Trading loads about 2.1k tokens when it runs. Until then it costs about 99 tokens; SKILL.md has 572 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Superior-Trade/superior-skills at commit 9d41db5, republished under its MIT licence (© Superior-Trade). 572 words, ~2,091 tokens.

Download SKILL.mdSave it as .claude/skills/grid-trading/SKILL.md (or your agent's skills folder).
name
grid-trading
description
Use when writing a profit-laddered position-adjustment strategy on Superior Trade — anything described as a grid bot, range fade, range harvest, ladder buy, scaling-in, pyramiding, or "buy more when it dips and sell partials when it rallies". Note this is a profit-driven ladder, not a true 20-rung order-book grid; explain that limitation when the user asks for true grid trading.
metadata.version
0.1.0
metadata.updated
2026-05-07

Strategy: Grid · Range Fade (laddered)

When to use

A user asks for "grid trading", "grid bot", "range fade", "ladder buy", "scale into the dip", "pyramid into a position", "DCA on drawdown" (not on calendar — that's strategy-dca-weekly). Anything where the trigger to add is a price drawdown, and there are partial take-profits on the way up.

Important caveat — explain this upfront

Freqtrade is a one-trade-per-pair engine. A real 20-rung grid bot — placing 20 limit orders simultaneously on the order book and refilling each as it fills — is not possible without engine changes. What you can implement is a profit-laddered position adjustment:

  • 1 initial entry at a trigger price
  • Up to N additional entries, each at a deeper drawdown step (−1%, −2%, …)
  • Partial take-profits at progressive profit steps (+1.5%, +3%, +4.5%, …)
  • Hard exit on a band breakout

This is a working, profitable approximation of the spirit of grid trading. If the user explicitly wants 100s of small fills per day on a tight book, say so and recommend running a separate grid runtime alongside Freqtrade.

Backtest reference

WindowETH/USDC 15m, 2026-03-01 → 2026-05-01 (61 days)
Trades4
Win rate100%
Wallet PnL+0.66% / +$65.58
Sharpe2.02
Profit per trade$15-30
Avg holding14 days
Max DD0% (intraday only)
Backtest ID01kqyz25d0zrwwf5fzccjk44dk

Order pattern per trade: 2 entries ("" initial + grid_buy_1) + 4 partial exits at grid_tp_* tags. Sparse — 4 trades over 61 days — because the 24h VWAP −1% trigger fires rarely on ETH. Tighten the trigger (e.g. vwap × 0.995) for more activity.

Reference implementation

python
from freqtrade.strategy import IStrategy
from freqtrade.persistence import Trade
from datetime import datetime
import pandas as pd


class EthGridStrategy(IStrategy):
    minimal_roi = {"0": 100.0}   # never auto-close on ROI; partials handled in adjust_trade_position
    stoploss = -0.30             # safety net, deeper than the deepest ladder rung
    trailing_stop = False
    timeframe = "15m"
    process_only_new_candles = True
    startup_candle_count = 200
    can_short = False

    position_adjustment_enable = True
    max_entry_position_adjustment = 5   # 5 ladder rungs below entry
    max_dca_multiplier = 6.0            # 1 + 5 adds

    def populate_indicators(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
        # 24h VWAP on 15m bars (96 bars).
        tp = (dataframe["high"] + dataframe["low"] + dataframe["close"]) / 3.0
        pv = tp * dataframe["volume"]
        dataframe["vwap_24h"] = (
            pv.rolling(96).sum() / dataframe["volume"].rolling(96).sum()
        )
        return dataframe

    def populate_entry_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
        # First grid rung: 1% below 24h VWAP.
        dataframe.loc[
            (dataframe["close"] <= dataframe["vwap_24h"] * 0.99)
            & (dataframe["volume"] > 0),
            "enter_long",
        ] = 1
        return dataframe

    def populate_exit_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
        # Hard close on band breakout up.
        dataframe.loc[
            dataframe["close"] >= dataframe["vwap_24h"] * 1.06,
            "exit_long",
        ] = 1
        return dataframe

    def custom_stake_amount(self, pair: str, current_time: datetime, current_rate: float,
                            proposed_stake: float, min_stake, max_stake: float,
                            leverage: float, entry_tag, side: str, **kwargs) -> float:
        return proposed_stake / self.max_dca_multiplier

    def adjust_trade_position(self, trade: Trade, current_time: datetime,
                              current_rate: float, current_profit: float,
                              min_stake, max_stake: float,
                              current_entry_rate: float, current_exit_rate: float,
                              current_entry_profit: float, current_exit_profit: float,
                              **kwargs):
        if trade.has_open_orders:
            return None
        n_entries = trade.nr_of_successful_entries
        n_exits = trade.nr_of_successful_exits

        # Ladder buys: every -1% from average entry, up to 5 adds.
        if n_entries <= 5 and current_profit <= -0.01 * n_entries:
            filled = trade.select_filled_orders(trade.entry_side)
            first_stake = filled[0].stake_amount_filled if filled else (min_stake or 10)
            return (first_stake, f"grid_buy_{n_entries}")

        # Partial profit-take: every +1.5% above avg entry, up to 3 ladders.
        if n_exits < 3 and current_profit >= 0.015 * (n_exits + 1):
            return (-(trade.stake_amount / 4.0), f"grid_tp_{n_exits}")

        return None

Config requirements

json
{
  "exchange": { "name": "hyperliquid", "pair_whitelist": ["ETH/USDC"] },
  "stake_currency": "USDC",
  "stake_amount": 1000,
  "dry_run_wallet": {"USDC": 10000},
  "timeframe": "15m",
  "max_open_trades": 1,
  "stoploss": -0.30,
  "minimal_roi": { "0": 100.0 },
  "entry_pricing": { "price_side": "same" },
  "exit_pricing": { "price_side": "same" },
  "pairlists": [{ "method": "StaticPairList" }]
}

dry_run_wallet ≥ stake_amount is enforced strictly. With 6 ladder rungs, leave headroom — dry_run_wallet ≥ stake_amount × 1.5 is comfortable.

Tunable parameters

KnobEffect
0.99 (entry trigger)Tighter (0.995) → more entries, more chop. Looser (0.97) → rarer, deeper fades.
0.01 * n_entries (ladder spacing)Tighter spacing → faster ladder fills, smaller gain per rung. Wider spacing → fewer rungs in chop.
max_entry_position_adjustmentMore rungs → bigger position when fully laddered, more wallet exposure.
0.015 * (n_exits + 1) (TP step)Tighter TPs → more partial closes, less per close.
1.06 (band breakout)Tighter (1.04) → exit earlier on rallies, capture less.
trade.stake_amount / 4.0 (TP size)Smaller divisor → bigger partial closes. / 2.0 halves the position per TP.
Show full SKILL.md (217 more words)Show less

Common pitfalls

  1. Naive single-rung implementation. Using populate_entry_trend with close < vwap × 0.94 and populate_exit_trend with close > vwap × 1.06 produced 0 trades on the same window — ETH never reached the lower band. The laddered version captures the moves the band misses.
  2. stoploss too shallow. With 5 ladder rungs at −1% spacing, a −6% stop kills the trade before the deepest rung fills. Use −30% (or deeper) and rely on partial exits.
  3. Letting minimal_roi close trades early. With the default {"0": 0.02}, the trade exits at +2% before the partial-TP ladder ever runs. Set {"0": 100.0} to disable.
  4. Forgetting current_profit is signed. current_profit <= -0.01 * n_entries reads "drawdown is at least n × 1%". Inverting the sign disables the ladder.

Variants

  • Wider band: 0.97 entry / 1.10 exit for trending pairs (BTC, SOL).
  • Asymmetric ladder: more buys than sells (max_entry_position_adjustment = 8, only 2 partial TPs) for accumulation modes.
  • Volatility-scaled steps: replace fixed 0.01 with atr_pct * 0.5 to make ladder spacing follow regime.

When grid is the wrong tool

  • Strong trends (the band breakout closes the trade after one cycle).
  • Pairs that gap (Hyperliquid index pairs sometimes skip the trigger price entirely).
  • Tight fee budgets — every ladder rung pays maker/taker fees twice (entry and partial exit). See fees-optimizations for cost analysis.

Sources

© Superior-Trade, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/grid-trading of Superior-Trade/superior-skills.

Open the folder on GitHubat commit 9d41db5

Compare with similar skills

Grid Trading next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Grid Trading compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Grid Trading this skillSuperior-Trade/superior-skills215—~2.1kAutomated safety check: PassMIT
Tushare Datazillionare/zillionare3212 repos~2.3kAutomated safety check: PassNone
Tradingview MCPatilaahmettaner/tradingview-mcp5k—~1.3kAutomated safety check: PassMIT
Digital Oraclekomako-workshop/digital-oracle878—~5.9kAutomated safety check: PassMIT
Polyclawchainstacklabs/polyclaw3591 repos~2kAutomated safety check: PassApache-2.0
Markdownfacioquo/stock-indicators-dotnet1.2k—~812Automated safety check: PassApache-2.0

Similar skills

  • Tushare Data

    zillionare/zillionare

    面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。

    321 GitHub starsUsed in 2 repos~2.3k tokens
    Business, Finance & HRAuto-check passed
  • Tradingview MCP

    atilaahmettaner/tradingview-mcp

    AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, licensed news sentiment (Marketaux), and…

    5k GitHub stars~1.3k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Digital Oracle

    komako-workshop/digital-oracle

    Answer prediction questions using market trading data, not opinions.

    878 GitHub stars~5.9k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Polyclaw

    chainstacklabs/polyclaw

    Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.

    359 GitHub starsUsed in 1 repo~2k tokens
    Business, Finance & HRAuto-check passed
  • Markdown

    facioquo/stock-indicators-dotnet

    Format and lint Markdown in this repository against GitHub Flavored Markdown and its markdownlint-cli2 configuration — headers, lists, code fences, callouts (VitePress containers on docs-site pages…

    1.2k GitHub stars~812 tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Openmobius Skill

    MobiusQuant/OpenMobius-skill

    Provides multi-school trading Q&A, chart/OHLCV analysis, annotation, and fresh-market workflows covering ICT/SMC, ChanLun, Wyckoff, Price Action, Order Flow, VSA, and Elliott Wave.

    697 GitHub stars~7.2k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed

More from Superior-Trade/superior-skills

All 31 skills in this repo
  • Superior Trade Auth

    Superior-Trade/superior-skills

    A skill your agent uses when an agent needs to register a Superior Trade account, verify an email OTP, configure x-api-key authentication, or recover from missing or invalid credentials before using…

    215 GitHub stars~950 tokensUpdated 1 mo ago
    Auto-check passed
  • Deposit Qr

    Superior-Trade/superior-skills

    A skill your agent uses when a user needs a QR code or wallet payment URI to fund a Superior-managed EVM wallet on a specific chain before using Lighter, Polymarket, Hyperliquid, or other Superior…

    215 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • External Deposit

    Superior-Trade/superior-skills

    A skill your agent uses when a user wants to fund or bridge from an external wallet through a third-party UI such as Relay, especially when asking for MetaMask Mobile QR codes, bridge links…

    215 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Aerodrome

    Superior-Trade/superior-skills

    A skill your agent uses when creating, validating, backtesting, deploying, sizing, or troubleshooting Aerodrome/Base spot trading strategies through the Superior Trade API, especially Freqtrade…

    215 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Polymarket

    Superior-Trade/superior-skills

    A skill your agent uses when the user wants to trade, research, or backtest Polymarket prediction markets through Superior Trade — finding markets by slug or event URL, placing a single immediate…

    215 GitHub stars~4.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Backtesting

    Superior-Trade/superior-skills

    A skill your agent uses when running, interpreting, or designing backtests on Superior Trade — anything about backtest windows, trade-count thresholds, exit-reason mix, parameter sweeps…

    215 GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Grid Trading

What does Grid Trading do?

A skill your agent uses when writing a profit-laddered position-adjustment strategy on Superior Trade — anything described as a grid bot, range fade, range harvest, ladder buy, scaling-in…. Grid Trading is an agent skill from Superior-Trade/superior-skills. Use when writing a profit-laddered position-adjustment strategy on Superior Trade — anything described as a grid bot, range fade, range harvest, ladder buy, scaling-in, pyramiding, or "buy more when it dips and sell partials when it rallies".

When should I use Grid Trading?

Grid Trading fits situations like: writing a profit-laddered position-adjustment strategy on Superior Trade — anything described as a grid bot; buy more when it dips and sell partials when it rallies; asks for true grid trading.

How do I install Grid Trading in Claude Code?

Run `npx skills add Superior-Trade/superior-skills --skill grid-trading -a claude-code`. Or copy the skill folder (skills/grid-trading in Superior-Trade/superior-skills) into .claude/skills/grid-trading in your project. Claude Code loads it when a task matches its description.

How do I install Grid Trading in Codex?

Run `npx skills add Superior-Trade/superior-skills --skill grid-trading -a codex`. Or copy the skill folder (skills/grid-trading in Superior-Trade/superior-skills) into .agents/skills/grid-trading in your project. Codex loads it when a task matches its description.

Can I use Grid Trading in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Superior-Trade/superior-skills --skill grid-trading -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/grid-trading, .gemini/skills/grid-trading, .github/skills/grid-trading and .opencode/skills/grid-trading in your project.

What does Grid Trading need to run?

SKILL.md names no scripts, command-line tools or credentials: Grid Trading is instructions for the agent only. Our summary lists: Python 3.

Does Grid Trading access the network?

SKILL.md names 1 domain. As links in the text: freqtrade.io. This is read from the text; nothing was executed.

Is Grid Trading safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Grid Trading use?

Grid Trading is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Grid Trading use?

About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Grid Trading?

Skills that share tags, products or a category with Grid Trading: Tushare Data (zillionare/zillionare, 321 stars), Tradingview MCP (atilaahmettaner/tradingview-mcp, 5k stars), Digital Oracle (komako-workshop/digital-oracle, 878 stars) and Polyclaw (chainstacklabs/polyclaw, 359 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Grid Trading?

Superior-Trade (a GitHub organization) maintains it in Superior-Trade/superior-skills, which has 215 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on September 10, 2026.

Source: Superior-Trade/superior-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.