{"id":2953,"date":"2026-11-30T20:58:46","date_gmt":"2026-12-01T02:58:46","guid":{"rendered":"https:\/\/www.patternsmart.com\/cn\/?p=2953"},"modified":"2026-12-01T03:07:06","modified_gmt":"2026-12-01T03:07:06","slug":"ema%e6%94%b6%e7%9b%98%e4%ba%a4%e5%8f%89%e7%ad%96%e7%95%a5%e4%b8%8e%e4%b8%8b%e4%b8%80%e6%a0%b9k%e7%ba%bf%e6%88%90%e4%ba%a4%e6%9c%ba%e5%88%b6","status":"publish","type":"post","link":"https:\/\/www.patternsmart.com\/cn\/ema%e6%94%b6%e7%9b%98%e4%ba%a4%e5%8f%89%e7%ad%96%e7%95%a5%e4%b8%8e%e4%b8%8b%e4%b8%80%e6%a0%b9k%e7%ba%bf%e6%88%90%e4%ba%a4%e6%9c%ba%e5%88%b6\/","title":{"rendered":"EMA\u6536\u76d8\u4ea4\u53c9\u7b56\u7565\u4e0e\u4e0b\u4e00\u6839K\u7ebf\u6210\u4ea4\u673a\u5236"},"content":{"rendered":"<div class=\"postie-post\">\n<h2>\u533a\u5206\u4fe1\u53f7\u65f6\u70b9\u4e0e\u6210\u4ea4\u65f6\u70b9<\/h2>\n<p>\u5747\u7ebf\u4ea4\u53c9\u7b56\u7565\u5728Pine Script\u4e2d\u5bb9\u6613\u5b9e\u73b0\uff0c\u4f46\u56de\u6d4b\u7ed3\u679c\u53d6\u51b3\u4e8e\u8ba2\u5355\u4f55\u65f6\u5177\u5907\u6210\u4ea4\u6761\u4ef6\u3002\u6536\u76d8\u786e\u8ba4\u610f\u5473\u7740\u4fe1\u606f\u5728K\u7ebf\u7ed3\u675f\u65f6\u624d\u786e\u5b9a\uff0c\u5e76\u4e0d\u4fdd\u8bc1\u80fd\u591f\u6309\u6536\u76d8\u4ef7\u6210\u4ea4\u3002\u672c\u4f8b\u4ec5\u505a\u591a\uff0c\u91c7\u752810\u5468\u671fEMA\u4e0a\u7a7f30\u5468\u671fEMA\u5165\u573a\uff0c\u53cd\u5411\u4ea4\u53c9\u9000\u51fa\u3002<\/p>\n<h2>\u8df3\u7a7a\u6210\u4ea4\u5b9e\u4f8b<\/h2>\n<p>\u5047\u8bbe\u4ea4\u53c9\u4fe1\u53f7\u5728\u6536\u76d8\u4ef7104\u65f6\u786e\u8ba4\uff0c\u4e0b\u4e00\u6839K\u7ebf\u5f00\u76d8\u4ef7\u4e3a107\u3002\u5728\u9ed8\u8ba4\u4e0b\u4e00\u53ef\u7528\u4ef7\u683c\u66f4\u65b0\u5904\u7406\u6a21\u5f0f\u4e0b\uff0c\u5386\u53f2\u7ecf\u7eaa\u5546\u6a21\u62df\u5668\u901a\u5e38\u5728\u4e0b\u4e00\u6839\u5f00\u76d8\u6210\u4ea4\uff0c\u5c1a\u672a\u8ba1\u5165\u8bbe\u5b9a\u6ed1\u70b9\u3002\u4e24\u8005\u76f8\u5dee3\u4e2a\u4ef7\u683c\u70b9\u3002\u82e5\u968f\u540e\u9000\u51fa\u6210\u4ea4\u4ef7\u4e3a102\uff0c\u5b9e\u9645\u6a21\u62df\u6bdb\u6536\u76ca\u4e3a\u8d1f5\u70b9\uff0c\u800c\u6309\u4fe1\u53f7\u6536\u76d8\u4ef7\u8ba1\u7b97\u5219\u4e3a\u8d1f2\u70b9\u3002\u8fd9\u4e9b\u662f\u5047\u8bbe\u6570\u636e\uff0c\u5e76\u975e\u5b9e\u6d4b\u7ee9\u6548\u3002<\/p>\n<p> <img decoding=\"async\" alt=\"signal-fill.png\" src=\"https:\/\/www.patternsmart.com\/cn\/wp-content\/uploads\/2026\/12\/signal-fill.png\" width=\"640\"><\/p>\n<p><em>\u516d\u6839\u5047\u8bbeK\u7ebf\u5c55\u793a\u6536\u76d8\u4fe1\u53f7\u4e0e\u4e0b\u4e00\u6b21\u53ef\u6210\u4ea4\u5e02\u4ef7\u4e4b\u95f4\u7684\u8df3\u7a7a\u5dee\u5f02\u3002<\/em><\/p>\n<h2>Pine Script v6 \u5b9e\u73b0<\/h2>\n<pre style=\"white-space:pre;font-family:Consolas,Monaco,monospace\"><code><a href=\"mailto:\/\/@version=6\">\/\/@version=6<\/a><br>strategy(&quot;Confirmed EMA crossover&quot;, overlay=true,<br>\u00a0\u00a0\u00a0\u00a0pyramiding=0, process_orders_on_close=false,<br>\u00a0\u00a0\u00a0\u00a0calc_on_every_tick=false, default_qty_type=strategy.fixed,<br>\u00a0\u00a0\u00a0\u00a0default_qty_value=1)<br>fast = ta.ema(close, 10)<br>slow = ta.ema(close, 30)<br>up = ta.crossover(fast, slow)<br>down = ta.crossunder(fast, slow)<br>if barstate.isconfirmed and up and strategy.position_size == 0<br>\u00a0\u00a0\u00a0\u00a0strategy.entry(&quot;Long&quot;, strategy.long)<br>if barstate.isconfirmed and down and strategy.position_size &gt; 0<br>\u00a0\u00a0\u00a0\u00a0strategy.close(&quot;Long&quot;)<br>plot(fast, color=color.blue)<br>plot(slow, color=color.orange)<\/code><\/pre>\n<p>\u7b56\u7565\u4f7f\u7528\u56fa\u5b9a1\u5355\u4f4d\u4ed3\u4f4d\u3001\u4e0d\u52a0\u4ed3\u3001\u6536\u76d8\u786e\u8ba4\u53ca\u4e0b\u4e00\u53ef\u7528\u4ef7\u683c\u66f4\u65b0\u6210\u4ea4\u673a\u5236\u3002\u4e3a\u5355\u72ec\u7814\u7a76\u6210\u4ea4\u65f6\u5e8f\uff0c\u793a\u4f8b\u523b\u610f\u4e0d\u8bbe\u7f6e\u4fdd\u62a4\u6027\u8ba2\u5355\uff0c\u5e76\u975e\u53ef\u76f4\u63a5\u90e8\u7f72\u7684\u5b8c\u6574\u98ce\u63a7\u7b56\u7565\u3002\u5b9e\u9645\u90e8\u7f72\u524d\u5e94\u589e\u52a0\u9002\u5408\u54c1\u79cd\u7684\u4ed3\u4f4d\u7ba1\u7406\u53ca\u4fdd\u62a4\u6027\u9000\u51fa\u3002\u4ea4\u53c9\u51fd\u6570\u5728\u6bcf\u6839K\u7ebf\u4e0a\u8ba1\u7b97\uff0c\u800c\u975e\u653e\u5728\u6761\u4ef6\u5206\u652f\u5185\u3002<\/p>\n<h2>\u6d4b\u8bd5\u65b9\u6cd5\u4e0e\u6267\u884c\u9650\u5236<\/h2>\n<p>\u4fdd\u6301\u6570\u636e\u3001\u4ed3\u4f4d\u53ca\u6210\u672c\u4e00\u81f4\uff0c\u5206\u522b\u6d4b\u8bd5process_orders_on_close\u4e3atrue\u548cfalse\u7684\u7248\u672c\uff0c\u8bb0\u5f55\u4fe1\u53f7\u4ef7\u683c\u3001\u6a21\u62df\u6210\u4ea4\u4ef7\u3001\u8df3\u7a7a\u5206\u5e03\u3001\u51c0\u6536\u76ca\u548c\u56de\u64a4\u3002\u5728\u7b56\u7565\u5c5e\u6027\u4e2d\u8bbe\u7f6e\u5408\u7406\u4f63\u91d1\u53ca\u6ed1\u70b9\uff0c\u4f7f\u7528\u6807\u51c6K\u7ebf\u800c\u975e\u5408\u6210\u4ef7\u683c\uff0c\u5e76\u4fdd\u7559\u6837\u672c\u5916\u6d4b\u8bd5\u533a\u95f4\u3002\u6536\u76d8\u6210\u4ea4\u6a21\u62df\u53ef\u80fd\u8fc7\u4e8e\u4e50\u89c2\uff0c\u5c24\u5176\u5728\u4ea4\u6613\u65f6\u6bb5\u7ed3\u675f\u9644\u8fd1\u3002TradingView\u7ecf\u7eaa\u5546\u6a21\u62df\u5668\u6210\u4ea4\u4e0d\u540c\u4e8e\u5b9e\u76d8\u6267\u884c\uff0c\u8b66\u62a5\u4f20\u8f93\u3001\u7f51\u7edc\u5ef6\u8fdf\u3001\u5238\u5546\u63a5\u5355\u53ca\u6d41\u52a8\u6027\u5747\u4f1a\u9020\u6210\u5dee\u5f02\u3002\u5b9e\u76d8\u5bf9\u63a5\u8fd8\u9700\u9632\u6b62\u91cd\u590d\u8ba2\u5355\u5e76\u6838\u5bf9\u6301\u4ed3\u3002\u4ee3\u7801\u672a\u7ecf\u5b9e\u9645\u7f16\u8bd1\u6216\u56de\u6d4b\u3002\u4ea4\u6613\u5b58\u5728\u4e8f\u635f\u98ce\u9669\uff0c\u8df3\u7a7a\u53ef\u80fd\u4f7f\u635f\u5931\u8d85\u8fc7\u9884\u671f\u3002<\/p>\n<p>\u5982\u9700\u5b9a\u5236\u6210\u4ea4\u65f6\u5e8f\u3001\u98ce\u63a7\u6216\u8b66\u62a5\u5bf9\u63a5\uff0c\u8bf7\u4e86\u89e3<a href=\"https:\/\/www.patternsmart.com\/cn\/custom\/\">TradingView\u4ea4\u6613\u7b56\u7565\u5b9a\u5236\u5f00\u53d1\u670d\u52a1<\/a>\u3002<\/p>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u533a\u5206\u4fe1\u53f7\u65f6\u70b9\u4e0e\u6210\u4ea4\u65f6\u70b9 \u5747\u7ebf\u4ea4\u53c9\u7b56\u7565\u5728Pine Script\u4e2d\u5bb9\u6613\u5b9e\u73b0\uff0c\u4f46\u56de\u6d4b\u7ed3\u679c\u53d6\u51b3\u4e8e\u8ba2\u5355\u4f55\u65f6\u5177\u5907\u6210\u4ea4\u6761\u4ef6\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2954,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"fifu_image_url":"","fifu_image_alt":"","_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[142,520,233],"tags":[146,434,141,693,318,529],"class_list":["post-2953","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tradingview","category-520","category-233","tag-ema","tag-pine-script","tag-tradingview","tag-693","tag-318","tag-529"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/www.patternsmart.com\/cn\/wp-content\/uploads\/2026\/12\/signal-fill.png","_links":{"self":[{"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/posts\/2953","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/comments?post=2953"}],"version-history":[{"count":0,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/posts\/2953\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/media\/2954"}],"wp:attachment":[{"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/media?parent=2953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/categories?post=2953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/tags?post=2953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}