{"id":3251,"date":"2025-12-22T07:24:00","date_gmt":"2025-12-21T23:24:00","guid":{"rendered":"https:\/\/www.laoyulaoyu.com\/?p=3251"},"modified":"2025-12-15T15:25:11","modified_gmt":"2025-12-15T07:25:11","slug":"%e4%b8%80%e5%a5%97%e5%9f%ba%e4%ba%8e%e5%9d%87%e5%80%bc%e5%9b%9e%e5%bd%92%e6%95%b0%e5%ad%a6%e9%80%bb%e8%be%91%e7%9a%84etf%e7%ad%96%e7%95%a5%e5%88%86%e4%ba%ab%ef%bc%88%e9%99%84","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2025\/12\/22\/%e4%b8%80%e5%a5%97%e5%9f%ba%e4%ba%8e%e5%9d%87%e5%80%bc%e5%9b%9e%e5%bd%92%e6%95%b0%e5%ad%a6%e9%80%bb%e8%be%91%e7%9a%84etf%e7%ad%96%e7%95%a5%e5%88%86%e4%ba%ab%ef%bc%88%e9%99%84\/","title":{"rendered":"\u4e00\u5957\u57fa\u4e8e\u201c\u5747\u503c\u56de\u5f52\u201d\u6570\u5b66\u903b\u8f91\u7684ETF\u7b56\u7565\u5206\u4eab\uff08\u9644\u5b8c\u6574TradingView\u4ee3\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\/2025\/12\/0_02AGf0fG89vq72bD.jpg\" alt=\"\" class=\"wp-image-3252\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2025\/12\/0_02AGf0fG89vq72bD.jpg 900w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2025\/12\/0_02AGf0fG89vq72bD-300x128.jpg 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2025\/12\/0_02AGf0fG89vq72bD-768x327.jpg 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>\u6211\u4eca\u5929\u5206\u4eab\u4e00\u4e2a\u4fd7\u79f0\u201c<strong>\u6a61\u76ae\u7b4b<\/strong>\u201d\u7684\u7b56\u7565\uff0c\u903b\u8f91\u7b80\u5355\u5230\u4ee4\u4eba\u53d1\u6307\uff1a\u987a\u7740\u957f\u671f\u5927\u8d8b\u52bf\uff0c<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u5728\u77ed\u671f\u4ef7\u683c\u88ab\u8fc7\u5ea6\u62c9\u4f38\uff08\u6050\u614c\uff09\u65f6\u8fdb\u573a\uff0c\u7b49\u4ef7\u683c\u5f39\u56de\u5747\u503c\u5c31\u8d70\u3002\u4e0d\u9884\u6d4b\u672a\u6765\uff0c\u53ea\u8ddf\u968f\u89c4\u5219\u3001\u76f8\u4fe1\u6570\u636e\u4e0d\u4f1a\u8bf4\u8c0e\u3002<\/mark>\u65e0\u8bba\u65b0\u624b\u8fd8\u662f\u8001\u624b\uff0c\u8fd9\u5957\u903b\u8f91\u90fd\u503c\u5f97\u501f\u9274\u5b66\u4e60\u3002<\/pre>\n<\/blockquote>\n\n\n\n<p>\u5f88\u591a\u670b\u53cb\u5728\u5e02\u573a\u91cc\u6478\u722c\u6eda\u6253\uff0c\u603b\u89c9\u5f97\u7b56\u7565\u8d8a\u590d\u6742\u8d8a\u597d\uff0c\u6307\u6807\u53e0\u5f97\u8d8a\u591a\u8d8a\u5b89\u5fc3\u3002\u5176\u5b9e\u4e0d\u7136\u3002\u5927\u9053\u81f3\u7b80\uff0c\u4eca\u5929\u8981\u4ecb\u7ecd\u7684\u8fd9\u4e2a\u7b56\u7565\uff0c\u6838\u5fc3\u601d\u60f3\u5c31\u4e00\u4e2a\u8bcd\uff1a<strong>\u5747\u503c\u56de\u5f52<\/strong>\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u6838\u5fc3\u903b\u8f91\uff1a\u6a61\u76ae\u7b4b\u539f\u7406<\/strong><\/h2>\n\n\n\n<p>\u8fd9\u4e2a\u7b56\u7565\u88ab\u79f0\u4e3a<strong>\u201cEMA\u8ddd\u79bb\u56de\u5f39\u7b56\u7565\u201d<\/strong>\uff08<em>EMA Distance Snapback Strategy<\/em>\uff09\u3002\u539f\u7406\u975e\u5e38\u76f4\u89c2\uff1a\u901a\u8fc7\u89c2\u5bdf\u4ef7\u683c\u4f55\u65f6\u8fc7\u5ea6\u504f\u79bb\u77ed\u671f\u5e73\u5747\u6c34\u5e73\uff0c\u540c\u65f6\u786e\u4fdd\u5927\u65b9\u5411\u4f9d\u7136\u662f\u5411\u4e0a\u7684\u3002\u5c31\u597d\u6bd4\u4e00\u6839\u6a61\u76ae\u7b4b\uff0c\u5f53\u4f60\u628a\u5b83\u5f80\u4e0b\u62c9\u5f97\u592a\u8fdc\u65f6\uff0c\u5b83\u79ef\u84c4\u7684\u529b\u91cf\u5c31\u8d8a\u5f3a\uff0c\u201c\u56de\u5f39\u201d\u5230\u81ea\u7136\u72b6\u6001\u7684\u6982\u7387\u5c31\u8d8a\u5927\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L0AXlGp46ibnLJslhag1AEYQHUN49RUia0YicNDAvIsAC3iaFh444QDicegG5190zv7kmAnnzOJKmEibLTg\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><figcaption class=\"wp-element-caption\"><em>\u4ef7\u683c\u5c31\u50cf\u6a61\u76ae\u7b4b\uff0c\u62c9\u5f97\u592a\u8fdc\u7ec8\u7a76\u4f1a\u5f39\u56de\u6765<\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<p>\u6211\u4eec\u4e0d\u53bb\u9884\u6d4b\u5b83\u4ec0\u4e48\u65f6\u5019\u6da8\uff0c\u6211\u4eec\u53ea\u5728\u5b83\u201c\u88ab\u62c9\u5f97\u592a\u7d27\u201d\u7684\u65f6\u5019\uff0c\u5c1d\u8bd5\u53c2\u4e0e\u90a3\u4e2a\u5fc5\u7136\u53d1\u751f\u7684\u7269\u7406\u56de\u5f39\u8fc7\u7a0b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u5165\u573a\u89c2\u5bdf\u6e05\u5355<\/strong><strong><em>\uff08\u4e09\u4e2a\u6761\u4ef6\u7f3a\u4e00\u4e0d\u53ef\uff09<\/em><\/strong><\/h2>\n\n\n\n<p>\u60f3\u8981\u6267\u884c\u8fd9\u4e2a\u7b56\u7565\uff0c\u5fc5\u987b\u540c\u65f6\u6ee1\u8db3\u4ee5\u4e0b\u4e09\u4e2a\u786c\u6027\u6761\u4ef6\u3002\u6ce8\u610f\uff0c\u662f<strong>\u540c\u65f6\u6ee1\u8db3<\/strong>\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">\u6761\u4ef6\u7c7b\u578b<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u5177\u4f53\u89c4\u5219<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u80cc\u540e\u7684\u903b\u8f91<\/th><\/tr><\/thead><tbody><tr><td><strong>1. \u8d8b\u52bf\u7b5b\u9009<\/strong><\/td><td>\u6536\u76d8\u4ef7 &gt; 200\u65e5\u7b80\u5355\u79fb\u52a8\u5e73\u5747\u7ebf (SMA)<\/td><td>\u786e\u4fdd\u6211\u4eec\u5728\u5927\u725b\u5e02\u7684\u80cc\u666f\u4e0b\u64cd\u4f5c\uff0c\u7edd\u4e0d\u9006\u5927\u52bf\u800c\u4e3a\u3002<\/td><\/tr><tr><td><strong>2. \u6781\u7aef\u504f\u79bb<\/strong><\/td><td>\u6536\u76d8\u4ef7\u4f4e\u4e8e 10\u65e5\u6307\u6570\u79fb\u52a8\u5e73\u5747\u7ebf (EMA) \u81f3\u5c11 2%<\/td><td>\u6a61\u76ae\u7b4b\u62c9\u4f38\u5230\u4e86\u6781\u9650\uff0c\u5e02\u573a\u51fa\u73b0\u4e86\u975e\u7406\u6027\u7684\u77ed\u671f\u6050\u614c\u3002<\/td><\/tr><tr><td><strong>3. \u60ef\u6027\u786e\u8ba4<\/strong><\/td><td>\u4eca\u65e5\u6700\u4f4e\u4ef7 &lt; \u6628\u65e5\u6700\u4f4e\u4ef7<\/td><td>\u786e\u8ba4\u629b\u538b\u8fd8\u5728\u5ba3\u6cc4\uff0c\u6211\u4eec\u8981\u5bfb\u627e\u201c\u6050\u614c\u7684\u6781\u503c\u70b9\u201d\uff0c\u9632\u6b62\u8fdb\u573a\u8fc7\u65e9\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u5165\u573a\u65f6\u673a\uff1a<\/strong>&nbsp;\u5f53\u5929\u6536\u76d8\u65f6\uff0c\u5982\u679c\u53d1\u73b0\u4e0a\u8ff0\u4e09\u4e2a\u706f\u5168\u4eae\uff0c\u5373\u53ef\u8003\u8651\u6267\u884c\u5165\u573a\u52a8\u4f5c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u79bb\u573a\u673a\u5236<\/strong><strong><em>\uff08\u4ec0\u4e48\u65f6\u5019\u64a4\uff1f\uff09<\/em><\/strong><\/h2>\n\n\n\n<p>\u8fdb\u573a\u5bb9\u6613\u51fa\u573a\u96be\u3002\u4e3a\u4e86\u89c4\u907f\u4eba\u6027\u7684\u5f31\u70b9\uff0c\u8fd9\u4e2a\u7b56\u7565\u8bbe\u5b9a\u4e86\u975e\u5e38\u673a\u68b0\u5316\u7684\u79bb\u573a\u89c4\u5219\u3002\u53ea\u8981\u6ee1\u8db3\u4ee5\u4e0b<strong>\u4efb\u610f\u4e00\u6761<\/strong>\uff0c\u5c31\u5fc5\u987b\u6267\u884c\u79bb\u573a\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. \u76ee\u6807\u8fbe\u6210\uff08\u56de\u5f52\u5747\u503c\uff09<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u89c4\u5219\uff1a<\/strong>\u00a0\u5f53\u6536\u76d8\u4ef7\u91cd\u65b0\u7ad9\u4e0a 10\u65e5 EMA\u3002<\/li>\n\n\n\n<li><strong>\u903b\u8f91\uff1a<\/strong>\u00a0\u6a61\u76ae\u7b4b\u5df2\u7ecf\u5f39\u56de\u6765\u4e86\uff0c\u5747\u503c\u56de\u5f52\u7684\u4efb\u52a1\u5b8c\u6210\u3002\u8fd9\u65f6\u5019\u4e0d\u8981\u8d2a\u5fc3\uff0c\u62ff\u8d70\u5c5e\u4e8e\u4f60\u7684\u90a3\u90e8\u5206\u6ce2\u52a8\uff0c\u7136\u540e\u7b49\u5f85\u4e0b\u4e00\u6b21\u673a\u4f1a\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. \u65f6\u95f4\u7194\u65ad\uff08\u9632\u6b62\u8d44\u91d1\u88ab\u5360\u7528\uff09<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u89c4\u5219\uff1a<\/strong>\u00a0\u6301\u4ed3\u6ee1 10 \u4e2a\u4ea4\u6613\u65e5\u3002<\/li>\n\n\n\n<li><strong>\u903b\u8f91\uff1a<\/strong>\u00a0\u5982\u679c\u4f60\u8fdb\u573a\u540e10\u5929\uff0c\u4ef7\u683c\u65e2\u6ca1\u6da8\u4e5f\u6ca1\u8dcc\uff0c\u6216\u8005\u8fd8\u5728\u78e8\u78e8\u5527\u5527\uff0c\u8bf4\u660e\u6211\u4eec\u7684\u5224\u65ad\u903b\u8f91\u5728\u8fd9\u6b21\u5931\u6548\u4e86\u3002\u4e3a\u4e86\u9632\u6b62\u8d44\u91d1\u53d8\u6210\u201c\u6b7b\u94b1\u201d\uff0c\u5f3a\u5236\u79bb\u573a\uff0c\u5bfb\u627e\u4e0b\u4e00\u4e2a\u66f4\u5177\u6548\u7387\u7684\u673a\u4f1a\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. \u98ce\u63a7\u7ea2\u7ebf\uff08\u5b89\u5168\u64a4\u9000\uff09<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u89c4\u5219\uff1a<\/strong>\u00a0\u4ef7\u683c\u8dcc\u7834\u5165\u573a\u4ef7\u7684 5%\uff08\u5373\u73b0\u4ef7 &lt; \u5165\u573a\u4ef7 \u00d7 0.95\uff09\u3002<\/li>\n\n\n\n<li><strong>\u903b\u8f91\uff1a<\/strong>\u00a0\u8fd9\u662f\u6700\u540e\u7684\u9632\u7ebf\u3002\u5982\u679c\u6a61\u76ae\u7b4b\u6ca1\u6709\u5f39\u56de\u6765\uff0c\u53cd\u800c\u65ad\u4e86\uff0c\u90a3\u5fc5\u987b\u65e0\u6761\u4ef6\u8ba4\u9519\u79bb\u573a\u3002\u7559\u5f97\u9752\u5c71\u5728\uff0c\u4e0d\u6015\u6ca1\u67f4\u70e7\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. \u5386\u53f2\u6570\u636e\u8868\u73b0<\/strong><\/h2>\n\n\n\n<p>\u8fd9\u5957\u7b56\u7565\u5728 SPY\uff08\u6807\u666e500 ETF\uff09\u4e0a\u7684\u5386\u53f2\u8868\u73b0\u975e\u5e38\u7a33\u5065\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L0AXlGp46ibnLJslhag1AEYQfBta0bzyKY9OWjrxicnhWwB7WGE5xXo2sQ7tMuWZaYDTuEblT28LNYA\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><figcaption class=\"wp-element-caption\"><em>\u7b56\u7565\u5728\u56fe\u8868\u4e0a\u7684\u53ef\u89c6\u5316\u8868\u73b0<\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6b63\u5411\u53cd\u9988\u6bd4\u4f8b\uff1a<\/strong>\u00a081.58%\uff08\u8fd9\u662f\u4e00\u4e2a\u76f8\u5f53\u9ad8\u7684\u6570\u636e\uff09<\/li>\n\n\n\n<li><strong>\u76c8\u4e8f\u6bd4<\/strong>\uff08Profit Factor\uff09\uff1a 2.595<\/li>\n\n\n\n<li><strong>\u6700\u5927\u56de\u64a4\uff1a<\/strong>\u00a07.81%<\/li>\n<\/ul>\n\n\n\n<p><em>\u6ce8\uff1a\u5386\u53f2\u6570\u636e\u4ec5\u4f9b\u53c2\u8003\uff0c\u5e02\u573a\u6c38\u8fdc\u5145\u6ee1\u4e0d\u786e\u5b9a\u6027\u3002<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001\u672c\u7b56\u7565\u53ea\u505a\u6307\u6570ETF<\/strong><\/h2>\n\n\n\n<p>\u7279\u522b\u5f3a\u8c03\u4e86\u4e00\u70b9\uff1a<strong>\u4e0d\u8981\u7528\u8fd9\u4e2a\u7b56\u7565\u53bb\u78b0\u4e2a\u80a1\u3002<\/strong><\/p>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\uff1f\u56e0\u4e3a\u4e2a\u80a1\u6709\u201c\u5f52\u96f6\u98ce\u9669\u201d\u3002\u5b89\u7136\u516c\u53f8\uff08Enron\uff09\u3001\u96f7\u66fc\u5144\u5f1f\u3001\u4ee5\u53ca\u5404\u79cd\u7a81\u7136\u66b4\u96f7\u7684\u767d\u9a6c\u80a1\u544a\u8bc9\u6211\u4eec\uff0c\u5355\u5bb6\u516c\u53f8\u65e0\u8bba\u591a\u5927\uff0c\u90fd\u6709\u53ef\u80fd\u5728\u4e00\u591c\u4e4b\u95f4\u7070\u98de\u70df\u706d\u3002<\/p>\n\n\n\n<p>\u4f46\u6807\u666e500\u6307\u6570\uff08S&amp;P 500\uff09\u5f52\u96f6\u7684\u6982\u7387\u51e0\u4e4e\u4e3a\u96f6\u3002\u5982\u679c\u8981\u8ba9\u6307\u6570\u5f52\u96f6\uff0c\u5f97\u7f8e\u56fd\u6700\u5927\u7684500\u5bb6\u516c\u53f8\u540c\u65f6\u7834\u4ea7\uff0c\u8fd9\u79cd\u6982\u7387\u5728\u73b0\u5b9e\u4e2d\u662f\u4e0d\u5b58\u5728\u7684\u3002\u505a\u6307\u6570\uff0c\u5c31\u662f\u7ad9\u5728\u5927\u6982\u7387\u7684\u4e00\u8fb9\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e94\u3001TradingView \u7b56\u7565\u4ee3\u7801<\/strong><strong><em>\uff08\u4f9b\u5b66\u4e60\u7814\u7a76\uff09<\/em><\/strong><\/h2>\n\n\n\n<p>\u4e3a\u4e86\u65b9\u4fbf\u5927\u5bb6\u7406\u89e3\uff0c\u8fd9\u91cc\u9644\u4e0a\u539f\u4f5c\u8005\u63d0\u4f9b\u7684<em>Pine Script<\/em>\u4ee3\u7801\u3002\u4f60\u53ef\u4ee5\u76f4\u63a5\u5728<em>TradingView<\/em>\u4e0a\u8fdb\u884c\u590d\u76d8\u7814\u7a76\uff08<em>\u6ce8\u610f\uff1a\u4ee3\u7801\u4ec5\u4f9b\u5b66\u4e60\u903b\u8f91\uff0c\u5b9e\u76d8\u9700\u8c28\u614e<\/em>\uff09\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/@version=5<br>strategy(\"EMA Distance Snapback\", overlay=true, initial_capital=10000,<br>         default_qty_type=strategy.percent_of_equity, default_qty_value=100,<br>         commission_type=strategy.commission.percent, commission_value=0.1)<br><br>\/\/ Inputs<br>trendLength = input.int(200, \"Trend SMA\", minval=50)<br>emaLength = input.int(10, \"Snapback EMA\", minval=10)<br>distancePct = input.float(2.0, \"Min Distance % Below EMA\", minval=2.0)<br>stopPct = input.float(5.0, \"Stop Loss %\", minval=1.0)<br>maxBars = input.int(10, \"Max Holding Period\", minval=3)<br><br>\/\/ Indicators<br>trendSMA = ta.sma(close, trendLength)<br>snapbackEMA = ta.ema(close, emaLength)<br><br>\/\/ Track bars in position<br>var int barsInTrade = 0<br><br>\/\/ Calculate distance from EMA<br>distanceFromEMA = ((close - snapbackEMA) \/ snapbackEMA) * 100<br><br>\/\/ Conditions<br>inUptrend = close > trendSMA<br>farBelowEMA = distanceFromEMA &lt; -distancePct<br>lowerLow = low &lt; low[1]<br>backAboveEMA = close > snapbackEMA<br>maxBarsReached = barsInTrade >= maxBars<br><br>\/\/ Count bars<br>if strategy.position_size > 0<br>    barsInTrade += 1<br>else<br>    barsInTrade := 0<br><br>\/\/ Entry<br>if inUptrend and farBelowEMA and lowerLow and strategy.position_size == 0<br>    strategy.entry(\"Long\", strategy.long)<br><br>\/\/ Exits<br>if strategy.position_size > 0<br>    if backAboveEMA<br>        strategy.close(\"Long\", comment=\"Back to EMA\")<br>    if maxBarsReached<br>        strategy.close(\"Long\", comment=\"Max Bars\")<br><br>\/\/ Stop Loss<br>if strategy.position_size > 0<br>    stopPrice = strategy.position_avg_price * (1 - stopPct\/100)<br>    strategy.exit(\"Stop\", \"Long\", stop=stopPrice)<br><br>\/\/ Plotting<br>plot(trendSMA, \"200 SMA\", color.blue, 2)<br>plot(snapbackEMA, \"10 EMA\", color.orange, 2)<br><br>\/\/ Distance band<br>upperBand = snapbackEMA * 1.04<br>lowerBand = snapbackEMA * 0.96<br>plot(upperBand, \"Upper Band\", color.green, 1, plot.style_circles)<br>plot(lowerBand, \"Lower Band\", color.red, 1, plot.style_circles)<br><br>bgcolor(inUptrend ? color.new(color.green, 95) : color.new(color.red, 95))<br><br>plotshape(inUptrend and farBelowEMA and lowerLow, \"Buy\", shape.triangleup,<br>          location.belowbar, color.lime, size=size.small)<br><br>\/\/ Show distance<br>var table distanceTable = table.new(position.top_right, 1, 1)<br>if barstate.islast<br>    table.cell(distanceTable, 0, 0, \"Distance: \" + str.tostring(distanceFromEMA, \"#.##\") + \"%\", <br>               bgcolor=distanceFromEMA &lt; -distancePct ? color.red : color.gray, <br>               text_color=color.white)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516d\u3001\u603b\u7ed3\u4e0e\u601d\u8003<\/strong><\/h2>\n\n\n\n<p>\u8fd9\u4e2a\u7b56\u7565\u7684\u7f8e\u5999\u4e4b\u5904\u5728\u4e8e&#8221;\u987a\u5927\u52bf\uff0c\u9006\u5c0f\u52bf&#8221;\u5b83\u7684<strong>\u7b80\u5355\u6027<\/strong>\u3002\u4e09\u4e2a\u6e05\u6670\u7684\u5165\u573a\u6761\u4ef6\uff0c\u4e09\u4e2a\u660e\u786e\u7684\u79bb\u573a\u6761\u4ef6\uff0c\u6ca1\u6709\u4efb\u4f55\u6a21\u68f1\u4e24\u53ef\u7684\u5730\u65b9\u3002\u5e02\u573a\u8981\u4e48\u6ee1\u8db3\u6761\u4ef6\uff0c\u8981\u4e48\u4e0d\u6ee1\u8db3\uff0c\u4e0d\u9700\u8981\u4f60\u62cd\u8111\u888b\u731c\u3002<\/p>\n\n\n\n<p>\u6700\u540e\uff0c\u9001\u7ed9\u5927\u5bb6\u51e0\u6761\u5fc3\u5f97\uff1a<\/p>\n\n\n\n<p>\u2705\u00a0<strong>\u76f8\u4fe1\u5e38\u8bc6<\/strong>\uff1a\u4ef7\u683c\u4e0d\u4f1a\u6c38\u8fdc\u504f\u79bb\u4ef7\u503c\uff0c\u5c31\u50cf\u949f\u6446\u7ec8\u4f1a\u56de\u5f52\u4e2d\u5fc3\u3002<\/p>\n\n\n\n<p>\u2705\u00a0<strong>\u4e25\u5b88\u7eaa\u5f8b<\/strong>\uff1a\u8fd9\u5957\u7b56\u7565\u6700\u96be\u7684\u4e0d\u662f\u4ee3\u7801\uff0c\u800c\u662f\u5f53\u4ef7\u683c\u771f\u7684\u8dcc\u4e0b\u6765\u65f6\uff0c\u4f60\u6562\u4e0d\u6562\u6267\u884c\u5165\u573a\uff1f\u5f53\u4e8f\u635f5%\u65f6\uff0c\u4f60\u820d\u4e0d\u820d\u5f97\u6267\u884c\u79bb\u573a\uff1f<\/p>\n\n\n\n<p>\u2705\u00a0<strong>\u62e5\u62b1\u5927\u6982\u7387<\/strong>\uff1a\u653e\u5f03\u4e00\u591c\u66b4\u5bcc\u7684\u5e7b\u60f3\uff0c\u901a\u8fc7\u957f\u671f\u3001\u91cd\u590d\u6267\u884c\u9ad8\u6982\u7387\u7684\u7b56\u7565\u6765\u5b9e\u73b0\u8d44\u4ea7\u7684\u7a33\u5065\u589e\u503c\u3002<\/p>\n\n\n\n<p>\u679c\u4f60\u89c9\u5f97\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u4f60\u6709\u5e2e\u52a9\uff0c\u8bb0\u5f97\u5206\u4eab\u7ed9\u66f4\u591a\u7684\u670b\u53cb\u3002\u6709\u4ec0\u4e48\u95ee\u9898\u53ef\u4ee5\u5728\u8bc4\u8bba\u533a\u7559\u8a00\uff0c\u8001\u4f59\u4f1a\u4e00\u4e00\u89e3\u7b54\u3002\u8ba9\u6211\u4eec\u4e00\u8d77\u5728\u91cf\u5316\u4ea4\u6613\u7684\u9053\u8def\u4e0a\u8d8a\u8d70\u8d8a\u8fdc\uff01<\/p>\n\n\n\n<p>#PineScript #\u6295\u8d44\u5fc3\u7406\u5b66 #SPY #\u91cf\u5316\u7b56\u7565 #\u5747\u503c\u56de\u5f52 #\u601d\u7ef4\u6a21\u578b #\u7f8e\u80a1ETF<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"has-text-align-center\">\u98ce\u9669\u63d0\u793a\uff1a\u6295\u8d44\u6709\u98ce\u9669\uff0c\u5165\u5e02\u9700\u8c28\u614e\u3002\u672c\u6587\u4ec5\u4f9b\u5b66\u4e60\u53c2\u8003\uff0c\u4e0d\u6784\u6210\u6295\u8d44\u5efa\u8bae\u3002<\/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\/2025\/12\/22\/%e4%b8%80%e5%a5%97%e5%9f%ba%e4%ba%8e%e5%9d%87%e5%80%bc%e5%9b%9e%e5%bd%92%e6%95%b0%e5%ad%a6%e9%80%bb%e8%be%91%e7%9a%84etf%e7%ad%96%e7%95%a5%e5%88%86%e4%ba%ab%ef%bc%88%e9%99%84\/\">Continue reading<span class=\"screen-reader-text\">\u4e00\u5957\u57fa\u4e8e\u201c\u5747\u503c\u56de\u5f52\u201d\u6570\u5b66\u903b\u8f91\u7684ETF\u7b56\u7565\u5206\u4eab\uff08\u9644\u5b8c\u6574TradingView\u4ee3\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":[4,5,6],"class_list":{"0":"post-3251","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-aiinvest","7":"tag-ai","9":"tag-6","10":"entry"},"_links":{"self":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3251","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=3251"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3251\/revisions"}],"predecessor-version":[{"id":3253,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3251\/revisions\/3253"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=3251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=3251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=3251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}