{"id":2423,"date":"2026-11-21T12:30:18","date_gmt":"2026-11-21T18:30:18","guid":{"rendered":"https:\/\/www.patternsmart.com\/cn\/?p=2423"},"modified":"2026-11-21T18:32:33","modified_gmt":"2026-11-21T18:32:33","slug":"mt5%e5%8f%8c%e5%91%a8%e6%9c%9frsi%e6%94%b6%e7%9b%98%e7%a1%ae%e8%ae%a4%e6%8c%87%e6%a0%87%ef%bc%9a%e9%81%bf%e5%85%8d%e9%ab%98%e5%91%a8%e6%9c%9f%e6%95%b0%e6%8d%ae%e6%b3%84%e6%bc%8f%e7%9a%84%e5%ae%8c","status":"publish","type":"post","link":"https:\/\/www.patternsmart.com\/cn\/mt5%e5%8f%8c%e5%91%a8%e6%9c%9frsi%e6%94%b6%e7%9b%98%e7%a1%ae%e8%ae%a4%e6%8c%87%e6%a0%87%ef%bc%9a%e9%81%bf%e5%85%8d%e9%ab%98%e5%91%a8%e6%9c%9f%e6%95%b0%e6%8d%ae%e6%b3%84%e6%bc%8f%e7%9a%84%e5%ae%8c\/","title":{"rendered":"MT5\u53cc\u5468\u671fRSI\u6536\u76d8\u786e\u8ba4\u6307\u6807\uff1a\u907f\u514d\u9ad8\u5468\u671f\u6570\u636e\u6cc4\u6f0f\u7684\u5b8c\u6574MQL5\u6e90\u7801"},"content":{"rendered":"<div class=\"postie-post\">\n<div>\n<article style=\"max-width:860px;margin:auto\">\n<h1>MT5\u53cc\u5468\u671fRSI\u6536\u76d8\u786e\u8ba4\u6307\u6807\uff1a\u907f\u514d\u9ad8\u5468\u671f\u6570\u636e\u6cc4\u6f0f\u7684\u5b8c\u6574MQL5\u6e90\u7801<\/h1>\n<p style=\"color:#46628b\">\u9ad8\u7ea7\u4ea4\u6613\u6559\u7a0b | \u5b8c\u6574\u6e90\u7801\u4e0e\u539f\u521b\u793a\u610f\u56fe<\/p>\n<h2 style=\"color:#17305a\">\u4e3a\u4ec0\u4e48\u5fc5\u987b\u5bf9\u9f50\u9ad8\u5468\u671f\u65f6\u95f4<\/h2>\n<p style=\"line-height:1.8\">M15\u56fe\u8868\u4f7f\u7528H1 RSI\u65f6\uff0c\u6700\u5bb9\u6613\u72af\u7684\u9519\u8bef\u662f\u628a\u5c1a\u672a\u5b8c\u6210\u7684H1\u6570\u503c\u5f53\u4f5c\u5df2\u7ecf\u786e\u8ba4\u7684\u5386\u53f2\u4fe1\u606f\u3002H1\u5728\u6536\u76d8\u524d\u4f1a\u968f\u4ef7\u683c\u53d8\u5316\uff0c\u76f4\u63a5\u8bfb\u53d6\u53ef\u80fd\u5bfc\u81f4\u5386\u53f2\u56fe\u8868\u548c\u5f53\u65f6\u771f\u5b9e\u53ef\u89c2\u5bdf\u4fe1\u53f7\u4e0d\u4e00\u81f4\u3002\u672c\u4f8b\u9010\u6839\u83b7\u53d6M15\u65f6\u95f4\u6233\uff0c\u518d\u5b9a\u4f4d\u6240\u5728H1\u5468\u671f\u4e4b\u524d\u5df2\u7ecf\u7ed3\u675f\u7684H1 K\u7ebf\u3002<\/p>\n<h2 style=\"color:#17305a\">\u7cbe\u786e\u7684\u4fe1\u53f7\u89c4\u5219<\/h2>\n<p style=\"line-height:1.8\">\u672c\u4f8b\u4f7f\u7528\u672c\u5468\u671fRSI(14)\u4e0a\u7a7f50\u4e14\u524d\u4e00\u6839\u5df2\u5b8c\u6210H1\u7684RSI(14)&gt;55\u4f5c\u4e3a\u591a\u5934\u786e\u8ba4\uff1b\u53cd\u5411\u4e0b\u7a7f50\u5e76\u4e14\u9ad8\u5468\u671fRSI&lt;45\u4f5c\u4e3a\u7a7a\u5934\u786e\u8ba4\u3002\u7a0b\u5e8f\u6bd4\u8f83\u7d22\u5f15i\u548ci+1\u7684\u4e24\u6839\u5df2\u5b8c\u6210K\u7ebf\uff0c\u4e0d\u4f7f\u7528\u7d22\u5f150\u5b9e\u65f6\u5f62\u6210\u4e2d\u7684K\u7ebf\u3002MQL5\u7684iRSI\u8fd4\u56de\u53e5\u67c4\uff0cCopyBuffer\u624d\u7528\u4e8e\u8bfb\u53d6\u6307\u6807\u6570\u503c\u3002<\/p>\n<h2 style=\"color:#17305a\">\u53ef\u590d\u6838\u7684\u6570\u5b57\u6848\u4f8b<\/h2>\n<p style=\"line-height:1.8\">\u5047\u8bbe10:15\u7684M15 K\u7ebf\u5b8c\u6210\u65f6\uff0c\u672c\u5468\u671fRSI\u4ece48.2\u5347\u81f352.4\u300210:00\u5f00\u59cb\u7684H1\u6b64\u65f6\u8fd8\u6ca1\u6709\u6536\u76d8\uff0c\u56e0\u6b64\u53ea\u80fd\u8bfb\u53d609:00\u201410:00\u5b8c\u6210\u7684H1\u3002\u5982\u679c\u5176RSI\u662f58.6\uff0c\u591a\u5934\u6761\u4ef6\u6210\u7acb\uff1b\u5982\u679c\u662f53.1\uff0c\u5373\u4fbf\u672c\u5468\u671f\u5df2\u7ecf\u4e0a\u7a7f50\uff0c\u4e5f\u4e0d\u753b\u7bad\u5934\u3002\u8fd9\u662f\u7528\u4e8e\u8bb2\u89e3\u7684\u5047\u8bbe\u6570\u636e\u3002<\/p>\n<figure><img decoding=\"async\" style=\"max-width:100%\" alt=\"\u9ad8\u5468\u671f\u6536\u76d8\u786e\u8ba4\u4e0e\u4fe1\u53f7\u95e8\u69db\u793a\u610f\u56fe\" src=\"https:\/\/www.patternsmart.com\/cn\/wp-content\/uploads\/2026\/11\/\u9ad8\u5468\u671f\u6536\u76d8\u786e\u8ba4\u4e0e\u4fe1\u53f7\u95e8\u69db\u793a\u610f\u56fe.png\"><figcaption>\u539f\u521b\u793a\u610f\uff0c\u4e0d\u662f\u5386\u53f2\u5e02\u573a\u6570\u636e\u3002<\/figcaption><\/figure>\n<h2 style=\"color:#17305a\">\u4e3a\u4ec0\u4e48iBarShift\u4e0d\u80fd\u7701\u7565<\/h2>\n<p style=\"line-height:1.8\">iBarShift\u8d1f\u8d23\u628a\u6bcf\u6839\u4f4e\u5468\u671fK\u7ebf\u65f6\u95f4\u6620\u5c04\u5230\u5305\u542b\u5b83\u7684\u9ad8\u5468\u671fK\u7ebf\uff1b\u7d22\u5f15\u52a01\u4e4b\u540e\uff0c\u624d\u80fd\u8bfb\u53d6\u6b64\u524d\u5df2\u5b8c\u6210\u7684H1\u6570\u636e\u3002\u8fd9\u540c\u65f6\u89e3\u51b3\u5386\u53f2\u56de\u653e\u4e2d\u7684\u672a\u6765\u6570\u636e\u6cc4\u6f0f\u3002\u82e5CopyBuffer\u5c1a\u672a\u51c6\u5907\u597d\uff0c\u6216\u9ad8\u5468\u671f\u5386\u53f2\u4e0d\u8db3\uff0c\u4ee3\u7801\u76f4\u63a5\u8df3\u8fc7\uff0c\u4e0d\u7528\u731c\u6d4b\u503c\u586b\u8865\u3002<\/p>\n<h2 style=\"color:#17305a\">\u53c2\u6570\u654f\u611f\u6027\u4e0e\u8bef\u4fe1\u53f7<\/h2>\n<p style=\"line-height:1.8\">\u9ed8\u8ba455\/45\u95e8\u69db\u6bd450\u66f4\u4e25\u683c\u3002\u8c03\u4e3a60\/40\u901a\u5e38\u4f1a\u51cf\u5c11\u4fe1\u53f7\u5e76\u4f7f\u786e\u8ba4\u63a8\u8fdf\uff1b\u6539\u4e3a52\/48\u5219\u66f4\u5bb9\u6613\u5728\u9707\u8361\u9636\u6bb5\u89e6\u53d1\u4ea4\u53c9\u3002RSI\u5468\u671f\u8d8a\u77ed\u8d8a\u654f\u611f\u4f46\u566a\u58f0\u66f4\u591a\u3002\u7bad\u5934\u53ea\u8868\u793a\u6761\u4ef6\u6210\u7acb\uff0c\u4e0d\u4ee3\u8868\u7b56\u7565\u80fd\u591f\u6309\u7bad\u5934\u4ef7\u683c\u6210\u4ea4\uff0c\u70b9\u5dee\u3001\u6ed1\u70b9\u4e0e\u624b\u7eed\u8d39\u5fc5\u987b\u5355\u72ec\u68c0\u9a8c\u3002<\/p>\n<h2 style=\"color:#17305a\">\u5b89\u88c5\u6b65\u9aa4\u548c\u68c0\u67e5\u91cd\u70b9<\/h2>\n<p style=\"line-height:1.8\">\u5c06\u4ee3\u7801\u653e\u5165MQL5\/Indicators\uff0c\u7528MetaEditor\u7f16\u8bd1\u540e\u52a0\u8f7d\u5230\u56fe\u8868\u3002\u68c0\u67e5\u81f3\u5c11\u5341\u4e2a\u6807\u8bb0\u70b9\uff0c\u8bb0\u5f55\u672c\u5468\u671fRSI\u7a7f\u8d8a\u503c\u3001M15\u65f6\u95f4\u548c\u5bf9\u5e94\u7684\u524d\u4e00\u6839H1\u6536\u76d8\u65f6\u95f4\uff0c\u540c\u65f6\u68c0\u9a8c\u5468\u672b\u7f3a\u53e3\u548c\u5b9e\u65f6\u65b0K\u7ebf\u751f\u6210\u3002\u4ee3\u7801\u672a\u5728\u771f\u5b9e\u7ec8\u7aef\u7f16\u8bd1\uff0c\u6b63\u5f0f\u53d1\u5e03\u524d\u9700\u8981\u5ba1\u6838\uff1b\u5e76\u4e0d\u4fdd\u8bc1\u76c8\u5229\u3002<\/p>\n<h2>\u5b8c\u6574MQL5\u6307\u6807\u6e90\u7801<\/h2>\n<pre style=\"white-space:pre;font-family:Consolas,Monaco,monospace;background:#f3f6fa;padding:15px\"><code>#property indicator_chart_window<br>#property indicator_buffers 2<br>#property indicator_plots 2<br>#property indicator_type1 DRAW_ARROW<br>#property indicator_color1 clrLimeGreen<br>#property indicator_type2 DRAW_ARROW<br>#property indicator_color2 clrTomato<br>input int LocalPeriod=14;<br>input ENUM_TIMEFRAMES HigherTF=PERIOD_H1;<br>input int HigherPeriod=14;<br>input double LongGate=55.0;<br>input double ShortGate=45.0;<br>double Buy[],Sell[];<br>int hLocal=INVALID_HANDLE,hHigher=INVALID_HANDLE;<br>int OnInit()<br>{<br>\u00a0\u00a0\u00a0SetIndexBuffer(0,Buy,INDICATOR_DATA);<br>\u00a0\u00a0\u00a0SetIndexBuffer(1,Sell,INDICATOR_DATA);<br>\u00a0\u00a0\u00a0ArraySetAsSeries(Buy,true); ArraySetAsSeries(Sell,true);<br>\u00a0\u00a0\u00a0PlotIndexSetInteger(0,PLOT_ARROW,233);<br>\u00a0\u00a0\u00a0PlotIndexSetInteger(1,PLOT_ARROW,234);<br>\u00a0\u00a0\u00a0PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,EMPTY_VALUE);<br>\u00a0\u00a0\u00a0PlotIndexSetDouble(1,PLOT_EMPTY_VALUE,EMPTY_VALUE);<br>\u00a0\u00a0\u00a0hLocal=iRSI(_Symbol,_Period,LocalPeriod,PRICE_CLOSE);<br>\u00a0\u00a0\u00a0hHigher=iRSI(_Symbol,HigherTF,HigherPeriod,PRICE_CLOSE);<br>\u00a0\u00a0\u00a0return(hLocal==INVALID_HANDLE||hHigher==INVALID_HANDLE)?INIT_FAILED:INIT_SUCCEEDED;<br>}<br>void OnDeinit(const int reason)<br>{<br>\u00a0\u00a0\u00a0if(hLocal!=INVALID_HANDLE) IndicatorRelease(hLocal);<br>\u00a0\u00a0\u00a0if(hHigher!=INVALID_HANDLE) IndicatorRelease(hHigher);<br>}<br>int OnCalculate(const int total,const int prev,const datetime &amp;time[],<br>\u00a0const double &amp;open[],const double &amp;high[],const double &amp;low[],<br>\u00a0const double &amp;close[],const long &amp;tick_volume[],<br>\u00a0const long &amp;volume[],const int &amp;spread[])<br>{<br>\u00a0\u00a0\u00a0if(total&lt;LocalPeriod+4) return 0;<br>\u00a0\u00a0\u00a0ArraySetAsSeries(time,true); ArraySetAsSeries(high,true);<br>\u00a0\u00a0\u00a0ArraySetAsSeries(low,true);<br>\u00a0\u00a0\u00a0double local[],higher[];<br>\u00a0\u00a0\u00a0ArraySetAsSeries(local,true); ArraySetAsSeries(higher,true);<br>\u00a0\u00a0\u00a0int count=Bars(_Symbol,HigherTF);<br>\u00a0\u00a0\u00a0if(count&lt;HigherPeriod+3) return prev;<br>\u00a0\u00a0\u00a0if(CopyBuffer(hLocal,0,0,total,local)!=total) return prev;<br>\u00a0\u00a0\u00a0if(CopyBuffer(hHigher,0,0,count,higher)!=count) return prev;<br>\u00a0\u00a0\u00a0Buy[0]=EMPTY_VALUE;Sell[0]=EMPTY_VALUE;<br>\u00a0\u00a0\u00a0int last=(prev==0)?total-2:MathMin(total-2,total-prev+2);<br>\u00a0\u00a0\u00a0for(int i=last;i&gt;=1;i--)<br>\u00a0\u00a0\u00a0{<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Buy[i]=EMPTY_VALUE;Sell[i]=EMPTY_VALUE;<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0int j=iBarShift(_Symbol,HigherTF,time[i],false);<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(j&lt;0||j+1&gt;=count) continue;<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0double context=higher[j+1]; \/\/ previous completed HTF candle<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(local[i]==EMPTY_VALUE||local[i+1]==EMPTY_VALUE) continue;<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(local[i+1]&lt;=50&amp;&amp;local[i]&gt;50&amp;&amp;context&gt;LongGate)<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Buy[i]=low[i]-80*_Point;<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(local[i+1]&gt;=50&amp;&amp;local[i]&lt;50&amp;&amp;context&lt;ShortGate)<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Sell[i]=high[i]+80*_Point;<br>\u00a0\u00a0\u00a0}<br>\u00a0\u00a0\u00a0return total;<br>}<br><\/code><\/pre>\n<p>\u5982\u679c\u5e0c\u671b\u6839\u636e\u81ea\u5df1\u7684\u4ea4\u6613\u7814\u7a76\u8c03\u6574\u8fc7\u6ee4\u5668\u6216\u63d0\u9192\uff0c\u53ef\u67e5\u770b<a href=\"https:\/\/www.patternsmart.com\/cn\/custom\/\">\u4ea4\u6613\u8f6f\u4ef6\u5b9a\u5236\u5f00\u53d1\u670d\u52a1<\/a>\u5e76\u8054\u7cfb\u6211\u4eec\u3002<\/p>\n<\/p>\n<\/article>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>MT5\u53cc\u5468\u671fRSI\u6536\u76d8\u786e\u8ba4\u6307\u6807\uff1a\u907f\u514d\u9ad8\u5468\u671f\u6570\u636e\u6cc4\u6f0f\u7684\u5b8c\u6574MQL5\u6e90\u7801 \u9ad8\u7ea7\u4ea4\u6613\u6559\u7a0b | \u5b8c\u6574\u6e90\u7801\u4e0e\u539f\u521b\u793a\u610f\u56fe  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2424,"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":[364,233,217],"tags":[97,428,474,464],"class_list":["post-2423","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mt5","category-233","category-217","tag-rsi","tag-mt5","tag-474","tag-464"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/www.patternsmart.com\/cn\/wp-content\/uploads\/2026\/11\/\u9ad8\u5468\u671f\u6536\u76d8\u786e\u8ba4\u4e0e\u4fe1\u53f7\u95e8\u69db\u793a\u610f\u56fe.png","_links":{"self":[{"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/posts\/2423","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=2423"}],"version-history":[{"count":0,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/posts\/2423\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/media\/2424"}],"wp:attachment":[{"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/media?parent=2423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/categories?post=2423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/tags?post=2423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}