{"id":6378,"date":"2025-05-28T14:56:10","date_gmt":"2025-06-04T07:16:09","guid":{"rendered":"https:\/\/badgameshow.com\/steven\/?p=6378"},"modified":"2025-06-04T14:56:10","modified_gmt":"2025-06-04T07:16:09","slug":"%e5%ad%b8%e7%bf%92%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8%e7%9b%b8%e5%b0%8d%e5%8a%9b%e9%87%8f%e6%8c%87%e6%95%b8%e9%80%9a%e9%81%93relativestrengthindexchannel%e4%ba%a4%e6%98%93%e6%8c%87%e6%a8%99","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/steven\/python\/%e5%ad%b8%e7%bf%92%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8%e7%9b%b8%e5%b0%8d%e5%8a%9b%e9%87%8f%e6%8c%87%e6%95%b8%e9%80%9a%e9%81%93relativestrengthindexchannel%e4%ba%a4%e6%98%93%e6%8c%87%e6%a8%99\/","title":{"rendered":"\u4f7f\u7528 Python \u5be6\u73fe\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053 (Relative Strength Index Channel) \u4ea4\u6613\u6307\u6a19\u7684\u5b8c\u6574\u6307\u5357"},"content":{"rendered":"<p><meta name=\"keywords\" content=\"Python, \u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053, Relative Strength Index Channel, \u4ea4\u6613\u6307\u6a19, \u4f7f\u7528\u6642\u6a5f, TA-Lib, \u80a1\u7968\u5206\u6790, \u6280\u8853\u6307\u6a19\"><\/p>\n<h1>\u4f7f\u7528 Python \u5be6\u73fe\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053 (Relative Strength Index Channel) \u4ea4\u6613\u6307\u6a19\u7684\u5b8c\u6574\u6307\u5357<\/h1>\n<p>\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053\uff08Relative Strength Index Channel, RSI Channel\uff09\u662f\u4e00\u7a2e\u5ee3\u6cdb\u4f7f\u7528\u7684\u6280\u8853\u5206\u6790\u6307\u6a19\uff0c\u5e6b\u52a9\u6295\u8cc7\u8005\u5224\u65b7\u80a1\u7968\u50f9\u683c\u8d70\u52e2\uff0c\u4e26\u6293\u4f4f\u6700\u4f73\u8cb7\u8ce3\u6642\u6a5f\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053\u7684\u4f7f\u7528\u6642\u6a5f\uff0c\u4e26\u63d0\u4f9b2025\u6700\u65b0\u7684Python\u5be6\u4f5c\u7bc4\u4f8b\uff0c\u5305\u62ec\u932f\u8aa4\u6392\u9664\u53ca\u5ef6\u4f38\u61c9\u7528\u7684\u5efa\u8b70\u3002<\/p>\n<h2>\u4ec0\u9ebc\u662f\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053\uff1f<\/h2>\n<p>\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053\uff08RSI Channel\uff09\u662f\u57fa\u65bc\u76f8\u5c0d\u529b\u91cf\u6307\u6578\uff08RSI\uff09\u7684\u4e00\u7a2e\u6280\u8853\u6307\u6a19\u3002RSI\u662f\u8861\u91cf\u50f9\u683c\u8b8a\u52d5\u7684\u901f\u5ea6\u8207\u8b8a\u5316\u7684\u6307\u6a19\uff0c\u901a\u5e38\u7528\u65bc\u5224\u65b7\u5e02\u5834\u7684\u904e\u5ea6\u8cb7\u5165\u6216\u8ce3\u51fa\u60c5\u6cc1\u3002RSI\u901a\u9053\u901a\u904e\u986f\u793a\u4e0a\u9650\u548c\u4e0b\u9650\u4f86\u5e6b\u52a9\u4ea4\u6613\u8005\u8b58\u5225\u9032\u5165\u548c\u9000\u51fa\u5e02\u5834\u7684\u6a5f\u6703\u3002<\/p>\n<h2>\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053\u7684\u4f7f\u7528\u6642\u6a5f<\/h2>\n<p>\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053\u53ef\u4ee5\u5e6b\u52a9\u6295\u8cc7\u8005\u6293\u4f4f\u8cb7\u8ce3\u7684\u6642\u6a5f\u3002\u4ee5\u4e0b\u662f\u5177\u9ad4\u7684\u4f7f\u7528\u5efa\u8b70\uff1a<br \/>\n&#8211; **\u8cb7\u5165\u4fe1\u865f**\uff1a\u7576RSI\u6307\u6a19\u7a81\u7834\u4e0a\u8f49\u6298\u9ede\uff08\u901a\u5e38\u70ba70\uff09\uff0c\u8868\u793a\u5e02\u5834\u53ef\u80fd\u904e\u5ea6\u8cb7\u5165\uff0c\u61c9\u8b39\u614e\u8003\u91cf\u662f\u5426\u9032\u884c\u8ce3\u51fa\u3002<br \/>\n&#8211; **\u8ce3\u51fa\u4fe1\u865f**\uff1a\u7576RSI\u6307\u6a19\u4f4e\u65bc\u4e0b\u8f49\u6298\u9ede\uff08\u901a\u5e38\u70ba30\uff09\uff0c\u6b64\u6642\u53ef\u80fd\u8868\u793a\u5e02\u5834\u904e\u5ea6\u8ce3\u51fa\uff0c\u8003\u616e\u8cb7\u5165\u3002<\/p>\n<h2>\u5982\u4f55\u4f7f\u7528Python\u5be6\u73fe\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053\uff1f<\/h2>\n<p>\u4f7f\u7528Python\u4f86\u5be6\u73fe\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053\u975e\u5e38\u7c21\u55ae\uff0c\u9019\u88e1\u6211\u5011\u5c07\u4f7f\u7528<a href=\"https:\/\/pypi.org\/project\/ta-lib\/\" target=\"_blank\" rel=\"noopener\">TA-Lib<\/a>\u5eab\u9032\u884c\u8a08\u7b97\u3002\u4ee5\u4e0b\u662f\u4e00\u500b\u5b8c\u6574\u7684\u7bc4\u4f8b\u7a0b\u5f0f\u78bc\uff1a<\/p>\n<p>&#8220;`python<br \/>\nimport numpy as np<br \/>\nimport matplotlib.pyplot as plt<br \/>\nimport talib<\/p>\n<p># \u6a21\u64ec\u80a1\u7968\u50f9\u683c\u8cc7\u6599<br \/>\nclose = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])<\/p>\n<p># \u8a08\u7b97RSI<br \/>\nrsi = talib.RSI(close, timeperiod=14)<\/p>\n<p># \u8a08\u7b97RSI\u901a\u9053\uff08\u4e0a\u9650\u3001\u4e2d\u9593\u3001\u4e0b\u9650\uff09<br \/>\nupper, middle, lower = talib.BBANDS(rsi, timeperiod=14)<\/p>\n<p># \u7e6a\u88fdRSI\u901a\u9053<br \/>\nplt.figure(figsize=(12, 6))<br \/>\nplt.plot(rsi, label=&#8217;RSI&#8217;, color=&#8217;blue&#8217;)<br \/>\nplt.plot(upper, label=&#8217;Upper Band&#8217;, color=&#8217;red&#8217;, linestyle=&#8217;&#8211;&#8216;)<br \/>\nplt.plot(middle, label=&#8217;Middle Band&#8217;, color=&#8217;green&#8217;, linestyle=&#8217;&#8211;&#8216;)<br \/>\nplt.plot(lower, label=&#8217;Lower Band&#8217;, color=&#8217;orange&#8217;, linestyle=&#8217;&#8211;&#8216;)<br \/>\nplt.title(&#8216;\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053 (RSI Channel)&#8217;)<br \/>\nplt.legend()<br \/>\nplt.xlabel(&#8216;\u6642\u9593&#8217;)<br \/>\nplt.ylabel(&#8216;RSI\u503c&#8217;)<br \/>\nplt.grid()<br \/>\nplt.show()<br \/>\n&#8220;`<\/p>\n<p>\u9019\u6bb5\u7a0b\u5f0f\u78bc\u5c07\u8a08\u7b97RSI\u548c\u5176\u901a\u9053\uff0c\u4e26\u7e6a\u88fd\u51fa\u76f8\u61c9\u7684\u5716\u8868\uff0c\u5e6b\u52a9\u6295\u8cc7\u8005\u76f4\u89c0\u5730\u7406\u89e3\u5e02\u5834\u72c0\u6cc1\u3002<\/p>\n<h2>\u5e38\u898b\u554f\u984c\u89e3\u7b54 (Q&#038;A)<\/h2>\n<p>**Q1: \u5982\u4f55\u9078\u64c7RSI\u7684\u6642\u9593\u5468\u671f\uff1f**<br \/>\nA1: \u5e38\u898b\u7684RSI\u6642\u9593\u5468\u671f\u70ba14\uff0c\u4f46\u5177\u9ad4\u9078\u64c7\u61c9\u6839\u64da\u4e0d\u540c\u7684\u4ea4\u6613\u7b56\u7565\u548c\u6642\u9593\u6846\u67b6\u9032\u884c\u8abf\u6574\u3002<\/p>\n<p>**Q2: \u5982\u679c\u6211\u7684\u7a0b\u5f0f\u78bc\u51fa\u73fe\u932f\u8aa4\uff0c\u8a72\u5982\u4f55\u6392\u9664\uff1f**<br \/>\nA2: \u6aa2\u67e5\u6240\u6709\u5eab\u662f\u5426\u6b63\u78ba\u5b89\u88dd\uff0c\u5982numpy\u3001matplotlib\u548cTA-Lib\uff0c\u4e26\u78ba\u4fdd\u60a8\u4f7f\u7528\u7684\u6578\u64da\u683c\u5f0f\u6b63\u78ba\u3002<\/p>\n<p>**Q3: \u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053\u9084\u6709\u54ea\u4e9b\u5ef6\u4f38\u61c9\u7528\uff1f**<br \/>\nA3: RSI\u53ef\u4ee5\u8207\u5176\u4ed6\u6280\u8853\u6307\u6a19\u7d50\u5408\u4f7f\u7528\uff0c\u4f8b\u5982\u79fb\u52d5\u5e73\u5747\u7dda\uff08MA\uff09\u6216MACD\uff0c\u4ee5\u589e\u5f37\u4ea4\u6613\u7b56\u7565\u7684\u6709\u6548\u6027\u3002<\/p>\n<p>\u6700\u5f8c\uff0c\u82e5\u60f3\u6df1\u5165\u4e86\u89e3\u66f4\u591aPython\u53ca\u4ea4\u6613\u7b56\u7565\u7684\u5167\u5bb9\uff0c\u6b61\u8fce\u53c3\u8003\u6211\u5011\u7684[\u76f8\u95dc\u6559\u5b78\u6587\u7ae0](https:\/\/vocus.cc)\u3002<br \/>\n&#8212;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6458\u8981\uff1a\u76f8\u5c0d\u529b\u91cf\u6307\u6578\u901a\u9053(RelativeStrengthIndexChannel)\u662f\u4e00\u7a2e\u5e38\u7528\u7684\u4ea4\u6613\u6307\u6a19\uff0c\u5b83\u53ef\u4ee5\u5e6b\u52a9\u6295\u8cc7\u8005\u66f4\u597d\u5730\u5206\u6790\u5e02\u5834\u8da8\u52e2\uff0c\u4e26\u63d0\u4f9b\u66f4\u597d\u7684\u4ea4\u6613\u6c7a\u7b56\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u4f7f\u7528Python\u4f86\u69cb\u5efaRSI\u901a\u9053\uff0c\u4ee5\u53ca\u5982\u4f55\u5229\u7528RSI\u901a\u9053\u4f86\u66f4\u597d\u5730\u4ea4\u6613\u3002<\/p>\n","protected":false},"author":1,"featured_media":2518,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[18,189],"tags":[15,188],"class_list":["post-6378","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-189","tag-python","tag-188"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/badgameshow.com\/steven\/wp-content\/uploads\/2022\/12\/DALL\u00b7E-2022-12-28-14.25.55-\u62f7\u8c9d2.png","jetpack-related-posts":[],"jetpack_shortlink":"https:\/\/wp.me\/pcFK27-1ES","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/6378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/comments?post=6378"}],"version-history":[{"count":2,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/6378\/revisions"}],"predecessor-version":[{"id":12719,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/6378\/revisions\/12719"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/media\/2518"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/media?parent=6378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/categories?post=6378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/tags?post=6378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}