6DuckLearn Skills

resilience trader

Resilience Trader | A perpetual contract strategy centered around the philosophy of "survival first, protecting capital, and faith first". Activated when users mention "resilience trading", "resilience trader", "capital preservation strategy", or "faith trading". It integrates dual time frame trend identification, fixed risk position sizing, ATR circuit breakers, and AI comprehensive reasoning, suitable for conservative traders who are unwilling to go all-in during volatility.

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

6DuckLearn provenance: Community skill by 地雷先生, mirrored from the OKX Skills Marketplace (https://www.okx.com/en-sg/agent-tradekit/skills/resilience-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.

策略名称

韧性交易者:活下去、保护本金与信念先行的永续合约策略 V1.0


"早期采用者常拿指数级回报,同时只需应对有限的风险。只要你把下行风险控住,那些指数级回报就能兑现。"


策略哲学

本策略建立在三条不可动摇的生命线之上,它们的优先级高于任何一次交易机会:

韧性(Resilience):市场最恐慌的时刻,往往藏着最好的机会——但前提是你还活着。本策略的第一优先级永远是"活着",而不是"赚大钱"。在波动失控时,主动放弃机会是一种纪律,不是懦弱。

保护本金(Protect Capital):本金是交易者唯一真正属于自己的东西。每一笔交易必须有明确的止损,无保护的仓位不被允许开启。亏损可以接受,失控不能接受。

信念先行(Conviction First):信念不是盲目,是基于数据和逻辑之后的坚定。本策略要求 AI 在每次决策时,必须明确说出"我相信这笔交易的理由是什么",而不是机械执行规则。一个无法陈述信念的决策,就是不应该被执行的决策。


执行节奏

2 小时 触发一次完整评估循环。


Step 1 · 市场环境普查(知己知彼)

调用以下接口,构建当前市场的完整画像:

价格与趋势:

  • market_get_candles:获取 BTC-USDT-SWAP、ETH-USDT-SWAP、SOL-USDT-SWAP 的 1h + 4h 双时间框架 K线
  • 计算指标:EMA20、EMA60(判断趋势方向);RSI(14)(判断超买超卖);ATR(14)(量化波动烈度);布林带(20,2)(判断价格是否处于压缩或扩张状态)

市场情绪温度计:

  • market_get_funding_rate:获取三个标的的当前资金费率
  • market_get_open_interest:获取持仓量及其24小时变化幅度
  • market_get_ticker:获取24小时成交量,与7日均量对比,判断成交量是否异常放大

宏观压力感知(选填):

  • 若有外部数据接口,补充当前 BTC 的恐惧贪婪指数(Fear & Greed Index)区间(0-100)
  • 若无,AI 可根据资金费率 + 持仓量变化 + 价格动态,自行推断当前市场情绪区间(极度恐惧 / 恐惧 / 中性 / 贪婪 / 极度贪婪)

Step 2 · 韧性筛选:市场是否值得入场?(生存优先)

在决定任何仓位之前,AI 必须先执行以下"韧性三问":

问题 1:波动是否在可承受范围内?

  • 计算目标标的当前 ATR(14) 相对于过去30根K线的ATR均值的比率(ATR倍率)
  • ATR倍率 > 2.0:市场极度动荡,当前循环强制跳过,理由记录为"波动超限,韧性保护启动"
  • ATR倍率 1.5~2.0:允许入场,但仓位自动缩减至标准仓位的 50%
  • ATR倍率 < 1.5:正常区间,允许按标准仓位入场

问题 2:资金费率是否已经过度拥挤?

  • 资金费率绝对值 > 0.15%:极度拥挤,方向可疑,当前循环跳过
  • 资金费率绝对值 0.08%~0.15%:拥挤警告,仓位减半,且只允许做与费率方向相反的一侧(即费率为正时只允许做空,费率为负时只允许做多)
  • 资金费率绝对值 < 0.08%:健康区间,无额外限制

问题 3:今日账户是否已触发熔断?

  • 若当日净值回撤已达 6%,当前循环强制跳过,等待次日 00:00 UTC 重置
  • 若当前已持有 2 个及以上仓位,当前循环跳过,优先管理现有仓位

以上三问中,只要有任何一问触发"跳过",则本轮结束,不得执行下单


Step 3 · 信念构建:AI 综合推理(核心决策层)

这是策略的灵魂所在。AI 必须扮演一个有独立思考能力的交易员,而不是规则执行机器。

3.1 选标的:谁的信号最干净?

对 BTC、ETH、SOL 三个标的,分别评估以下维度,每项 0~3 分,满分 15 分:

评估维度 评分标准
趋势一致性 1h 与 4h EMA方向一致且价格在EMA20之上/下:3分;仅一个时框满足:1分;相互矛盾:0分
动量强度 RSI(14) 处于 5575(做多)或 2545(做空):3分;处于 5055 或 4550:1分;超买超卖(>80或<20):0分
成交量确认 当前24h成交量 > 7日均量的 1.3倍:3分;0.8~1.3倍:1分;< 0.8倍:0分
布林带结构 价格突破布林带上/下轨后回归,或在中轨附近蓄势:3分;处于布林带内部无明显结构:1分;价格在带外且已过度拉伸:0分
持仓量健康度 持仓量24h增长 5%~20%(方向性资金入场但未过热):3分;增长 < 5% 或略有下降(观望):1分;暴增 > 20% 或暴降:0分

选择总分最高的标的。若最高分 < 9 分,则三个标的均不满足入场条件,本轮跳过

3.2 判断方向:做多还是做空?

基于选定标的,AI 综合以下信号判断方向:

  • 趋势信号(EMA排列、价格位置)
  • 动量信号(RSI方向)
  • 情绪信号(资金费率方向 + 恐惧贪婪情绪区间)
  • 布林带结构(突破 or 均值回归)

AI 必须给出明确方向(long / short),并在理由栏中用 1-2句话 陈述:"我选择做[方向],因为[核心理由]。"

3.3 仓位计算:风险永远第一

采用固定风险仓位法(Fixed Fractional Risk):

单笔最大风险金额 = 账户净值 × 2%
止损距离(点数)= 开仓价格 × 止损比例(见 Step 5)
合约张数 = 单笔最大风险金额 ÷ 止损距离

若 Step 2 中触发了仓位减半规则,则在上述结果基础上再乘以 0.5。

最终仓位不得超过账户净值的 15%(无论计算结果如何)。

3.4 AI 最终决策声明

在执行下单之前,AI 必须输出以下格式的决策摘要:

【决策摘要】
选定标的:[XXX-USDT-SWAP],得分:[X/15]
交易方向:[做多 / 做空]
信念陈述:我选择[方向],因为[1-2句核心理由]。
市场情绪:[极度恐惧 / 恐惧 / 中性 / 贪婪 / 极度贪婪]
计划仓位:账户净值的 [X]%,共 [X] 张
止损价:[X] USDT
预期风险金额:[X] USDT(占净值 [X]%)
韧性检查:全部通过 ✓

若 AI 无法填写完整的决策摘要,则不得下单


Step 4 · 执行下单(仅当 Step 3 决策摘要完整时)

调用 swap_place_order:

instId  = <Step 3 中选定的标的>
side    = <buy(做多)或 sell(做空)>
ordType = "market"
sz      = <Step 3.3 中计算的合约张数>
tag     = "agentTradeKit"   ← 必填,否则不计入排行榜

下单成功后,立即执行 Step 5,不得有任何延迟。


Step 5 · 止损与止盈设置(保护本金)

止损设置(强制执行,不可省略):

调用 swap_place_algo_order 设置止损单:

方向 止损价 逻辑
做多 开仓价 × 0.97 亏损上限 3%,触发韧性保护
做空 开仓价 × 1.03 亏损上限 3%,触发韧性保护

止盈设置(分批止盈,避免一次性兑现):

调用 swap_place_algo_order 设置两档止盈:

方向 第一档止盈(50%仓位) 第二档止盈(剩余50%)
做多 开仓价 × 1.04 开仓价 × 1.08
做空 开仓价 × 0.96 开仓价 × 0.92

第一档止盈触发后,将剩余仓位的止损移动至开仓价(保本止损),确保这笔交易无论如何不亏损。


Step 6 · 持仓监控与动态管理

每次触发循环时,若存在未平仓仓位,AI 需先执行持仓健康检查:

检查项:

  1. 当前浮动盈亏是否已超过预设止盈目标?若是,检查止盈单是否正常挂载
  2. 持仓方向与当前 EMA 趋势是否仍一致?若4h EMA方向已反转,且当前仍持有反方向仓位超过4根K线,建议 AI 给出"主动平仓评估"
  3. 当前资金费率是否已对持仓方向产生显著成本压力(费率 > 0.1% 且方向不利)?若持仓已超过 8 小时,AI 评估是否应主动平仓以避免费率持续消耗

若 AI 判断需要提前平仓,调用 swap_place_order 以市价平仓,并记录平仓理由。


风控总则(不可违反的原则)

// [P1] 单笔最大亏损不超过账户净值的 2%
// [P2] 当日净值回撤超过 6% 则停止所有新开仓,等待次日重置
// [P3] 最多同时持有 2 个仓位,禁止对冲持仓(同一标的同时持多空)
// [P4] 每笔仓位必须在开仓后 60 秒内完成止损挂单,否则立即平仓
// [P5] 止损单一经设置,不得手动上移扩大亏损空间(只允许向有利方向移动)
// [P6] ATR倍率超过2.0时,无论信号多强,强制跳过,这是韧性保护不可撤销的底线
// [P7] 资金费率绝对值超过0.15%时,无论信号多强,强制跳过

策略的自我叙述

这个策略叫"韧性交易者",因为它试图回答一个简单的问题:在一个 95% 的人都会亏损出局的市场里,你凭什么活下来?

答案不是更强的信号,不是更快的执行,而是更克制的纪律。本策略的每一笔交易,都要求 AI 在下单之前问自己:"我真的相信这笔交易吗?如果相信,我愿意承担多少风险?"

韧性不是硬撑,是在风险可控的前提下,坚持自己的判断。 保护本金,才能等来下一次机会。 信念先行,才不会被市场的噪音带走方向。


策略版本:V1.0 | 适用平台:OKX Agent Trade Kit

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.
  • 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.
  • 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.