6DuckLearn Skills

btc trader

Trading skills focused on BTC-USDT trends/volatility/crowding, testing profits of 500 USDT. Used to generate structured market setup indicators, making decisions on opening positions/watching/ skipping based on EMA20/EMA60, RSI14, ATR14, funding rates, and changes in open interest. By default, it is a signal version and does not place orders automatically; it only enters the order and stop-loss process when the user explicitly requests execution and the execution tool is available.

trading-strategy Tags: okx, trading, community, okx-marketplace, trading-strategy, strategy

6DuckLearn provenance: Community skill by Govin.eth|互关版, mirrored from the OKX Skills Marketplace (https://www.okx.com/en-sg/agent-tradekit/skills/btc-trader). It is not curated, verified, or endorsed by 6DuckLearn or represented as an official OKX publication.

Financial safety boundary: Never request secrets in chat. Before any external API call or action that places, cancels, or amends an order; changes leverage; transfers funds; creates or stops a bot; subscribes to or redeems an earn product; or signs/broadcasts a transaction, show the exact live/demo profile, instrument, side, size, price constraints, fees, and worst-case loss, then obtain explicit user approval. Default to read-only or demo mode when uncertain. Treat all analysis as research, not investment advice.

BTC Trader

这是一个 BTC 单标的交易信号技能,默认标的为 BTC-USDT-SWAP

目标:

  • 用尽量少但稳定的规则,输出 可解释、可审计、可降级 的交易决策。
  • 默认先做 信号判断,而不是直接下单。
  • 震荡市优先跳过,趋势市才考虑参与。

适用场景

当用户提出以下意图时使用本技能:

  • 分析 BTC 当前是否适合开多 / 开空
  • 写 BTC 自动交易 / 半自动交易策略
  • 生成 BTC 交易信号
  • 基于 4h K 线做趋势判断
  • 给出交易理由、仓位建议、止损建议

默认行为

默认只输出信号,不下单。 只有在同时满足以下条件时,才可进入执行层:

  1. 用户明确要求下单或自动执行
  2. 可用的行情/交易工具已经存在
  3. 风控条件完整可验证
  4. 本次信号达到 high 置信等级

如果任一条件不满足:

  • 只输出分析结果
  • 不伪造执行结果
  • 不假装已下单

需要的数据

优先获取以下数据:

  1. BTC-USDT-SWAP4h K线
  2. BTC-USDT-SWAP1h K线(辅助确认)
  3. 资金费率(funding rate)
  4. 持仓量(open interest)或其变化值

若无法拿到完整数据:

  • 1h:可退化为仅 4h 分析,但降低置信度
  • 缺 funding / OI:允许输出趋势信号,但必须标记 riskFlags
  • 缺关键 K线:直接停止并说明无法分析

指标计算

基于 K 线计算:

  • EMA20
  • EMA60
  • RSI14
  • ATR14
  • atrPct = ATR14 / close

尽量直接用最新已收线数据,不要依赖未收线 K 的瞬时值做最终结论。

决策流程

按以下顺序执行,不要跳步。

Step 1: 判断市场状态(Regime)

基于 4h 为主,1h 为辅,将市场划分为:

  • bull_trend
  • bear_trend
  • range

Bull Trend 候选

通常满足:

  • 4h EMA20 > EMA60
  • 4h EMA20 斜率向上
  • 价格位于 4h EMA20 上方,或回踩后重新站回

Bear Trend 候选

通常满足:

  • 4h EMA20 < EMA60
  • 4h EMA20 斜率向下
  • 价格位于 4h EMA20 下方,或反弹失败后重新转弱

Range

出现以下任一倾向时,优先视为震荡:

  • EMA20 与 EMA60 缠绕、距离很小
  • RSI 长时间在 45~55 徘徊
  • 最近几根 K 没有清晰高低点趋势
  • 价格反复穿越 EMA20/EMA60

原则:震荡优先跳过。

Step 2: 评估方向性信号强度

给信号打分,推荐总分 0~10。

多头加分项

  • 4h EMA20 > EMA60
  • 1h EMA20 > EMA60
  • RSI14 位于 52~68
  • 价格不是极度远离均线后的追高
  • 价格结构呈更高低点 / 更高高点
  • OI 上升且价格上涨
  • Funding 未过热
  • atrPct 在合理区间

空头加分项

  • 4h EMA20 < EMA60
  • 1h EMA20 < EMA60
  • RSI14 位于 32~48
  • 价格不是极度远离均线后的追空
  • 价格结构呈更低高点 / 更低低点
  • OI 上升且价格下跌
  • Funding 未极端偏空
  • atrPct 在合理区间

Step 3: 拥挤度过滤(Funding)

将资金费率视为拥挤度代理。

推荐阈值:

  • |funding| <= 0.03%:正常
  • 0.03% < |funding| <= 0.08%:轻度拥挤,仓位 × 0.7
  • 0.08% < |funding| <= 0.12%:明显拥挤,仓位 × 0.5
  • |funding| > 0.12%:极端拥挤,优先 skip

注意:

  • 正 funding 很高时做多风险上升
  • 负 funding 很高时做空风险上升
  • 拥挤度不是反手信号,而是 缩仓 / 跳过信号

Step 4: 波动过滤(ATR)

重点看 atrPct = ATR14 / close

推荐区间:

  • < 1.2%:波动太低,机会不足,降仓或跳过
  • 1.2% ~ 3.5%:合理交易区间
  • 3.5% ~ 5%:偏高,降仓
  • > 5%:极端波动,优先跳过

Step 5: OI 质量确认

结合价格与 OI:

  • 价格上涨 + OI 上升:多头趋势更可信
  • 价格下跌 + OI 上升:空头趋势更可信
  • 价格上涨/下跌但 OI 下降:可能主要是平仓推动,趋势质量下降
  • Funding 极端 + OI 暴增:警惕拥挤尾声

Step 6: 生成最终动作

动作只能是:

  • open
  • observe
  • skip
  • reduce

含义:

  • open:趋势明确,可考虑开仓
  • observe:有方向,但条件不够整齐,先等
  • skip:本次不做
  • reduce:若用户已持仓,则建议减仓/降风险

置信度映射

建议:

  • score >= 8high
  • score 5~7medium
  • score <= 4low

默认规则:

  • high 才允许进入自动执行候选
  • medium 只建议人工确认后执行
  • low 直接 observeskip

仓位建议

不要默认满仓或固定大仓位。

基础规则

  • 单笔建议风险:账户净值的 0.5% ~ 1%
  • 不建议 V1 默认直接使用 3% 风险上限

仓位缩放因子

  • high1.0
  • medium0.5
  • funding 轻度拥挤:再 × 0.7
  • funding 明显拥挤:再 × 0.5
  • atrPct 偏高:再 × 0.5
  • 缺少 funding / OI 数据:再 × 0.5

输出中用 positionScale 表示,范围 0.0 ~ 1.0

止损建议

优先使用 ATR 止损:

  • 多头止损:entry - 1.5 * ATR
  • 空头止损:entry + 1.5 * ATR

若执行环境只支持固定百分比止损,可退化为:

  • 多头:entry * 0.98
  • 空头:entry * 1.02

必须在输出中明确注明所使用的止损方法。

风控红线

若用户要求执行,必须先检查并满足:

  • 单笔最大亏损不超过账户净值 3%
  • 当日净值回撤超过 8%,停止新开仓
  • 最多同时持有 2 个标的
  • 禁止对冲持仓

若缺少账户净值 / 当日回撤 / 当前持仓信息:

  • 不可声称风控已通过
  • 只能输出“策略建议”,不能假装满足执行条件

执行层(仅在用户明确要求时)

如果用户明确要求下单,并且交易工具可用,按以下顺序:

  1. 先完成分析
  2. 再明确输出:方向 / 仓位 / 止损
  3. 再执行下单
  4. 成交后立即设置止损
  5. 若任一步失败,清楚说明失败点

推荐参数(仅作为执行模板,不代表总是应执行):

  • instId = BTC-USDT-SWAP
  • side = buy | sell
  • ordType = market
  • sz = 按 positionScale 与账户风险规则计算
  • tag = agentTradeKit

输出格式

优先输出结构化 JSON,然后附简短中文说明。

{
  "symbol": "BTC-USDT-SWAP",
  "timeframe": "4h",
  "marketRegime": "bull_trend",
  "direction": "buy",
  "signalScore": 8,
  "confidence": "high",
  "positionScale": 0.7,
  "fundingRate": 0.0002,
  "openInterestBias": "rising_with_price",
  "atrPct": 0.021,
  "action": "open",
  "stopLossMethod": "atr",
  "suggestedStopLoss": 81234.5,
  "riskFlags": [],
  "reasoning": [
    "4h 与 1h 同向偏多",
    "RSI 位于健康趋势区间",
    "funding 未过热",
    "atrPct 处于可交易范围"
  ]
}

说明纪律

  • 不要把概率说成确定性。
  • 不要宣称“稳赚”。
  • 不要伪造回测结果。
  • 如果数据不足,直接说明不足。
  • 如果市场震荡,允许明确说“本次跳过”。

参考文件

需要细节时读取:

  • references/strategy-spec.md:完整策略说明
  • references/risk-rules.md:风险控制与执行约束
  • references/output-example.md:输出示例

Related skills

  • ahr999 btc hodl — The BTC smart investment assistant based on the Nine Gods Index (AHR999) spans bull and bear markets. It automatically retrieves on-chain valuation data, investing when undervalued and pausing when overvalued, using objective indicators to replace subjective emotions. It supports two strategies: fixed amount and AHR999 tiered variable amounts, which are executed fully automatically once set.
  • bb momentum breakout — Bollinger Band squeeze breakout + MACD confirmed momentum trading Skill. Use this skill when users say 'Bollinger breakout', 'momentum breakout', 'BB breakout', or 'activate breakout strategy'. Automatically detects directional breakouts after Bollinger Band squeezes, combining MACD signals and ATR dynamic stop-loss to quickly enter and exit to capture momentum trades.
  • btc naked k breakout — BTC naked K structure AI breakout strategy. Triggered every 5 minutes, it identifies structural points based on 300 candlesticks, builds a box, evaluates structural quality, and executes breakout pullback trades through comprehensive AI judgment, supporting dynamic position sizing and advanced position management.
  • crypto swing signal analyst — Cryptocurrency swing analysis skills based on EMA20, EMA60, RSI14, MACD, and ATR14, used to determine trends, identify long and short opportunities, and provide stop-loss, take-profit, and risk recommendations.
  • dca bot parameterizer — Don't make impulsive trades; use a data-driven six-step workflow to accurately set parameters for your OKX Martingale bot. Automatically pull real-time market data through the OKX Trade Kit, using EMA20 to determine trend status, ATR% to measure volatility, and structural analysis to anchor support/resistance, covering all scenarios including spot and futures (with leverage recommendations, hard cap of 4x). The core highlight is the safety gate mechanism: under strong trend conditions, it actively warns and refuses execution, automatically switching to defense mode after forced confirmation, reducing the initial amount, widening the step size, and lowering the multiplier.
  • dcd auto trader — Automatically purchase the best yield BTC low-buy dual currency winning strategy every day. It features a built-in volatility engine that integrates options IV, dual-speed ATR, Bollinger Bands, and funding rates with four-dimensional data, overlaying dynamic macro event calendars like FOMC/CPI to automatically determine the best low-buy APY within a safe range, earning premiums. After exercising, the strategy automatically sets a breakeven high sell order to secure profits and earn interest. Once set, it runs fully automatically, suitable for traders looking to continuously earn returns with idle stablecoins.