grid-trading

grid-trading is a skill for Claude Code from Superior-Trade/superior-skills. It costs 88 tokens per session (2,294 once invoked), scanned A, original, MIT.

A trading strategy that adds to a position as the price falls and takes partial profits as it rises. It is a laddered approximation of grid trading, not a bot placing many orders at once.

In plain words
What is it for?
Use it to design or implement drawdown entries, scaling into a position, pyramiding, and step-by-step profit taking, with a hard exit when the price breaks out of the range.
Why use it?
It gives a structured way to trade price ranges without needing a separate system that maintains many simultaneous orders. It also makes the limits of the trading engine clear.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the superior-skills plugin — 31 skills shipped together

Good fit Use it to design or implement drawdown entries, scaling into a position, pyramiding, and step-by-step profit taking, with a hard exit when the price breaks out of the range.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/superior-trade/superior-skills/grid-trading
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Superior-Trade/superior-skills --skill grid-trading
Clone the repo
git clone --depth 1 https://github.com/Superior-Trade/superior-skills

Made for: Claude Code.

Or install superior-skills, the plugin that ships this one along with the rest of its 31 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for grid-trading

README.md
[![agentmods](https://agentmods.dev/badge/skills/superior-trade/superior-skills/grid-trading/github.svg)](https://agentmods.dev/skills/superior-trade/superior-skills/grid-trading)
Your own site
<a href="https://agentmods.dev/skills/superior-trade/superior-skills/grid-trading"><img src="https://agentmods.dev/badge/skills/superior-trade/superior-skills/grid-trading/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for grid-trading

Your own site · 80×15
<a href="https://agentmods.dev/skills/superior-trade/superior-skills/grid-trading"><img src="https://agentmods.dev/badge/skills/superior-trade/superior-skills/grid-trading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,294 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00088 $0.02294
Opus 5 $0.00044 $0.01147
Sonnet 5 $0.00018 $0.00459
Haiku 4.5 $0.00009 $0.00229

Measured 11d ago against content hash 103b50d223f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

grid-trading scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/grid-trading/SKILL.md · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Window ETH/USDC 15m, 2026-03-01 → 2026-05-01 (61 days)
Trades 4
Win rate 100%
Wallet PnL +0.66% / +$65.58
Sharpe 2.02
Profit per trade $15-30
Avg holding 14 days
Max DD 0% (intraday only)
Backtest ID 01kqyz25d0zrwwf5fzccjk44dk

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

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

Read the full file on GitHub · 172 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 172 lines · 88 tokens per session scan A 103b50d223f0

Subscribe to this mod's changes

grid-trading is a skill published in the GitHub repository Superior-Trade/superior-skills (209 stars, last pushed yesterday), licensed MIT. It adds 88 tokens to every session and 2,294 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

tushare

A Python interface for Tushare, a financial data service that provides market and company information for stocks, funds, futures, and digital assets. It returns queried data as pandas tables.

HKUDS/Vibe-Trading · 79 tokens

correlation-analysis

Correlation and cointegration analysis — co-movement discovery, deep return-correlation analysis, sector clustering, realized correlation, Engle-Granger / Johansen cointegration, half-life, Kalman dynamic hedge ratio, cross-market linkage analysis, and pair-trading signal generation.

HKUDS/Vibe-Trading · 57 tokens

social-media-intelligence

Social media intelligence: financial signal extraction from Twitter/X, Telegram, Discord, and Reddit for sentiment-driven trading strategies.

HKUDS/Vibe-Trading · 28 tokens

ashare-pre-st-filter

An A-share China stock risk checker that forecasts whether a company may receive an ST or *ST warning in the next financial year. ST labels are Chinese exchange warnings for companies facing specified financial or regulatory problems.

HKUDS/Vibe-Trading · 89 tokens

credit-analysis

A guide to analysing bonds and other fixed-income investments, including issuer credit quality, interest payments, default risk, credit spreads, and convertible bonds. It also covers Chinese fixed-income markets and local-government financing bonds.

HKUDS/Vibe-Trading · 36 tokens

etf-analysis

A framework for comparing exchange-traded funds (ETFs), which are funds bought and sold on a stock exchange and usually track an index, industry, asset, or strategy. It covers fees, how closely an ETF follows its target, trading activity, and portfolio use.

HKUDS/Vibe-Trading · 39 tokens