我用 Claude 搭建了一个交易机器人,赚取了 +168,236 美元。


这简直是一个完整的作弊码,而且整个策略都是用 Fable 5 构建的。
不需要开发经验。
下面是如何使用 AI(nfa)构建与回测盈利交易策略的确切方法:
步骤 1. 提取你的策略规则
先选择你想测试的任意交易策略,然后把这个提示词粘贴到 Fable 5:
"Take the classic [strategy name] and turn it into a fully objective rule set on the [insert timeframe].
Give me: exact entry rule, exact exit rule, stop logic, and position sizing.
No discretion - every rule must be computable."
这可以是 RSI 策略、EMA 策略等。
这里的目标是获得一套干净的、你真的可以拿去回测的规则。
步骤 2. 转换为 Pine Script
当你有了这些规则,把下面这段后续内容粘贴过去:
"Now write this as TradingView Pine Script v6 strategy code.
Include a 0.1% commission per side, and code ready to paste into the Pine Editor.
Copy the entire code block it gives you."
步骤 3. 导入到 TradingView
打开 TradingView → Pine Editor → New Script。粘贴代码并点击 Add to Chart。
你会立刻看到每一次历史进场、出场、盈利、亏损和回撤。
如果遇到错误,截个图,把它发回到 Fable,让它修复。
步骤 4. 优化策略
这一步才是真正的 alpha。
从你的 TradingView 回测结果里下载 CSV 文件。把它导回 Fable,并提示:
"Analyse this trade history and tell me exactly how to improve this strategy."
Fable 会识别你亏损交易中的模式,建议调整规则,并帮助你重建一个更强的版本。
步骤 5. 实现自动化
通过它的 MCP 服务器将 Claude Code 连接到你的交易所。生成一个交易所的 API key,然后交给你的代理。
现在循环闭合:Fable 回测该策略,你验证结果,而系统会在满足你的条件时监控市场并自动执行。
不想全自动?你也可以只把它设置成:一旦交易机会满足你的参数,就提醒你。
查看原文
post-image
此页面可能包含第三方内容,仅供参考(非陈述/保证),不应被视为 Gate 认可其观点表述,也不得被视为财务或专业建议。详见声明
  • 赞赏
  • 1
  • 转发
  • 分享
评论
请输入评论内容
请输入评论内容
MrfearGod
· 2小时前
2026 GOGOGO 👊
回复0