{"id":6094,"date":"2025-06-03T15:08:58","date_gmt":"2025-06-04T07:25:58","guid":{"rendered":"https:\/\/badgameshow.com\/steven\/?p=6094"},"modified":"2025-06-04T15:08:58","modified_gmt":"2025-06-04T07:25:58","slug":"%e4%ba%86%e8%a7%a3%e5%a6%82%e4%bd%95%e5%88%a9%e7%94%a8%e7%a7%bb%e5%8b%95%e5%b9%b3%e5%9d%87%e5%b9%b3%e6%bb%91%e7%a7%bb%e5%8b%95%e5%b9%b3%e5%9d%87%e6%8c%87%e6%95%b8smmai%e4%ba%a4%e6%98%93%e6%8c%87","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/steven\/python\/%e4%ba%86%e8%a7%a3%e5%a6%82%e4%bd%95%e5%88%a9%e7%94%a8%e7%a7%bb%e5%8b%95%e5%b9%b3%e5%9d%87%e5%b9%b3%e6%bb%91%e7%a7%bb%e5%8b%95%e5%b9%b3%e5%9d%87%e6%8c%87%e6%95%b8smmai%e4%ba%a4%e6%98%93%e6%8c%87\/","title":{"rendered":"\u6df1\u5165\u4e86\u89e3\u79fb\u52d5\u5e73\u5747\u5e73\u6ed1\u79fb\u52d5\u5e73\u5747\u6307\u6578(SMMAI)\uff1aPython \u5be6\u4f5c\u8207\u6700\u4f73\u5be6\u8e10"},"content":{"rendered":"<p><meta name=\"keywords\" content=\"Python, SMMAI, \u79fb\u52d5\u5e73\u5747\u5e73\u6ed1\u79fb\u52d5\u5e73\u5747\u6307\u6578, \u4ea4\u6613\u6307\u6a19, \u6280\u8853\u5206\u6790, Python \u5be6\u4f5c\"><\/p>\n<h1>\u6df1\u5165\u4e86\u89e3\u79fb\u52d5\u5e73\u5747\u5e73\u6ed1\u79fb\u52d5\u5e73\u5747\u6307\u6578(SMMAI)\uff1aPython \u5be6\u4f5c\u8207\u6700\u4f73\u5be6\u8e10<\/h1>\n<p>\u79fb\u52d5\u5e73\u5747\u5e73\u6ed1\u79fb\u52d5\u5e73\u5747\u6307\u6578\uff08SMMAI\uff09\u662f\u4e00\u7a2e\u5e38\u7528\u7684\u4ea4\u6613\u6307\u6a19\uff0c\u7279\u5225\u662f\u5728\u6280\u8853\u5206\u6790\u4e2d\uff0c\u80fd\u5e6b\u52a9\u6295\u8cc7\u8005\u66f4\u6e05\u6670\u5730\u5206\u6790\u5e02\u5834\u8da8\u52e2\u4e26\u5236\u5b9a\u4ea4\u6613\u6c7a\u7b56\u30022025 \u5e74\u6700\u65b0\u7684\u6280\u8853\u8da8\u52e2\u986f\u793a\uff0cSMMAI \u63d0\u4f9b\u4e86\u4e00\u7a2e\u5e73\u6ed1\u7684\u4ea4\u6613\u4fe1\u865f\uff0c\u5e6b\u52a9\u6295\u8cc7\u8005\u5728\u6ce2\u52d5\u7684\u5e02\u5834\u4e2d\u4f5c\u51fa\u660e\u667a\u7684\u9078\u64c7\u3002<\/p>\n<p>## SMMAI \u7684\u4f7f\u7528\u6642\u6a5f<\/p>\n<p>SMMAI \u6700\u9069\u5408\u5728\u5e02\u5834\u8da8\u52e2\u8b8a\u5316\u6642\u4f7f\u7528\u3002\u7576\u5e02\u5834\u51fa\u73fe\u660e\u986f\u7684\u4e0a\u5347\u6216\u4e0b\u964d\u8da8\u52e2\u6642\uff0cSMMAI \u53ef\u4ee5\u5e6b\u52a9\u6295\u8cc7\u8005\u5feb\u901f\u6aa2\u6e2c\u5230\u9019\u4e9b\u8b8a\u5316\u3002\u7576 SMMAI \u7684\u503c\u8d85\u904e\u5e02\u5834\u7684\u8da8\u52e2\u7dda\u6642\uff0c\u901a\u5e38\u8868\u793a\u5e02\u5834\u5448\u73fe\u4e0a\u5347\u8da8\u52e2\uff0c\u53cd\u4e4b\u5247\u8868\u793a\u5e02\u5834\u53ef\u80fd\u4e0b\u8dcc\u3002<\/p>\n<p>## \u5982\u4f55\u8a08\u7b97 SMMAI<\/p>\n<p>### \u8a08\u7b97\u6b65\u9a5f<\/p>\n<p>1. **\u9078\u64c7\u6578\u64da\u96c6**\uff1a\u6536\u96c6\u4f60\u60f3\u8981\u5206\u6790\u7684\u5e02\u5834\u6578\u64da\u3002<br \/>\n2. **\u78ba\u5b9a\u8a08\u7b97\u5468\u671f**\uff1a\u9078\u64c7\u5408\u9069\u7684\u6642\u9593\u5468\u671f\uff0c\u4f8b\u5982\u65e5\u3001\u5468\u6216\u6708\u3002<br \/>\n3. **\u8a08\u7b97 SMMAI \u503c**\uff1a\u5229\u7528 Python \u7de8\u5beb\u51fd\u6578\u4f86\u8a08\u7b97 SMMAI\u3002<\/p>\n<p>### Python \u7bc4\u4f8b\u7a0b\u5f0f\u78bc<\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u500b\u7c21\u55ae\u7684 Python \u51fd\u6578\uff0c\u7528\u4f86\u8a08\u7b97 SMMAI\uff1a<\/p>\n<p>&#8220;`python<br \/>\n# \u8a08\u7b97 SMMAI<br \/>\ndef smmai(data, period):<br \/>\n    smma = []\n    for i in range(period &#8211; 1):<br \/>\n        smma.append(None)  # \u521d\u59cb\u503c\u70ba None<br \/>\n    for i in range(period &#8211; 1, len(data)):<br \/>\n        smma.append(sum(data[i &#8211; period + 1:i + 1]) \/ period)  # \u8a08\u7b97 SMMAI<br \/>\n    return smma<\/p>\n<p># \u793a\u4f8b\u6578\u64da<br \/>\ndata = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n<p># \u8a08\u7b97 SMMAI<br \/>\nsmmai_values = smmai(data, 5)<\/p>\n<p># \u8f38\u51fa\u7d50\u679c<br \/>\nprint(smmai_values)  # \u8f38\u51fa\uff1a[None, None, None, None, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]\n&#8220;`<\/p>\n<p>\u5728\u9019\u500b\u7bc4\u4f8b\u4e2d\uff0c\u6211\u5011\u5b9a\u7fa9\u4e86\u4e00\u500b `smmai` \u51fd\u6578\uff0c\u53ef\u4ee5\u8a08\u7b97\u7d66\u5b9a\u6578\u64da\u548c\u5468\u671f\u7684 SMMAI\u3002\u7d50\u679c\u5c07\u986f\u793a\u5728\u63a7\u5236\u53f0\u4e0a\uff0c\u5e6b\u52a9\u6295\u8cc7\u8005\u4e86\u89e3\u5e02\u5834\u7684\u6700\u65b0\u8da8\u52e2\u3002<\/p>\n<p>## \u5be6\u7528\u6280\u5de7\u8207\u932f\u8aa4\u6392\u9664<\/p>\n<p>1. **\u6578\u64da\u6e05\u7406**\uff1a\u78ba\u4fdd\u8f38\u5165\u6578\u64da\u7121\u8aa4\uff0c\u907f\u514d\u56e0\u70ba\u932f\u8aa4\u6578\u64da\u5f71\u97ff\u8a08\u7b97\u7d50\u679c\u3002<br \/>\n2. **\u9078\u64c7\u5408\u7406\u7684\u5468\u671f**\uff1a\u6839\u64da\u5e02\u5834\u7279\u6027\u9078\u64c7\u5408\u9069\u7684\u8a08\u7b97\u5468\u671f\uff0c\u77ed\u671f\u4ea4\u6613\u8005\u8207\u9577\u671f\u6295\u8cc7\u8005\u7684\u9700\u6c42\u4e0d\u540c\u3002<br \/>\n3. **\u5b9a\u671f\u6aa2\u67e5**\uff1a\u96a8\u8457\u5e02\u5834\u7684\u8b8a\u5316\uff0c\u5b9a\u671f\u6aa2\u67e5\u4e26\u66f4\u65b0\u4f60\u7684\u6578\u64da\u8207\u8a08\u7b97\u65b9\u6cd5\uff0c\u4ee5\u4fdd\u6301\u5206\u6790\u7684\u6e96\u78ba\u6027\u3002<\/p>\n<p>## \u5ef6\u4f38\u61c9\u7528<\/p>\n<p>SMMAI \u4e0d\u50c5\u53ef\u4ee5\u7528\u65bc\u80a1\u7968\u5e02\u5834\uff0c\u9084\u53ef\u4ee5\u61c9\u7528\u65bc\u5916\u532f\u3001\u5546\u54c1\u53ca\u52a0\u5bc6\u8ca8\u5e63\u5e02\u5834\u3002\u4e86\u89e3\u5982\u4f55\u5229\u7528 SMMAI \u7d50\u5408\u5176\u4ed6\u6280\u8853\u6307\u6a19\uff08\u4f8b\u5982 RSI \u6216 MACD\uff09\u4f86\u589e\u5f37\u4ea4\u6613\u7b56\u7565\uff0c\u53ef\u4ee5\u9032\u4e00\u6b65\u63d0\u5347\u4f60\u7684\u6295\u8cc7\u56de\u5831\u3002<\/p>\n<p>\u82e5\u60f3\u4e86\u89e3\u66f4\u591a\u95dc\u65bc Python \u7684\u61c9\u7528\uff0c\u5efa\u8b70\u53c3\u8003\u9019\u7bc7 [Python \u7a0b\u5f0f\u8a2d\u8a08\u5165\u9580\u6559\u5b78](https:\/\/vocus.cc), \u7372\u5f97\u66f4\u591a\u5be6\u7528\u8cc7\u6e90\u3002<\/p>\n<p>## Q&#038;A\uff08\u5e38\u898b\u554f\u984c\u89e3\u7b54\uff09<\/p>\n<p>**Q1: SMMAI \u548c\u5176\u4ed6\u79fb\u52d5\u5e73\u5747\u6307\u6a19\u6709\u4f55\u4e0d\u540c\uff1f**<br \/>\nA1: SMMAI \u4e3b\u8981\u900f\u904e\u5e73\u6ed1\u5316\u8655\u7406\u4f86\u6d88\u9664\u5e02\u5834\u6ce2\u52d5\u7684\u5f71\u97ff\uff0c\u76f8\u6bd4\u65bc\u7c21\u55ae\u79fb\u52d5\u5e73\u5747\uff08SMA\uff09\u6216\u52a0\u6b0a\u79fb\u52d5\u5e73\u5747\uff08WMA\uff09\uff0c\u66f4\u80fd\u53cd\u6620\u51fa\u8da8\u52e2\u7684\u6301\u7e8c\u6027\u3002<\/p>\n<p>**Q2: \u6211\u53ef\u5426\u7528 SMMAI \u5224\u65b7\u8cb7\u8ce3\u6642\u6a5f\uff1f**<br \/>\nA2: \u662f\u7684\uff0c\u7576 SMMAI \u7684\u503c\u7a81\u7834\u5e02\u5834\u8da8\u52e2\u7dda\u6642\uff0c\u9019\u901a\u5e38\u88ab\u8996\u70ba\u8cb7\u5165\u6216\u8ce3\u51fa\u7684\u4fe1\u865f\u3002\u4f46\u5efa\u8b70\u7d50\u5408\u5176\u4ed6\u6307\u6a19\u9032\u884c\u591a\u91cd\u78ba\u8a8d\u3002<\/p>\n<p>**Q3: \u5982\u4f55\u63d0\u9ad8 SMMAI \u8a08\u7b97\u7684\u6e96\u78ba\u6027\uff1f**<br \/>\nA3: \u78ba\u4fdd\u4f7f\u7528\u7684\u6578\u64da\u6e96\u78ba\u7121\u8aa4\uff0c\u4e26\u6839\u64da\u5e02\u5834\u60c5\u6cc1\u8abf\u6574\u8a08\u7b97\u5468\u671f\uff0c\u9019\u6a23\u53ef\u4ee5\u63d0\u9ad8 SMMAI \u7684\u6e96\u78ba\u6027\u548c\u5be6\u7528\u6027\u3002<\/p>\n<p>\u7e3d\u7d50\u4f86\u8aaa\uff0cSMMAI \u662f\u4e00\u7a2e\u5f37\u5927\u7684\u4ea4\u6613\u5de5\u5177\uff0c\u80fd\u5e6b\u52a9\u6295\u8cc7\u8005\u5728\u8907\u96dc\u7684\u5e02\u5834\u4e2d\u505a\u51fa\u660e\u667a\u7684\u6c7a\u7b56\u3002\u5229\u7528 Python \u4f86\u8a08\u7b97 SMMAI \u4e0d\u50c5\u65b9\u4fbf\uff0c\u9084\u80fd\u8b93\u4f60\u7684\u4ea4\u6613\u7b56\u7565\u66f4\u52a0\u7cbe\u78ba\u3002<br \/>\n&#8212;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6458\u8981\uff1a\u79fb\u52d5\u5e73\u5747\u5e73\u6ed1\u79fb\u52d5\u5e73\u5747\u6307\u6578(SMMAI)\u662f\u4e00\u7a2e\u5e38\u7528\u7684\u4ea4\u6613\u6307\u6a19\uff0c\u53ef\u4ee5\u5e6b\u52a9\u6295\u8cc7\u8005\u5206\u6790\u5e02\u5834\u8da8\u52e2\uff0c\u4e26\u63d0\u4f9b\u6709\u6548\u7684\u4ea4\u6613\u6c7a\u7b56\u3002\u672c\u6587\u5c07\u4ecb\u7d39SMMAI\u7684\u4f7f\u7528\u6642\u6a5f\uff0c\u4e26\u63d0\u4f9bPython\u7bc4\u4f8b\u4f9b\u53c3\u8003\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-6094","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-1Ai","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/6094","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=6094"}],"version-history":[{"count":2,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/6094\/revisions"}],"predecessor-version":[{"id":12755,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/6094\/revisions\/12755"}],"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=6094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/categories?post=6094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/tags?post=6094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}