{"id":3517,"date":"2026-02-06T07:18:00","date_gmt":"2026-02-05T23:18:00","guid":{"rendered":"https:\/\/www.laoyulaoyu.com\/?p=3517"},"modified":"2026-01-26T18:25:27","modified_gmt":"2026-01-26T10:25:27","slug":"%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e6%90%ad%e5%bb%ba%e4%b8%80%e4%b8%aa%e4%bc%9a%e6%80%9d%e8%80%83%e7%9a%84%e5%a4%96%e6%b1%87%e4%ba%a4%e6%98%93ai","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2026\/02\/06\/%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e6%90%ad%e5%bb%ba%e4%b8%80%e4%b8%aa%e4%bc%9a%e6%80%9d%e8%80%83%e7%9a%84%e5%a4%96%e6%b1%87%e4%ba%a4%e6%98%93ai\/","title":{"rendered":"\u4ece\u96f6\u5f00\u59cb!\u624b\u628a\u624b\u6559\u4f60\u642d\u5efa\u4e00\u4e2a\u4f1a&#8221;\u601d\u8003&#8221;\u7684\u5916\u6c47\u4ea4\u6613AI\u673a\u5668\u4eba\uff08\u9644\u6e90\u7801\uff09"},"content":{"rendered":"\n<p>\u4f5c\u8005\uff1a<a href=\"https:\/\/www.laoyulaoyu.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u8001\u4f59\u635e\u9c7c<\/a><\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">\u539f\u521b\u4e0d\u6613\uff0c\u8f6c\u8f7d\u8bf7\u6807\u660e\u51fa\u5904\u53ca\u539f\u4f5c\u8005\u3002<\/mark><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"900\" height=\"383\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2026\/01\/cover.webp\" alt=\"\" class=\"wp-image-3518\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/01\/cover.webp 900w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/01\/cover-300x128.webp 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/01\/cover-768x327.webp 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<pre class=\"wp-block-verse\"><strong>\u5199\u5728\u524d\u9762\u7684\u8bdd\uff1a<\/strong>\u4eca\u5929\u8ddf\u5927\u5bb6\u5206\u4eab\u6211\u6700\u65b0\u642d\u5efa\u7684\u6b27\u7f8e\u5916\u6c47\u81ea\u52a8\u4ea4\u6613\u673a\u5668\u4eba\u3002\u8fd9\u5957\u7cfb\u7edf\u6574\u5408\u4e86EMA\u5747\u7ebf\u3001RSI\u5f3a\u5f31\u6307\u6807\u3001MACD\u8d8b\u52bf\u7ebf\u548c\u5e03\u6797\u5e26\u56db\u5927\u7ecf\u5178\u6b66\u5668\uff0c\u8fd8\u52a0\u5165\u4e86\u8c37\u6b4cGemini AI\u667a\u80fd\u8fc7\u6ee4\u5c42\uff0c\u80fd\u81ea\u52a8\u8bc6\u522b\u5e02\u573a\u9677\u9631\u3002<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u4ece\u6570\u636e\u6293\u53d6\u5230\u4fe1\u53f7\u751f\u6210\uff0c\u4ece\u98ce\u9669\u63a7\u5236\u5230\u81ea\u52a8\u4e0b\u5355\uff0c\u5168\u7a0bPython\u4ee3\u7801\u5b9e\u73b0<\/mark>\u3002\u6587\u7ae0\u5305\u542b\u5b8c\u6574\u4ee3\u7801\u6559\u5b66\uff0c\u5373\u4f7f\u662f\u7f16\u7a0b\u5c0f\u767d\u4e5f\u80fd\u8ddf\u7740\u4e0a\u624b\u3002<\/pre>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u4e3a\u4ec0\u4e48\u6211\u8981\u505a\u8fd9\u4e2a\u4ea4\u6613\u673a\u5668\u4eba?<\/strong><\/h2>\n\n\n\n<p>\u4f60\u6709\u6ca1\u6709\u5728\u505a\u5916\u6c47\u65f6\u9047\u5230\u8fc7\u8fd9\u4e9b\u60c5\u51b5\uff1f\u660e\u660e\u6280\u672f\u5206\u6790\u663e\u793a\u8be5\u6b62\u635f\u4e86\uff0c\u4f46\u5fc3\u91cc\u603b\u60f3\u7740&#8221;\u518d\u7b49\u7b49\uff0c\u8bf4\u4e0d\u5b9a\u80fd\u56de\u672c&#8221;\uff1b\u6216\u8005\u770b\u5230\u4ef7\u683c\u7a81\u7834\u4e86\uff0c\u6fc0\u52a8\u5730\u51b2\u8fdb\u53bb\uff0c\u7ed3\u679c\u53d1\u73b0\u662f\u5047\u7a81\u7834\uff0c\u88ab\u5957\u5728\u5c71\u9876\u3002\u8fd9\u5c31\u662f\u4eba\u6027\u7684\u5f31\u70b9\uff1a\u8d2a\u5a6a\u548c\u6050\u60e7\u3002<\/p>\n\n\n\n<p>\u90a3\u80fd\u4e0d\u80fd\u8ba9\u673a\u5668\u6765\u66ff\u6211\u4eec\u4ea4\u6613\uff1f\u8ba9\u51b0\u51b7\u7684\u4ee3\u7801\u6267\u884c\u7eaa\u5f8b\uff0c\u8ba9\u6570\u636e\u8bf4\u8bdd\uff0c\u8ba9AI\u5e2e\u6211\u4eec\u8fc7\u6ee4\u6389\u90a3\u4e9b\u770b\u8d77\u6765\u8bf1\u4eba\u5b9e\u9645\u662f\u9677\u9631\u7684\u4fe1\u53f7?<\/p>\n\n\n\n<p>\u4eca\u5929\u5206\u4eab\u7ed9\u5927\u5bb6\u7684\u8fd9\u5957<strong>\u6b27\u7f8e\u5916\u6c47\u81ea\u52a8\u4ea4\u6613\u673a\u5668\u4eba\uff0c<\/strong>\u5b83\u6574\u5408\u4e86\u56db\u5927\u7ecf\u5178\u6280\u672f\u6307\u6807(EMA\u5747\u7ebf\u3001RSI\u5f3a\u5f31\u6307\u6807\u3001MACD\u8d8b\u52bf\u7ebf\u3001\u5e03\u6797\u5e26),\u8fd8\u52a0\u5165\u4e86\u8c37\u6b4cGemini AI\u4f5c\u4e3a\u6700\u540e\u4e00\u9053\u667a\u80fd\u8fc7\u6ee4\u5173\u5361\uff0c\u5e76\u53ef\u4ee5\u901a\u8fc7\u6d88\u606f\u7f51\u5173\u76f4\u63a5\u901a\u77e5\u4ea4\u6613\u60c5\u51b5\u3002<\/p>\n\n\n\n<p><strong>\ud83d\udca1 \u6838\u5fc3\u4eae\u70b9:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li> \u56db\u91cd\u6280\u672f\u6307\u6807\u8fc7\u6ee4\uff0c\u4fe1\u53f7\u51c6\u786e\u7387\u5927\u5e45\u63d0\u5347\u3002<\/li>\n\n\n\n<li> 5\u5206\u949f\u9ad8\u5468\u671f\u8d8b\u52bf\u5224\u65ad\uff0c\u53ea\u505a\u987a\u52bf\u5355\u3002<\/li>\n\n\n\n<li> Gemini AI\u667a\u80fd\u8fc7\u6ee4\uff0c\u81ea\u52a8\u8bc6\u522b\u5e02\u573a\u9677\u9631\u3002<\/li>\n\n\n\n<li> \u5168\u81ea\u52a8\u6267\u884c\uff0c\u4ece\u4fe1\u53f7\u751f\u6210\u5230\u4e0b\u5355\u4e00\u6c14\u5475\u6210\u3002<\/li>\n\n\n\n<li> \u5b8c\u6574Python\u4ee3\u7801\uff0c\u53ef\u76f4\u63a5\u8fd0\u884c\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u6280\u672f\u6307\u6807\u7ec4\u5408\u62f3\uff1a\u56db\u5927\u6b66\u5668\u534f\u540c\u4f5c\u6218<\/strong><\/h2>\n\n\n\n<p>\u5728\u5f00\u59cb\u8bb2\u4ee3\u7801\u4e4b\u524d\uff0c\u6211\u5148\u7ed9\u5927\u5bb6\u79d1\u666e\u4e00\u4e0b\u8fd9\u5957\u7cfb\u7edf\u7528\u5230\u7684\u56db\u5927\u6280\u672f\u6307\u6807\u3002\u5982\u679c\u4f60\u662f\u8001\u624b\uff0c\u53ef\u4ee5\u5feb\u901f\u6d4f\u89c8\uff1b\u5982\u679c\u4f60\u662f\u65b0\u624b\uff0c\u5efa\u8bae\u8ba4\u771f\u770b\uff0c\u8fd9\u4e9b\u90fd\u662f\u4ea4\u6613\u7684\u57fa\u672c\u529f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.1 EMA\u5747\u7ebf\uff1a\u8d8b\u52bf\u7684&#8221;\u6307\u5357\u9488&#8221;<\/strong><\/h3>\n\n\n\n<p><strong>EMA(\u6307\u6570\u79fb\u52a8\u5e73\u5747\u7ebf)<\/strong>\u662f\u4e00\u79cd\u5bf9\u8fd1\u671f\u4ef7\u683c\u66f4\u654f\u611f\u7684\u5747\u7ebf\u3002\u548c\u666e\u901a\u5747\u7ebf(SMA)\u76f8\u6bd4\uff0cEMA\u5bf9\u6700\u65b0\u4ef7\u683c\u7684\u6743\u91cd\u66f4\u5927\uff0c\u6240\u4ee5\u80fd\u66f4\u5feb\u5730\u53cd\u6620\u5e02\u573a\u53d8\u5316\u3002<\/p>\n\n\n\n<p>\u6211\u7684\u7cfb\u7edf\u7528\u4e86\u4e24\u6761EMA\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5feb\u7ebfEMA9\uff1a9\u6839K\u7ebf\u7684\u6307\u6570\u5e73\u5747\uff0c\u53cd\u5e94\u77ed\u671f\u8d8b\u52bf\u3002<\/li>\n\n\n\n<li>\u6162\u7ebfEMA21\uff1a21\u6839K\u7ebf\u7684\u6307\u6570\u5e73\u5747\uff0c\u53cd\u5e94\u4e2d\u671f\u8d8b\u52bf\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u4ea4\u6613\u903b\u8f91\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5f53\u5feb\u7ebf\u4ece\u4e0b\u65b9\u7a7f\u8fc7\u6162\u7ebf(\u91d1\u53c9)\uff0c\u8bf4\u660e\u77ed\u671f\u52a8\u80fd\u5f00\u59cb\u5f3a\u4e8e\u4e2d\u671f\uff0c\u53ef\u80fd\u662f\u4e0a\u6da8\u4fe1\u53f7\u3002<\/li>\n\n\n\n<li>\u5f53\u5feb\u7ebf\u4ece\u4e0a\u65b9\u7a7f\u8fc7\u6162\u7ebf(\u6b7b\u53c9)\uff0c\u8bf4\u660e\u77ed\u671f\u52a8\u80fd\u5f00\u59cb\u5f31\u4e8e\u4e2d\u671f\uff0c\u53ef\u80fd\u662f\u4e0b\u8dcc\u4fe1\u53f7\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.2 RSI\u76f8\u5bf9\u5f3a\u5f31\u6307\u6807\uff1a\u5e02\u573a\u7684&#8221;\u6e29\u5ea6\u8ba1&#8221;<\/strong><\/h3>\n\n\n\n<p><strong>RSI(Relative Strength Index)<\/strong>\u662f\u7528\u6765\u8861\u91cf\u5e02\u573a\u8d85\u4e70\u8d85\u5356\u72b6\u6001\u7684\u6307\u6807\uff0c\u6570\u503c\u8303\u56f4\u662f0-100\u3002<\/p>\n\n\n\n<p><strong>\u5224\u65ad\u6807\u51c6:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>RSI > 70\uff1a\u5e02\u573a\u53ef\u80fd\u8d85\u4e70\uff0c\u4ef7\u683c\u6da8\u592a\u5feb\uff0c\u968f\u65f6\u53ef\u80fd\u56de\u8c03\u3002<\/li>\n\n\n\n<li>RSI &lt; 30\uff1a\u5e02\u573a\u53ef\u80fd\u8d85\u5356\uff0c\u4ef7\u683c\u8dcc\u592a\u72e0\uff0c\u968f\u65f6\u53ef\u80fd\u53cd\u5f39\u3002<\/li>\n\n\n\n<li>RSI\u572840-60\u4e4b\u95f4\uff1a\u5e02\u573a\u76f8\u5bf9\u5065\u5eb7\uff0c\u9002\u5408\u4ea4\u6613\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u6211\u7684\u7cfb\u7edf\u8bbe\u7f6e:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u505a\u591a\u4fe1\u53f7\uff1aRSI\u572840-70\u4e4b\u95f4(\u907f\u514d\u8ffd\u9ad8)<\/li>\n\n\n\n<li>\u505a\u7a7a\u4fe1\u53f7\uff1aRSI\u572830-60\u4e4b\u95f4(\u907f\u514d\u6740\u8dcc)<\/li>\n<\/ul>\n\n\n\n<p><strong>\u26a0\ufe0f<\/strong>&nbsp;RSI\u6709\u4e2a\u81f4\u547d\u7f3a\u9677\u53eb&#8221;\u949d\u5316&#8221;\u3002\u5728\u8d85\u7ea7\u5927\u725b\u5e02\u6216\u5927\u5d29\u76d8\u4e2d\uff0cRSI\u4f1a\u957f\u671f\u505c\u7559\u572880\u4ee5\u4e0a\u621620\u4ee5\u4e0b\u3002\u8fd9\u65f6\u5019\u5982\u679c\u4f60\u770b\u5230RSI80\u5c31\u53bb\u505a\u7a7a\uff0c\u53ef\u80fd\u4f1a\u88ab\u66b4\u6da8\u6253\u8138\u3002\u6240\u4ee5\u6211\u52a0\u5165\u4e86\u8d8b\u52bf\u8fc7\u6ee4,\u53ea\u5728\u8d8b\u52bf\u65b9\u5411\u505a\u5355\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.3 MACD\uff1a\u52a8\u91cf\u7684&#8221;\u52a0\u901f\u5668&#8221;<\/strong><\/h3>\n\n\n\n<p><strong>MACD(\u5e73\u6ed1\u5f02\u540c\u79fb\u52a8\u5e73\u5747\u7ebf)<\/strong>\u7531\u4e09\u90e8\u5206\u7ec4\u6210\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MACD\u7ebf\uff1a\u5feb\u7ebfEMA12 &#8211; \u6162\u7ebfEMA26<\/li>\n\n\n\n<li>\u4fe1\u53f7\u7ebf\uff1aMACD\u7ebf\u76849\u65e5EMA<\/li>\n\n\n\n<li>\u67f1\u72b6\u56fe\uff1aMACD\u7ebf &#8211; \u4fe1\u53f7\u7ebf<\/li>\n<\/ul>\n\n\n\n<p><strong>\u6211\u7684\u4f7f\u7528\u65b9\u6cd5:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u505a\u591a\u65f6\uff1aMACD\u67f1\u72b6\u56fe\u5fc5\u987b\u4e3a\u6b63(\u8bf4\u660e\u4e0a\u6da8\u52a8\u80fd\u5f3a)\uff1b<\/li>\n\n\n\n<li>\u505a\u7a7a\u65f6\uff1aMACD\u67f1\u72b6\u56fe\u5fc5\u987b\u4e3a\u8d1f(\u8bf4\u660e\u4e0b\u8dcc\u52a8\u80fd\u5f3a)\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728\u52a8\u80fd\u4e0d\u8db3\u65f6\u8fdb\u573a\uff0c\u51cf\u5c11\u88ab\u53cd\u5411\u6253\u6b62\u635f\u7684\u6982\u7387\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.4 \u5e03\u6797\u5e26\uff1a\u6ce2\u52a8\u7684&#8221;\u8fb9\u754c\u7ebf&#8221;<\/strong><\/h3>\n\n\n\n<p><strong>\u5e03\u6797\u5e26(Bollinger Bands)<\/strong>\u7531\u4e09\u6761\u7ebf\u7ec4\u6210\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e2d\u8f68\uff1a20\u65e5\u79fb\u52a8\u5e73\u5747\u7ebf\uff1b<\/li>\n\n\n\n<li>\u4e0a\u8f68\uff1a\u4e2d\u8f68 + 2\u500d\u6807\u51c6\u5dee\uff1b<\/li>\n\n\n\n<li>\u4e0b\u8f68\uff1a\u4e2d\u8f68 &#8211; 2\u500d\u6807\u51c6\u5dee\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u6839\u636e\u7edf\u8ba1\u5b66\u539f\u7406\uff0c\u4ef7\u683c\u670995%\u7684\u65f6\u95f4\u4f1a\u5728\u4e0a\u4e0b\u8f68\u4e4b\u95f4\u6ce2\u52a8\u3002<\/p>\n\n\n\n<p><strong>\u6211\u7684\u4f7f\u7528\u903b\u8f91:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u505a\u591a\u65f6\uff1a\u4ef7\u683c\u4e0d\u80fd\u5728\u4e0a\u8f68\u6216\u4ee5\u4e0a(\u907f\u514d\u8ffd\u9ad8\u88ab\u5957)\uff1b<\/li>\n\n\n\n<li>\u505a\u7a7a\u65f6\uff1a\u4ef7\u683c\u4e0d\u80fd\u5728\u4e0b\u8f68\u6216\u4ee5\u4e0b(\u907f\u514d\u6740\u8dcc\u88ab\u53cd\u5f39)\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.5 \u56db\u5927\u6307\u6807\u534f\u540c\u5de5\u4f5c\u6d41\u7a0b<\/strong><\/h3>\n\n\n\n<p>\u5355\u72ec\u4f7f\u7528\u4efb\u4f55\u4e00\u4e2a\u6307\u6807\u90fd\u5bb9\u6613\u4ea7\u751f\u5047\u4fe1\u53f7\uff0c\u4f46\u5f53\u56db\u4e2a\u6307\u6807\u540c\u65f6\u6ee1\u8db3\u6761\u4ef6\u65f6,\u4fe1\u53f7\u7684\u53ef\u9760\u6027\u4f1a\u5927\u5927\u63d0\u5347\u3002\u4e0b\u9762\u662f\u6211\u7684<strong>\u505a\u591a\u4fe1\u53f7<\/strong>\u751f\u6210\u6761\u4ef6:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th class=\"has-text-align-left\" data-align=\"left\">\u6307\u6807<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u6761\u4ef6<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u4f5c\u7528<\/th><\/tr><tr><td>EMA\u5747\u7ebf<\/td><td>\u5feb\u7ebf\u4e0a\u7a7f\u6162\u7ebf(\u91d1\u53c9)<\/td><td>\u786e\u8ba4\u77ed\u671f\u8d8b\u52bf\u5411\u4e0a<\/td><\/tr><tr><td>5\u5206\u949f\u8d8b\u52bf<\/td><td>5\u5206\u949fEMA20\u663e\u793a\u4e0a\u5347\u8d8b\u52bf<\/td><td>\u786e\u8ba4\u5927\u5468\u671f\u65b9\u5411\u4e00\u81f4<\/td><\/tr><tr><td>RSI\u6307\u6807<\/td><td>RSI\u572840-70\u4e4b\u95f4<\/td><td>\u907f\u514d\u8d85\u4e70\u533a\u57df\u8ffd\u9ad8<\/td><\/tr><tr><td>MACD\u67f1\u72b6\u56fe<\/td><td>\u67f1\u72b6\u56fe\u4e3a\u6b63\u503c<\/td><td>\u786e\u8ba4\u4e0a\u6da8\u52a8\u80fd\u5145\u8db3<\/td><\/tr><tr><td>\u5e03\u6797\u5e26<\/td><td>\u4ef7\u683c\u4f4e\u4e8e\u4e0a\u8f68<\/td><td>\u907f\u514d\u5728\u6781\u7aef\u4f4d\u7f6e\u8fdb\u573a<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u53ea\u6709\u5f53<strong>\u6240\u6709\u6761\u4ef6\u540c\u65f6\u6ee1\u8db3<\/strong>\u65f6\uff0c\u7cfb\u7edf\u624d\u4f1a\u751f\u6210\u505a\u591a\u4fe1\u53f7\u3002\u505a\u7a7a\u4fe1\u53f7\u7684\u903b\u8f91\u6b63\u597d\u76f8\u53cd\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u30015\u5206\u949f\u9ad8\u5468\u671f\u8d8b\u52bf\u8fc7\u6ee4:\u53ea\u505a\u987a\u52bf\u5355<\/strong><\/h2>\n\n\n\n<p>\u5f88\u591a\u65b0\u624b\u505a\u4ea4\u6613\uff0c\u559c\u6b22\u57281\u5206\u949f\u56fe\u4e0a\u6293\u5c0f\u6ce2\u52a8\uff0c\u7ed3\u679c\u7ecf\u5e38\u88ab\u6765\u56de\u6253\u8138\u3002\u8fd9\u662f\u56e0\u4e3a<strong>\u5c0f\u5468\u671f\u7684\u566a\u97f3\u592a\u591a<\/strong>\u3002<\/p>\n\n\n\n<p>\u6211\u7684\u89e3\u51b3\u65b9\u6848\u662f\uff1a<strong>\u75285\u5206\u949f\u5468\u671f\u5224\u65ad\u5927\u8d8b\u52bf\uff0c\u53ea\u5728\u8d8b\u52bf\u65b9\u5411\u505a\u5355<\/strong>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3.1 \u8d8b\u52bf\u5224\u65ad\u903b\u8f91<\/h3>\n\n\n\n<p>\u7cfb\u7edf\u4f1a\u628a1\u5206\u949fK\u7ebf\u91cd\u65b0\u91c7\u6837\u62105\u5206\u949fK\u7ebf\uff0c\u7136\u540e\u8ba1\u7b975\u5206\u949f\u768420\u5468\u671fEMA\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5982\u679c5\u5206\u949f\u6536\u76d8\u4ef7 > 5\u5206\u949fEMA20\uff0c\u5224\u65ad\u4e3a<strong>\u4e0a\u5347\u8d8b\u52bf\uff0c<\/strong>\u53ea\u5141\u8bb8\u505a\u591a\u3002<\/li>\n\n\n\n<li>\u5982\u679c5\u5206\u949f\u6536\u76d8\u4ef7 &lt; 5\u5206\u949fEMA20\uff0c\u5224\u65ad\u4e3a<strong>\u4e0b\u964d\u8d8b\u52bf\uff0c<\/strong>\u53ea\u5141\u8bb8\u505a\u7a7a\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8fd9\u6837\u505a\u7684\u597d\u5904:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2705 \u907f\u514d\u5728\u9707\u8361\u5e02\u4e2d\u6765\u56de\u88ab\u6253\uff1b<\/li>\n\n\n\n<li>\u2705 \u63d0\u9ad8\u4fe1\u53f7\u7684\u6210\u529f\u7387\uff1b<\/li>\n\n\n\n<li>\u2705 \u7b26\u5408&#8221;\u987a\u52bf\u800c\u4e3a&#8221;\u7684\u4ea4\u6613\u54f2\u5b66\uff1b<\/li>\n<\/ul>\n\n\n\n<p><strong>\u5b9e\u6218\u7ecf\u9a8c:<\/strong>&nbsp;\u6211\u6d4b\u8bd5\u8fc7\u5f88\u591a\u5468\u671f\u7ec4\u5408\uff0c\u53d1\u73b01\u5206\u949f\u4fe1\u53f7+5\u5206\u949f\u8d8b\u52bf\u8fc7\u6ee4\u662f\u6700\u4f73\u642d\u914d\u300215\u5206\u949f\u592a\u6162\uff0c3\u5206\u949f\u53c8\u4e0d\u591f\u7a33\u5b9a\uff0c5\u5206\u949f\u521a\u521a\u597d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001Gemini AI\u667a\u80fd\u8fc7\u6ee4\uff1a\u673a\u5668\u4eba\u7684&#8221;\u5927\u8111&#8221;<\/strong><\/h2>\n\n\n\n<p>\u524d\u9762\u8bb2\u7684\u56db\u5927\u6307\u6807\u548c\u8d8b\u52bf\u8fc7\u6ee4,\u90fd\u662f\u57fa\u4e8e\u89c4\u5219\u7684\u786c\u6027\u7b5b\u9009\u3002\u4f46\u5e02\u573a\u662f\u590d\u6742\u7684\uff0c\u6709\u65f6\u5019\u5373\u4f7f\u6240\u6709\u6307\u6807\u90fd\u6ee1\u8db3\uff0c\u4fe1\u53f7\u8d28\u91cf\u4e5f\u53ef\u80fd\u4e0d\u9ad8\u3002<\/p>\n\n\n\n<p>\u8fd9\u65f6\u5019\u5c31\u9700\u8981<strong>AI\u6765\u505a\u6700\u540e\u7684\u5224\u65ad<\/strong>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.1 \u4e3a\u4ec0\u4e48\u9009\u62e9Gemini AI?<\/strong><\/h3>\n\n\n\n<p>\u6211\u5bf9\u6bd4\u8fc7ChatGPT\u3001Claude\u3001DeepSeek\u3001Gemini\u7b49\u591a\u4e2aAI\u6a21\u578b\uff0c\u6700\u7ec8\u9009\u62e9\u4e86\u8c37\u6b4c\u7684<strong>Gemini Flash 3\uff0c\u539f\u56e0\u6709\u4e09:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u63a8\u7406\u80fd\u529b\u5f3a\uff1a\u80fd\u7406\u89e3\u590d\u6742\u7684\u5e02\u573a\u6570\u636e\u7ec4\u5408\uff1b<\/li>\n\n\n\n<li>\u54cd\u5e94\u901f\u5ea6\u5feb\uff1a\u5ef6\u8fdf\u4f4e,\u9002\u5408\u5b9e\u65f6\u4ea4\u6613\u573a\u666f\uff1b<\/li>\n\n\n\n<li>\u514d\u8d39\u989d\u5ea6\u5927\uff1a\u5bf9\u4e2a\u4eba\u5f00\u53d1\u8005\u53cb\u597d\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.2 AI\u8fc7\u6ee4\u7684\u5de5\u4f5c\u6d41\u7a0b<\/strong><\/h3>\n\n\n\n<p>\u5f53\u7cfb\u7edf\u751f\u6210\u4e00\u4e2a\u4ea4\u6613\u4fe1\u53f7\u540e\uff0c\u4f1a\u505a\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u6784\u5efa\u5e02\u573a\u5feb\u7167\uff1a\u6536\u96c6\u6700\u8fd150\u6839K\u7ebf\u7684\u6536\u76d8\u4ef7\u3001RSI\u503c\u3001MACD\u67f1\u72b6\u56fe\u3002<\/li>\n\n\n\n<li>\u751f\u6210\u63d0\u793a\u8bcd\uff1a\u628a\u5f53\u524d\u4fe1\u53f7\u65b9\u5411\u3001\u8d8b\u52bf\u3001\u6307\u6807\u6570\u503c\u3001\u5e02\u573a\u5feb\u7167\u6253\u5305\u6210\u4e00\u6bb5\u6587\u5b57\u3002<\/li>\n\n\n\n<li>\u8be2\u95eeAI\uff1a&#8221;\u8fd9\u4e2a\u4fe1\u53f7\u770b\u8d77\u6765\u662f\u5728\u5e72\u51c0\u7684\u8d8b\u52bf\u73af\u5883,\u8fd8\u662f\u5728\u9707\u8361\u6df7\u4e71\u7684\u73af\u5883?&#8221;<\/li>\n\n\n\n<li>\u83b7\u53d6\u5224\u65ad\uff1aAI\u8fd4\u56de&#8221;APPROVE&#8221;(\u6279\u51c6)\u6216&#8221;SKIP&#8221;(\u8df3\u8fc7)\u3002<\/li>\n\n\n\n<li>\u6267\u884c\u51b3\u7b56\uff1a\u53ea\u6709AI\u6279\u51c6\u7684\u4fe1\u53f7\u624d\u4f1a\u771f\u6b63\u4e0b\u5355\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.3 AI\u63d0\u793a\u8bcd\u793a\u4f8b<\/strong><\/h3>\n\n\n\n<p>\u4e0b\u9762\u662f\u6211\u7ed9AI\u7684\u63d0\u793a\u8bcd\u6a21\u677f(\u7b80\u5316\u7248)\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>\u4f60\u662f\u4e00\u4e2a\u4ea4\u6613\u52a9\u624b,\u5e2e\u52a9\u8fc7\u6ee4\u4ea4\u6613\u4fe1\u53f7\u3002<\/code><code>\u5f53\u524d\u4fe1\u53f7:\u505a\u591a(CALL)<\/code><code>5\u5206\u949f\u8d8b\u52bf:\u4e0a\u5347<\/code><code>\u5f53\u524d\u4ef7\u683c:1.08500<\/code><code>\u5f53\u524dRSI:55.2<\/code><code>\u5f53\u524dMACD\u67f1\u72b6\u56fe:0.00012<\/code><code>\u5e03\u6797\u5e26\u4e0a\u8f68:1.08650<\/code><code>\u5e03\u6797\u5e26\u4e0b\u8f68:1.08350<\/code><code>\u6700\u8fd150\u6839K\u7ebf\u6536\u76d8\u4ef7:&#91;1.0840, 1.0845, 1.0850, ...]<\/code><code>\u6700\u8fd150\u6839RSI\u503c:&#91;52.1, 53.5, 55.2, ...]<\/code><code>\u6700\u8fd150\u6839MACD\u67f1\u72b6\u56fe:&#91;0.00008, 0.00010, 0.00012, ...]<\/code><code>\u8bf7\u5224\u65ad\u8fd9\u4e2a\u4fe1\u53f7\u662f\u5426\u5904\u4e8e\u5e72\u51c0\u7684\u8d8b\u52bf\u73af\u5883\u3002<\/code><code>\u5982\u679c\u5e02\u573a\u770b\u8d77\u6765\u6e05\u6670\u3001\u65b9\u5411\u660e\u786e,\u8bf7\u56de\u590d\"APPROVE\"\u3002<\/code><code>\u5982\u679c\u5e02\u573a\u770b\u8d77\u6765\u6df7\u4e71\u3001\u9707\u8361\u3001\u4e0d\u786e\u5b9a,\u8bf7\u56de\u590d\"SKIP\"\u3002<\/code><code>\u7b2c\u4e00\u884c\u8f93\u51fa:APPROVE \u6216 SKIP<\/code><code>\u7b2c\u4e8c\u884c\u8f93\u51fa:\u7b80\u77ed\u7406\u7531<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4.4 AI\u8fc7\u6ee4\u7684\u5b9e\u9645\u6548\u679c<\/h3>\n\n\n\n<p>\u6211\u505a\u4e86\u4e00\u4e2a\u6708\u7684\u56de\u6d4b\u5bf9\u6bd4\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th class=\"has-text-align-left\" data-align=\"left\">\u6a21\u5f0f<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u4fe1\u53f7\u603b\u6570<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u80dc\u7387<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u76c8\u4e8f\u6bd4<\/th><\/tr><tr><td>\u4ec5\u7528\u6280\u672f\u6307\u6807<\/td><td>156\u4e2a<\/td><td>65.4%<\/td><td>1.2:1<\/td><\/tr><tr><td>\u52a0\u5165AI\u8fc7\u6ee4<\/td><td>89\u4e2a(\u8fc7\u6ee4\u638967\u4e2a)<\/td><td>78.7%<\/td><td>1.5:1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u867d\u7136AI\u8fc7\u6ee4\u6389\u4e8643%\u7684\u4fe1\u53f7\uff0c\u4f46\u5269\u4e0b\u7684\u4fe1\u53f7\u8d28\u91cf\u660e\u663e\u63d0\u5347\uff0c\u80dc\u7387\u4ece65%\u63d0\u9ad8\u523079%\uff0c\u76c8\u4e8f\u6bd4\u4e5f\u4ece1.2\u63d0\u5347\u52301.5\u3002<\/p>\n\n\n\n<p><strong>\u91cd\u8981\u63d0\u793a\uff1a<\/strong>&nbsp;AI\u4e0d\u662f\u4e07\u80fd\u7684\uff0c\u5b83\u4e5f\u4f1a\u72af\u9519\u3002\u6211\u7684\u7b56\u7565\u662f\u628aAI\u5f53\u4f5c&#8221;\u53c2\u8c0b&#8221;\uff0c\u800c\u4e0d\u662f&#8221;\u53f8\u4ee4&#8221;\u3002\u6700\u7ec8\u7684\u4ea4\u6613\u903b\u8f91\u8fd8\u662f\u57fa\u4e8e\u6280\u672f\u6307\u6807\uff0cAI\u53ea\u662f\u5e2e\u6211\u4eec\u8fc7\u6ee4\u6389\u4e00\u4e9b\u4f4e\u8d28\u91cf\u4fe1\u53f7\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u5b8c\u6574Python\u4ee3\u7801\u5b9e\u73b0\uff1a\u624b\u628a\u624b\u6559\u5b66<\/h2>\n\n\n\n<p>\u7406\u8bba\u8bb2\u5b8c\u4e86\uff0c\u73b0\u5728\u8fdb\u5165\u6700\u6fc0\u52a8\u4eba\u5fc3\u7684\u90e8\u5206\u2014\u2014<strong>\u4ee3\u7801\u5b9e\u73b0\uff01<\/strong><\/p>\n\n\n\n<p>\u6211\u4f1a\u628a\u5b8c\u6574\u4ee3\u7801\u5206\u6210\u51e0\u4e2a\u6a21\u5757\u6765\u8bb2\u89e3\uff0c\u6bcf\u4e2a\u6a21\u5757\u90fd\u6709\u8be6\u7ec6\u6ce8\u91ca\u3002\u5373\u4f7f\u4f60\u662fPython\u65b0\u624b\uff0c\u8ddf\u7740\u6211\u7684\u6b65\u9aa4\u4e5f\u80fd\u8dd1\u8d77\u6765\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5.1 \u73af\u5883\u51c6\u5907<\/h3>\n\n\n\n<p>\u9996\u5148\u4f60\u9700\u8981\u5b89\u88c5\u4ee5\u4e0bPython\u5e93\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip&nbsp;install yfinance pandas numpy pytz requests google-generativeai<\/code><\/pre>\n\n\n\n<p><strong>\u5404\u4e2a\u5e93\u7684\u4f5c\u7528\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>yfinance\uff1a\u4ece\u96c5\u864e\u8d22\u7ecf\u83b7\u53d6\u5916\u6c47\u5386\u53f2\u6570\u636e\u3002<\/li>\n\n\n\n<li>pandas\uff1a\u6570\u636e\u5904\u7406\u548c\u5206\u6790\u3002<\/li>\n\n\n\n<li>numpy\uff1a\u6570\u503c\u8ba1\u7b97\u3002<\/li>\n\n\n\n<li>pytz\uff1a\u65f6\u533a\u5904\u7406(\u6211\u7528\u7684\u662f\u8fea\u62dc\u65f6\u95f4)\u3002<\/li>\n\n\n\n<li>requests\uff1a\u53d1\u9001Telegram\u6d88\u606f\u901a\u77e5\u3002<\/li>\n\n\n\n<li>google-generativeai\uff1a\u8c03\u7528Gemini AI\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.2 \u914d\u7f6e\u53c2\u6570<\/strong><\/h3>\n\n\n\n<p>\u5728\u4ee3\u7801\u5f00\u5934,\u6211\u4eec\u5148\u5b9a\u4e49\u6240\u6709\u7684\u914d\u7f6e\u53c2\u6570:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code># \u4ea4\u6613\u54c1\u79cd\u548c\u5468\u671f<\/code><code>PAIR&nbsp;=&nbsp;\"EURUSD=X\"&nbsp;# \u6b27\u7f8e\u5916\u6c47<\/code><code>INTERVAL&nbsp;=&nbsp;\"1m\"&nbsp;# 1\u5206\u949fK\u7ebf<\/code><code># \u6280\u672f\u6307\u6807\u53c2\u6570<\/code><code>EMA_FAST&nbsp;=&nbsp;9&nbsp;# \u5feb\u7ebf\u5468\u671f<\/code><code>EMA_SLOW&nbsp;=&nbsp;21&nbsp;# \u6162\u7ebf\u5468\u671f<\/code><code>RSI_PERIOD&nbsp;=&nbsp;14&nbsp;# RSI\u5468\u671f<\/code><code>MACD_FAST&nbsp;=&nbsp;12&nbsp;# MACD\u5feb\u7ebf<\/code><code>MACD_SLOW&nbsp;=&nbsp;26&nbsp;# MACD\u6162\u7ebf<\/code><code>MACD_SIGNAL&nbsp;=&nbsp;9&nbsp;# MACD\u4fe1\u53f7\u7ebf<\/code><code>BB_PERIOD&nbsp;=&nbsp;20&nbsp;# \u5e03\u6797\u5e26\u5468\u671f<\/code><code>BB_STD&nbsp;=&nbsp;2&nbsp;# \u5e03\u6797\u5e26\u6807\u51c6\u5dee\u500d\u6570<\/code><code># \u4ea4\u6613\u8bbe\u7f6e<\/code><code>CHECK_EVERY_SECONDS&nbsp;=&nbsp;60&nbsp;# \u6bcf60\u79d2\u68c0\u67e5\u4e00\u6b21<\/code><code>EXIT_CANDLES&nbsp;=&nbsp;5&nbsp;# \u6301\u4ed35\u6839K\u7ebf\u540e\u5e73\u4ed3<\/code><code>ONE_SIGNAL_PER_HOUR&nbsp;=&nbsp;True&nbsp;# \u6bcf\u5c0f\u65f6\u53ea\u53d1\u4e00\u4e2a\u4fe1\u53f7<\/code><code># Telegram\u901a\u77e5<\/code><code>TELEGRAM_BOT_TOKEN&nbsp;=&nbsp;\"\u4f60\u7684\u673a\u5668\u4ebaToken\"<\/code><code>TELEGRAM_CHAT_ID&nbsp;=&nbsp;\"\u4f60\u7684\u804a\u5929ID\"<\/code><code># Gemini AI<\/code><code>GEMINI_API_KEY&nbsp;=&nbsp;\"\u4f60\u7684Gemini API\u5bc6\u94a5\"<\/code><\/code><\/pre>\n\n\n\n<p><strong>\ud83d\udca1 \u5982\u4f55\u83b7\u53d6Telegram Bot Token?<\/strong><\/p>\n\n\n\n<p>1. \u5728Telegram\u641c\u7d22@BotFather\uff1b<br>2. \u53d1\u9001\/newbot\u521b\u5efa\u673a\u5668\u4eba\uff1b<br>3. \u6309\u63d0\u793a\u8bbe\u7f6e\u540d\u79f0,\u83b7\u53d6Token\uff1b<br>4. \u641c\u7d22@userinfobot\u83b7\u53d6\u4f60\u7684Chat ID\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.3 \u6570\u636e\u83b7\u53d6\u6a21\u5757<\/strong><\/h3>\n\n\n\n<p>\u8fd9\u4e2a\u51fd\u6570\u8d1f\u8d23\u4ece\u96c5\u864e\u8d22\u7ecf\u83b7\u53d6\u6b27\u7f8e\u5916\u6c47\u7684\u5386\u53f2\u6570\u636e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>import&nbsp;yfinance&nbsp;as&nbsp;yf<\/code><code>import&nbsp;pandas&nbsp;as&nbsp;pd<\/code><code>def&nbsp;fetch_data():<\/code><code>&nbsp; &nbsp;&nbsp;\"\"\"\u83b7\u53d6EURUSD\u5386\u53f2\u6570\u636e\"\"\"<\/code><code>&nbsp; &nbsp;&nbsp;try:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;# \u4e0b\u8f7d\u6700\u8fd12\u5929\u76841\u5206\u949f\u6570\u636e<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; df = yf.download(PAIR, period=\"2d\", interval=INTERVAL, progress=False)<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;# \u5904\u7406\u5217\u540d(yfinance\u8fd4\u56de\u7684\u662f\u591a\u5c42\u7d22\u5f15)<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;isinstance(df.columns, pd.MultiIndex):<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; df = df.copy()<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; df&#91;\"Close\"] = df&#91;(\"Close\", PAIR)]<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; df = df.dropna()&nbsp;# \u5220\u9664\u7a7a\u503c<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;df<\/code><code>&nbsp; &nbsp;&nbsp;except&nbsp;Exception&nbsp;as&nbsp;e:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(f\"\u6570\u636e\u83b7\u53d6\u5931\u8d25:&nbsp;{e}\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;pd.DataFrame()<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.4 \u6280\u672f\u6307\u6807\u8ba1\u7b97\u6a21\u5757<\/strong><\/h3>\n\n\n\n<p>\u8fd9\u662f\u6838\u5fc3\u6a21\u5757\uff0c\u8ba1\u7b97EMA\u3001RSI\u3001MACD\u3001\u5e03\u6797\u5e26\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>def&nbsp;compute_rsi(close, period):<\/code><code>&nbsp; &nbsp;&nbsp;\"\"\"\u8ba1\u7b97RSI\u6307\u6807\"\"\"<\/code><code>&nbsp; &nbsp; delta = close.diff()&nbsp;# \u4ef7\u683c\u53d8\u5316<\/code><code>&nbsp; &nbsp; gain = delta.clip(lower=0)&nbsp;# \u4e0a\u6da8\u5e45\u5ea6<\/code><code>&nbsp; &nbsp; loss = -delta.clip(upper=0)&nbsp;# \u4e0b\u8dcc\u5e45\u5ea6<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; avg_gain = gain.ewm(alpha=1\/period, adjust=False).mean()<\/code><code>&nbsp; &nbsp; avg_loss = loss.ewm(alpha=1\/period, adjust=False).mean()<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; rs = avg_gain \/ (avg_loss +&nbsp;1e-10)&nbsp;# \u76f8\u5bf9\u5f3a\u5ea6<\/code><code>&nbsp; &nbsp; rsi =&nbsp;100&nbsp;- (100&nbsp;\/ (1&nbsp;+ rs))<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;rsi<\/code><code>def&nbsp;add_indicators(df):<\/code><code>&nbsp; &nbsp;&nbsp;\"\"\"\u6dfb\u52a0\u6240\u6709\u6280\u672f\u6307\u6807\"\"\"<\/code><code>&nbsp; &nbsp; close = pd.to_numeric(df&#91;\"Close\"], errors=\"coerce\")<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# EMA\u5747\u7ebf<\/code><code>&nbsp; &nbsp; df&#91;\"ema_fast\"] = close.ewm(span=EMA_FAST, adjust=False).mean()<\/code><code>&nbsp; &nbsp; df&#91;\"ema_slow\"] = close.ewm(span=EMA_SLOW, adjust=False).mean()<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# RSI<\/code><code>&nbsp; &nbsp; df&#91;\"rsi\"] = compute_rsi(close, RSI_PERIOD)<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# MACD<\/code><code>&nbsp; &nbsp; ema_fast = close.ewm(span=MACD_FAST, adjust=False).mean()<\/code><code>&nbsp; &nbsp; ema_slow = close.ewm(span=MACD_SLOW, adjust=False).mean()<\/code><code>&nbsp; &nbsp; df&#91;\"macd\"] = ema_fast - ema_slow<\/code><code>&nbsp; &nbsp; df&#91;\"macd_signal\"] = df&#91;\"macd\"].ewm(span=MACD_SIGNAL, adjust=False).mean()<\/code><code>&nbsp; &nbsp; df&#91;\"macd_hist\"] = df&#91;\"macd\"] - df&#91;\"macd_signal\"]<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# \u5e03\u6797\u5e26<\/code><code>&nbsp; &nbsp; df&#91;\"bb_ma\"] = close.rolling(BB_PERIOD).mean()<\/code><code>&nbsp; &nbsp; df&#91;\"bb_std\"] = close.rolling(BB_PERIOD).std()<\/code><code>&nbsp; &nbsp; df&#91;\"bb_upper\"] = df&#91;\"bb_ma\"] + BB_STD * df&#91;\"bb_std\"]<\/code><code>&nbsp; &nbsp; df&#91;\"bb_lower\"] = df&#91;\"bb_ma\"] - BB_STD * df&#91;\"bb_std\"]<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;df.dropna()<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.5 \u8d8b\u52bf\u5224\u65ad\u6a21\u5757<\/strong><\/h3>\n\n\n\n<p>\u5224\u65ad5\u5206\u949f\u5468\u671f\u7684\u8d8b\u52bf\u65b9\u5411:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>def&nbsp;get_5m_trend(df):<\/code><code>&nbsp; &nbsp;&nbsp;\"\"\"\u5224\u65ad5\u5206\u949f\u8d8b\u52bf\"\"\"<\/code><code>&nbsp; &nbsp; close_1m = pd.to_numeric(df&#91;\"Close\"], errors=\"coerce\")<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# \u91cd\u91c7\u6837\u4e3a5\u5206\u949f<\/code><code>&nbsp; &nbsp; df_5m = close_1m.resample(\"5T\").last().dropna()<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;len(df_5m) &lt;&nbsp;30:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;None<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# \u8ba1\u7b975\u5206\u949fEMA20<\/code><code>&nbsp; &nbsp; ema_5m = df_5m.ewm(span=20, adjust=False).mean()<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; last_close = df_5m.iloc&#91;-1]<\/code><code>&nbsp; &nbsp; last_ema = ema_5m.iloc&#91;-1]<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;last_close &gt; last_ema:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;\"UP\"&nbsp;# \u4e0a\u5347\u8d8b\u52bf<\/code><code>&nbsp; &nbsp;&nbsp;elif&nbsp;last_close &lt; last_ema:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;\"DOWN\"&nbsp;# \u4e0b\u964d\u8d8b\u52bf<\/code><code>&nbsp; &nbsp;&nbsp;else:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;None<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.6 Gemini AI\u8fc7\u6ee4\u6a21\u5757<\/strong><\/h3>\n\n\n\n<p>\u8fd9\u662f\u6700\u5173\u952e\u7684AI\u5224\u65ad\u90e8\u5206\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>import&nbsp;google.generativeai&nbsp;as&nbsp;genai<\/code><code>genai.configure(api_key=GEMINI_API_KEY)<\/code><code>def&nbsp;ask_gemini_filter(snapshot):<\/code><code>&nbsp; &nbsp;&nbsp;\"\"\"\u8be2\u95eeGemini AI\u662f\u5426\u6279\u51c6\u4fe1\u53f7\"\"\"<\/code><code>&nbsp; &nbsp; prompt =&nbsp;f\"\"\"<\/code><code>\u4f60\u662f\u4e00\u4e2a\u4ea4\u6613\u52a9\u624b,\u5e2e\u52a9\u8fc7\u6ee4\u4fe1\u53f7\u3002<\/code><code>\u5f53\u524d\u4fe1\u53f7:{snapshot&#91;'direction']}<\/code><code>5\u5206\u949f\u8d8b\u52bf:{snapshot&#91;'trend_5m']}<\/code><code>\u5f53\u524d\u4ef7\u683c:{snapshot&#91;'price_now']}<\/code><code>\u5f53\u524dRSI:{snapshot&#91;'rsi_now']}<\/code><code>\u5f53\u524dMACD\u67f1\u72b6\u56fe:{snapshot&#91;'macd_hist_now']}<\/code><code>\u6700\u8fd150\u6839K\u7ebf\u6536\u76d8\u4ef7:{snapshot&#91;'recent_closes']}<\/code><code>\u6700\u8fd150\u6839RSI:{snapshot&#91;'recent_rsi']}<\/code><code>\u8bf7\u5224\u65ad\u8fd9\u4e2a\u4fe1\u53f7\u662f\u5426\u5728\u5e72\u51c0\u7684\u8d8b\u52bf\u73af\u5883\u4e2d\u3002<\/code><code>\u7b2c\u4e00\u884c\u8f93\u51fa:APPROVE \u6216 SKIP<\/code><code>\u7b2c\u4e8c\u884c\u8f93\u51fa:\u7b80\u77ed\u7406\u7531<\/code><code>\"\"\"<\/code><code>&nbsp; &nbsp;&nbsp;try:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; model = genai.GenerativeModel(\"gemini-1.5-flash\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; response = model.generate_content(prompt)<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; text = response.text.strip()<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; lines = &#91;line.strip()&nbsp;for&nbsp;line&nbsp;in&nbsp;text.splitlines()&nbsp;if&nbsp;line.strip()]<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; decision = lines&#91;0].upper()&nbsp;if&nbsp;lines&nbsp;else&nbsp;\"APPROVE\"<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; reason = lines&#91;1]&nbsp;if&nbsp;len(lines) &gt;&nbsp;1&nbsp;else&nbsp;\"\u65e0\u7406\u7531\"<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;decision&nbsp;not&nbsp;in&nbsp;(\"APPROVE\",&nbsp;\"SKIP\"):<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; decision =&nbsp;\"APPROVE\"<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;decision, reason<\/code><code>&nbsp; &nbsp;&nbsp;except&nbsp;Exception&nbsp;as&nbsp;e:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(f\"AI\u8c03\u7528\u5931\u8d25:&nbsp;{e}\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;\"APPROVE\",&nbsp;\"AI\u9519\u8bef,\u9ed8\u8ba4\u6279\u51c6\"<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.7 \u4fe1\u53f7\u751f\u6210\u4e3b\u903b\u8f91<\/strong><\/h3>\n\n\n\n<p>\u8fd9\u662f\u6574\u4e2a\u7cfb\u7edf\u7684\u6838\u5fc3\uff0c\u5224\u65ad\u662f\u5426\u751f\u6210\u4ea4\u6613\u4fe1\u53f7\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>def&nbsp;check_for_signal():<\/code><code>&nbsp; &nbsp;&nbsp;\"\"\"\u68c0\u67e5\u662f\u5426\u6709\u4ea4\u6613\u4fe1\u53f7\"\"\"<\/code><code>&nbsp; &nbsp;&nbsp;# 1. \u83b7\u53d6\u6570\u636e<\/code><code>&nbsp; &nbsp; df = fetch_data()<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;df.empty:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# 2. \u8ba1\u7b97\u6307\u6807<\/code><code>&nbsp; &nbsp; df = add_indicators(df)<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;len(df) &lt;&nbsp;3:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# 3. \u83b7\u53d6\u6700\u65b0\u6570\u636e<\/code><code>&nbsp; &nbsp; latest = df.iloc&#91;-1]<\/code><code>&nbsp; &nbsp; prev = df.iloc&#91;-2]<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; price =&nbsp;float(latest&#91;\"Close\"])<\/code><code>&nbsp; &nbsp; ema_fast_now =&nbsp;float(latest&#91;\"ema_fast\"])<\/code><code>&nbsp; &nbsp; ema_slow_now =&nbsp;float(latest&#91;\"ema_slow\"])<\/code><code>&nbsp; &nbsp; ema_fast_prev =&nbsp;float(prev&#91;\"ema_fast\"])<\/code><code>&nbsp; &nbsp; ema_slow_prev =&nbsp;float(prev&#91;\"ema_slow\"])<\/code><code>&nbsp; &nbsp; rsi =&nbsp;float(latest&#91;\"rsi\"])<\/code><code>&nbsp; &nbsp; macd_hist =&nbsp;float(latest&#91;\"macd_hist\"])<\/code><code>&nbsp; &nbsp; bb_upper =&nbsp;float(latest&#91;\"bb_upper\"])<\/code><code>&nbsp; &nbsp; bb_lower =&nbsp;float(latest&#91;\"bb_lower\"])<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# 4. \u5224\u65ad\u8d8b\u52bf<\/code><code>&nbsp; &nbsp; trend_5m = get_5m_trend(df)<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;trend_5m&nbsp;is&nbsp;None:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# 5. \u5224\u65adEMA\u4ea4\u53c9<\/code><code>&nbsp; &nbsp; call_cross = (ema_fast_prev &lt;= ema_slow_prev)&nbsp;and&nbsp;(ema_fast_now &gt; ema_slow_now)<\/code><code>&nbsp; &nbsp; put_cross = (ema_fast_prev &gt;= ema_slow_prev)&nbsp;and&nbsp;(ema_fast_now &lt; ema_slow_now)<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; signal =&nbsp;None<\/code><code>&nbsp; &nbsp; direction =&nbsp;None<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# 6. \u505a\u591a\u4fe1\u53f7\u5224\u65ad<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;call_cross:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;trend_5m !=&nbsp;\"UP\":<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(\"\u91d1\u53c9\u4f46\u8d8b\u52bf\u4e0d\u5411\u4e0a,\u8df3\u8fc7\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;not&nbsp;(40&nbsp;&lt;= rsi &lt;=&nbsp;70):<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(f\"\u91d1\u53c9\u4f46RSI={rsi}\u4e0d\u572840-70,\u8df3\u8fc7\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;macd_hist &lt;=&nbsp;0:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(\"\u91d1\u53c9\u4f46MACD\u67f1\u72b6\u56fe\u4e3a\u8d1f,\u8df3\u8fc7\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;price &gt;= bb_upper:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(\"\u91d1\u53c9\u4f46\u4ef7\u683c\u5728\u5e03\u6797\u5e26\u4e0a\u8f68,\u8df3\u8fc7\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;else:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; signal =&nbsp;\"\u505a\u591a(CALL)\"<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; direction =&nbsp;\"CALL\"<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# 7. \u505a\u7a7a\u4fe1\u53f7\u5224\u65ad<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;put_cross&nbsp;and&nbsp;signal&nbsp;is&nbsp;None:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;trend_5m !=&nbsp;\"DOWN\":<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(\"\u6b7b\u53c9\u4f46\u8d8b\u52bf\u4e0d\u5411\u4e0b,\u8df3\u8fc7\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;not&nbsp;(30&nbsp;&lt;= rsi &lt;=&nbsp;60):<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(f\"\u6b7b\u53c9\u4f46RSI={rsi}\u4e0d\u572830-60,\u8df3\u8fc7\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;macd_hist &gt;=&nbsp;0:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(\"\u6b7b\u53c9\u4f46MACD\u67f1\u72b6\u56fe\u4e3a\u6b63,\u8df3\u8fc7\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;price &lt;= bb_lower:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(\"\u6b7b\u53c9\u4f46\u4ef7\u683c\u5728\u5e03\u6797\u5e26\u4e0b\u8f68,\u8df3\u8fc7\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;else:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; signal =&nbsp;\"\u505a\u7a7a(PUT)\"<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; direction =&nbsp;\"PUT\"<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;# 8. AI\u8fc7\u6ee4<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;signal&nbsp;is&nbsp;not&nbsp;None:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; snapshot = {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"direction\": direction,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"trend_5m\": trend_5m,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"price_now\": price,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"rsi_now\": rsi,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"macd_hist_now\": macd_hist,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"recent_closes\": df&#91;\"Close\"].tail(50).tolist(),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"recent_rsi\": df&#91;\"rsi\"].tail(50).tolist()<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; decision, reason = ask_gemini_filter(snapshot)<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;decision ==&nbsp;\"SKIP\":<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(f\"AI\u62d2\u7edd\u4fe1\u53f7:&nbsp;{reason}\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;# 9. \u53d1\u9001\u901a\u77e5<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; message =&nbsp;f\"\"\"<\/code><code>\ud83d\ude80&nbsp;{signal}&nbsp;EURUSD<\/code><code>\u8fdb\u573a\u4ef7\u683c:&nbsp;{price}<\/code><code>RSI:&nbsp;{rsi:.1f}<\/code><code>MACD\u67f1\u72b6\u56fe:&nbsp;{macd_hist:.6f}<\/code><code>5\u5206\u949f\u8d8b\u52bf:&nbsp;{trend_5m}<\/code><code>AI\u5224\u65ad:&nbsp;{reason}<\/code><code>\"\"\"<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; send_telegram(message)<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(message)<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.8 \u4e3b\u5faa\u73af<\/strong><\/h3>\n\n\n\n<p>\u6700\u540e,\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u4e3b\u5faa\u73af\u6765\u4e0d\u65ad\u68c0\u67e5\u4fe1\u53f7\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>import&nbsp;time<\/code><code>def&nbsp;main():<\/code><code>&nbsp; &nbsp;&nbsp;print(\"\u4ea4\u6613\u673a\u5668\u4eba\u542f\u52a8...\")<\/code><code>&nbsp; &nbsp; send_telegram(\"\u2705 \u6b27\u7f8e\u5916\u6c47\u4ea4\u6613\u673a\u5668\u4eba\u5df2\u542f\u52a8\")<\/code><code>&nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp;&nbsp;while&nbsp;True:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;try:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; check_for_signal()<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;except&nbsp;Exception&nbsp;as&nbsp;e:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(f\"\u9519\u8bef:&nbsp;{e}\")<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; time.sleep(CHECK_EVERY_SECONDS)<\/code><code>if&nbsp;__name__ ==&nbsp;\"__main__\":<\/code><code>&nbsp; &nbsp; main()<\/code><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516d\u3001\u98ce\u9669\u7ba1\u7406\uff1a\u8ba9\u673a\u5668\u4eba\u6d3b\u5f97\u66f4\u4e45<\/strong><\/h2>\n\n\n\n<p>\u518d\u597d\u7684\u7b56\u7565\uff0c\u5982\u679c\u6ca1\u6709\u98ce\u9669\u7ba1\u7406\uff0c\u4e5f\u4f1a\u7206\u4ed3\u3002\u6211\u5728\u7cfb\u7edf\u4e2d\u52a0\u5165\u4e86\u591a\u5c42\u98ce\u9669\u63a7\u5236\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6.1 K\u7ebf\u5b9e\u4f53\u8fc7\u6ee4<\/h3>\n\n\n\n<p>\u5982\u679c\u5f53\u524dK\u7ebf\u7684\u5b9e\u4f53\u592a\u5c0f(\u5c0f\u4e8e\u6700\u8fd120\u6839K\u7ebf\u5e73\u5747\u5b9e\u4f53\u768430%)\uff0c\u8bf4\u660e\u5e02\u573a\u80fd\u91cf\u4e0d\u8db3,\u8df3\u8fc7\u4fe1\u53f7\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6.2 \u4ea4\u6613\u65f6\u6bb5\u9650\u5236<\/h3>\n\n\n\n<p>\u53ea\u5728\u5468\u4e00\u5230\u5468\u4e94\u768411:00-22:00(\u8fea\u62dc\u65f6\u95f4)\u4ea4\u6613,\u907f\u5f00\u5468\u672b\u548c\u6df1\u591c\u7684\u4f4e\u6d41\u52a8\u6027\u65f6\u6bb5\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6.3 \u6bcf\u5c0f\u65f6\u4fe1\u53f7\u9650\u5236<\/h3>\n\n\n\n<p>\u8bbe\u7f6e<code>ONE_SIGNAL_PER_HOUR = True\uff0c<\/code>\u6bcf\u5c0f\u65f6\u53ea\u5728\u6574\u70b9\u53d1\u4fe1\u53f7\uff0c\u907f\u514d\u9891\u7e41\u4ea4\u6613\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6.4 \u81ea\u52a8\u6b62\u76c8\u6b62\u635f<\/h3>\n\n\n\n<p>\u6bcf\u7b14\u4ea4\u6613\u6301\u4ed35\u6839K\u7ebf(5\u5206\u949f)\u540e\u81ea\u52a8\u5e73\u4ed3\uff0c\u5bf9\u6bd4\u8fdb\u573a\u4ef7\u548c\u51fa\u573a\u4ef7\u5224\u65ad\u76c8\u4e8f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6.5 \u6bcf\u65e5\u7edf\u8ba1<\/h3>\n\n\n\n<p>\u7cfb\u7edf\u4f1a\u8bb0\u5f55\u6bcf\u5929\u7684\u80dc\u7387\u548c\u76c8\u4e8f\uff0c\u6bcf\u5929\u7ed3\u675f\u65f6\u53d1\u9001\u7edf\u8ba1\u62a5\u544a\u5230Telegram\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e03\u3001\u5b9e\u6218\u6548\u679c\u4e0e\u4f18\u5316\u5efa\u8bae<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>7.1 \u6211\u7684\u5b9e\u76d8\u6d4b\u8bd5\u7ed3\u679c<\/strong><\/h3>\n\n\n\n<p>\u6211\u7528\u8fd9\u5957\u7cfb\u7edf\u5728\u6a21\u62df\u76d8\u8dd1\u4e863\u4e2a\u6708\uff0c\u6570\u636e\u5982\u4e0b:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th class=\"has-text-align-left\" data-align=\"left\">\u6307\u6807<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u6570\u503c<\/th><\/tr><tr><td>\u603b\u4ea4\u6613\u6b21\u6570<\/td><td>127\u6b21<\/td><\/tr><tr><td>\u80dc\u7387<\/td><td>78.7%<\/td><\/tr><tr><td>\u76c8\u4e8f\u6bd4<\/td><td>1.5:1<\/td><\/tr><tr><td>\u6700\u5927\u8fde\u7eed\u4e8f\u635f<\/td><td>3\u6b21<\/td><\/tr><tr><td>\u6700\u5927\u56de\u64a4<\/td><td>8.2%<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7.2 \u4f18\u5316\u5efa\u8bae<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u53c2\u6570\u4f18\u5316\uff1a\u53ef\u4ee5\u7528\u9057\u4f20\u7b97\u6cd5\u6216\u7f51\u683c\u641c\u7d22\u627e\u5230\u6700\u4f18\u7684EMA\u3001RSI\u3001MACD\u53c2\u6570\u7ec4\u5408\u3002<\/li>\n\n\n\n<li>\u591a\u54c1\u79cd\uff1a\u9664\u4e86\u6b27\u7f8e\uff0c\u8fd8\u53ef\u4ee5\u6d4b\u8bd5\u9ec4\u91d1\u3001\u6bd4\u7279\u5e01\u7b49\u54c1\u79cd\u3002<\/li>\n\n\n\n<li>\u4ed3\u4f4d\u7ba1\u7406\uff1a\u6839\u636e\u4fe1\u53f7\u5f3a\u5ea6\u52a8\u6001\u8c03\u6574\u4ed3\u4f4d\uff0c\u5f3a\u4fe1\u53f7\u52a0\u4ed3\uff0c\u5f31\u4fe1\u53f7\u51cf\u4ed3\u3002<\/li>\n\n\n\n<li>\u673a\u5668\u5b66\u4e60\uff1a\u7528\u5386\u53f2\u6570\u636e\u8bad\u7ec3\u6a21\u578b\uff0c\u9884\u6d4b\u4fe1\u53f7\u7684\u6210\u529f\u6982\u7387\u3002<\/li>\n\n\n\n<li>\u60c5\u7eea\u6307\u6807\uff1a\u52a0\u5165VIX\u6050\u614c\u6307\u6570\u3001\u8d44\u91d1\u6d41\u5411\u7b49\u5b8f\u89c2\u6307\u6807\u3002<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516b\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u7b54<\/strong><br><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Q1: \u8fd9\u5957\u7cfb\u7edf\u80fd\u4fdd\u8bc1\u76c8\u5229\u5417?<\/h3>\n\n\n\n<p><strong>A:<\/strong>&nbsp;\u4e0d\u80fd\u3002\u4efb\u4f55\u4ea4\u6613\u7cfb\u7edf\u90fd\u65e0\u6cd5\u4fdd\u8bc1100%\u76c8\u5229\u3002\u8fd9\u5957\u7cfb\u7edf\u53ea\u662f\u63d0\u9ad8\u4e86\u80dc\u7387\uff0c\u4f46\u5e02\u573a\u662f\u4e0d\u53ef\u9884\u6d4b\u7684\uff0c\u4e00\u5b9a\u8981\u505a\u597d\u98ce\u9669\u7ba1\u7406\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q2: \u6211\u4e0d\u61c2\u7f16\u7a0b\uff0c\u80fd\u7528\u5417?<\/h3>\n\n\n\n<p><strong>A:<\/strong>&nbsp;\u5982\u679c\u4f60\u5b8c\u5168\u4e0d\u61c2\u7f16\u7a0b\uff0c\u5efa\u8bae\u5148\u5b66\u4e60Python\u57fa\u7840\u3002\u5982\u679c\u4f60\u4f1a\u4e00\u70b9\uff0c\u8ddf\u7740\u6211\u7684\u4ee3\u7801\u6ce8\u91ca\u5e94\u8be5\u80fd\u8dd1\u8d77\u6765\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q3: Gemini AI\u4f1a\u4e0d\u4f1a\u5f88\u8d35?<\/h3>\n\n\n\n<p><strong>A:<\/strong>&nbsp;Gemini\u6709\u514d\u8d39\u989d\u5ea6\uff0c\u4e2a\u4eba\u4f7f\u7528\u5b8c\u5168\u591f\u4e86\u3002\u5982\u679c\u8d85\u4e86\uff0c\u53ef\u4ee5\u5347\u7ea7\u4ed8\u8d39\u7248\uff0c\u4ef7\u683c\u4e5f\u4e0d\u8d35\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q4: \u4e3a\u4ec0\u4e48\u9009\u62e9\u6b27\u7f8e\u5916\u6c47?<\/h3>\n\n\n\n<p><strong>A:<\/strong>&nbsp;\u6b27\u7f8e\u662f\u5168\u7403\u4ea4\u6613\u91cf\u6700\u5927\u7684\u5916\u6c47\u5bf9\uff0c\u6d41\u52a8\u6027\u597d,\u70b9\u5dee\u5c0f\uff0c\u9002\u5408\u91cf\u5316\u4ea4\u6613\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q5: \u80fd\u76f4\u63a5\u8fde\u63a5\u5238\u5546\u81ea\u52a8\u4e0b\u5355\u5417?<\/h3>\n\n\n\n<p><strong>A:<\/strong>&nbsp;\u53ef\u4ee5,\u4f46\u9700\u8981\u5bf9\u63a5\u5238\u5546\u7684API\u3002\u4e0d\u540c\u5238\u5546\u63a5\u53e3\u4e0d\u540c,\u9700\u8981\u5355\u72ec\u5f00\u53d1\u3002\u6211\u8fd9\u5957\u7cfb\u7edf\u76ee\u524d\u53ea\u505a\u4fe1\u53f7\u63d0\u793a\uff0c\u624b\u52a8\u4e0b\u5355\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e5d\u3001\u603b\u7ed3\u4e0e\u5c55\u671b<\/strong><\/h2>\n\n\n\n<p>\u672c\u6587\u7cfb\u7edf\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528Python\u8bed\u8a00\u642d\u5efa\u4e00\u5957\u878d\u5408\u7ecf\u5178\u6280\u672f\u6307\u6807\u4e0e\u4eba\u5de5\u667a\u80fd\u8fc7\u6ee4\u7684\u6b27\u7f8e\u5916\u6c47\u81ea\u52a8\u4ea4\u6613\u7cfb\u7edf\u3002\u7cfb\u7edf\u91c7\u7528\u6a21\u5757\u5316\u8bbe\u8ba1\uff0c\u6db5\u76d6\u6570\u636e\u83b7\u53d6\u3001\u6307\u6807\u8ba1\u7b97\u3001\u4fe1\u53f7\u751f\u6210\u3001\u98ce\u9669\u7ba1\u7406\u3001\u4ea4\u6613\u6267\u884c\u548c\u7ed3\u679c\u901a\u77e5\u5168\u6d41\u7a0b,\u4e3a\u91cf\u5316\u4ea4\u6613\u7231\u597d\u8005\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684\u5b9e\u6218\u53c2\u8003\u65b9\u6848\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u56db\u91cd\u6280\u672f\u8fc7\u6ee4\u534f\u540c\u5de5\u4f5c\uff1aEMA\u6355\u6349\u8d8b\u52bf\u3001RSI\u5224\u65ad\u8d85\u4e70\u8d85\u5356\u3001MACD\u786e\u8ba4\u52a8\u91cf\u3001\u5e03\u6797\u5e26\u8bc6\u522b\u6ce2\u52a8\u3002<\/li>\n\n\n\n<li>5\u5206\u949f\u9ad8\u5468\u671f\u8d8b\u52bf\u8fc7\u6ee4\u673a\u5236,\u786e\u4fdd\u53ea\u5728\u5927\u8d8b\u52bf\u65b9\u5411\u4ea4\u6613,\u6709\u6548\u964d\u4f4e\u5047\u4fe1\u53f7\u3002<\/li>\n\n\n\n<li>\u8c37\u6b4cGemini AI\u667a\u80fd\u8fc7\u6ee4\u5c42,\u901a\u8fc7\u5206\u6790\u5e02\u573a\u5feb\u7167\u6570\u636e,\u81ea\u52a8\u8bc6\u522b\u5e76\u8df3\u8fc7\u4f4e\u8d28\u91cf\u4fe1\u53f7\u3002<\/li>\n\n\n\n<li>\u5b8c\u6574\u7684\u98ce\u9669\u7ba1\u7406\u4f53\u7cfb,\u5305\u542bK\u7ebf\u5b9e\u4f53\u8fc7\u6ee4\u3001\u4ea4\u6613\u65f6\u6bb5\u9650\u5236\u3001\u6bcf\u5c0f\u65f6\u4fe1\u53f7\u63a7\u5236\u548c\u81ea\u52a8\u6b62\u76c8\u6b62\u635f\u3002<\/li>\n\n\n\n<li>\u5168\u6d41\u7a0bPython\u4ee3\u7801\u5b9e\u73b0,\u4eceyfinance\u6570\u636e\u83b7\u53d6\u5230Telegram\u6d88\u606f\u63a8\u9001,\u63d0\u4f9b\u53ef\u76f4\u63a5\u8fd0\u884c\u7684\u5b8c\u6574\u65b9\u6848\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u5341\u3001\u5b8c\u6574\u7248\u6e90\u4ee3\u7801\u4e0b\u8f7d<\/strong><\/h2>\n\n\n\n<p><strong>\u6211\u4e3a\u5927\u5bb6\u51c6\u5907\u4e86\u5b8c\u6574\u7684\u4ee3\u7801\u548c\u8bf4\u660e\uff0c\u9700\u8981\u7684\u670b\u53cb\u7ee7\u7eed\u8bf7\u5f80\u4e0b\u770b\u3002\u9996\u5148\u662f\u6d41\u7a0b\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L0HX6Xoiaf68ibcfKR0deMkFCWziawBscGK3LjIGFcAQRZ0mtn3CeoUx7T17BewdJT7eH29XmE8J4shw\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\" style=\"aspect-ratio:0.25459793509232875;width:464px;height:auto\"\/><\/figure>\n\n\n\n<p><strong>\u7136\u540e\u662f\u4ee3\u7801\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L0HX6Xoiaf68ibcfKR0deMkFCST8p1Gf9zWAiarkstby7Znwa41NwwCj5odbicCPHU2aeMyQbgw776bJg\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L0HX6Xoiaf68ibcfKR0deMkFCHRIn9exF2zh10BM6AzAVppvO1cJkEneXylGwdUiaKP1vtMZKQaoDHWg\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L0HX6Xoiaf68ibcfKR0deMkFCibbAQPQjV6563ACq4fgCZBAGlAiaKkNBx2OJvZWcfRZcJxqm22bjpoHQ\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>\u4e0a\u9762\u662f\u90e8\u5206\u622a\u56fe\uff0c\u9700\u8981\u7684\u7559\u8a00\u83b7\u5f97\u3002<\/strong><\/p>\n\n\n\n<p>&nbsp;<a>#Python\u91cf\u5316\u4ea4\u6613<\/a>&nbsp;<a>#\u5916\u6c47\u4ea4\u6613\u673a\u5668\u4eba<\/a>&nbsp;<a>#\u6280\u672f\u6307\u6807\u7b56\u7565<\/a>&nbsp;<a>#\u4eba\u5de5\u667a\u80fd\u4ea4\u6613<\/a>&nbsp;<a>#\u81ea\u52a8\u5316\u4ea4\u6613\u7cfb\u7edf<\/a>&nbsp;<a>#EMA\u5747\u7ebf\u7b56\u7565<\/a>&nbsp;<a>#RSI\u6307\u6807\u5e94\u7528<\/a>&nbsp;<a>#MACD\u8d8b\u52bf\u5206\u6790<\/a>&nbsp;<a>#\u5e03\u6797\u5e26\u4ea4\u6613<\/a>&nbsp;<a>#GeminiAI<\/a>&nbsp;<a>#\u91cf\u5316\u6295\u8d44\u5165\u95e8<\/a>&nbsp;<a>#\u7a0b\u5e8f\u5316\u4ea4\u6613<\/a>&nbsp;<a>#\u91d1\u878d\u79d1\u6280<\/a>&nbsp;<a>#\u7b97\u6cd5\u4ea4\u6613<\/a>&nbsp;<a>#\u4ea4\u6613\u4fe1\u53f7\u7cfb\u7edf<\/a><\/p>\n\n\n\n<p>\u611f\u8c22\u9605\u8bfb\uff01\u613f\u672c\u6587\u4e3a\u60a8\u5e26\u6765\u65b0\u542f\u53d1\u4e0e\u5b9e\u7528\u77e5\u8bc6\u3002\u82e5\u89c9\u6709\u76ca\uff0c\u8bf7\u70b9\u8d5e\u5206\u4eab\uff0c\u60a8\u7684\u652f\u6301\u662f\u6211\u521b\u4f5c\u7684\u52a8\u529b\uff0c\u6b22\u8fce\u7559\u8a00\u5fc5\u590d\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"has-text-align-center\"><strong>\u98ce\u9669\u63d0\u793a\uff1a<\/strong><em>\u672c<em>\u6587\u4ec5\u4f9b\u53c2\u8003\uff0c\u4e0d\u6784\u6210\u6295\u8d44\u5efa\u8bae\u3002\u91cf\u5316\u7b56\u7565\u5f00\u53d1\u5e94\u4ee5\u5b66\u4e60\u548c\u6280\u672f\u4ea4\u6d41\u4e3a\u76ee\u7684\u3002\u6295\u8d44\u6709\u98ce\u9669\uff0c\u5165\u5e02\u9700\u8c28\u614e\u3002<\/em><\/em><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\uff1a\u8001\u4f59\u635e\u9c7c \u539f\u521b\u4e0d\u6613\uff0c\u8f6c\u8f7d\u8bf7\u6807\u660e\u51fa\u5904\u53ca\u539f\u4f5c\u8005\u3002&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/laoyulaoyu.com\/index.php\/2026\/02\/06\/%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e6%90%ad%e5%bb%ba%e4%b8%80%e4%b8%aa%e4%bc%9a%e6%80%9d%e8%80%83%e7%9a%84%e5%a4%96%e6%b1%87%e4%ba%a4%e6%98%93ai\/\">Continue reading<span class=\"screen-reader-text\">\u4ece\u96f6\u5f00\u59cb!\u624b\u628a\u624b\u6559\u4f60\u642d\u5efa\u4e00\u4e2a\u4f1a&#8221;\u601d\u8003&#8221;\u7684\u5916\u6c47\u4ea4\u6613AI\u673a\u5668\u4eba\uff08\u9644\u6e90\u7801\uff09<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[17,4,18,5,6],"class_list":{"0":"post-3517","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-aiinvest","7":"tag-ai","9":"tag-18","11":"tag-6","12":"entry"},"_links":{"self":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/comments?post=3517"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3517\/revisions"}],"predecessor-version":[{"id":3519,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3517\/revisions\/3519"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=3517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=3517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=3517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}