{"id":2865,"date":"2026-11-29T09:58:46","date_gmt":"2026-11-29T15:58:46","guid":{"rendered":"https:\/\/www.patternsmart.com\/cn\/?p=2865"},"modified":"2026-11-29T16:07:26","modified_gmt":"2026-11-29T16:07:26","slug":"mt4%e7%ad%96%e7%95%a5%e5%a6%82%e4%bd%95%e6%8c%89%e8%ae%a1%e5%88%92%e6%ad%a2%e6%8d%9f%e8%b7%9d%e7%a6%bb%e8%bf%87%e6%bb%a4%e5%85%a5%e5%9c%ba%e4%bb%b7%e5%b7%ae","status":"publish","type":"post","link":"https:\/\/www.patternsmart.com\/cn\/mt4%e7%ad%96%e7%95%a5%e5%a6%82%e4%bd%95%e6%8c%89%e8%ae%a1%e5%88%92%e6%ad%a2%e6%8d%9f%e8%b7%9d%e7%a6%bb%e8%bf%87%e6%bb%a4%e5%85%a5%e5%9c%ba%e4%bb%b7%e5%b7%ae\/","title":{"rendered":"MT4\u7b56\u7565\u5982\u4f55\u6309\u8ba1\u5212\u6b62\u635f\u8ddd\u79bb\u8fc7\u6ee4\u5165\u573a\u4ef7\u5dee"},"content":{"rendered":"<div class=\"postie-post\">\n<p>\u56fa\u5b9a\u6700\u5927\u4ef7\u5dee\u53ef\u80fd\u4e0d\u9002\u5408\u91c7\u7528\u4e0d\u540c\u6b62\u635f\u8ddd\u79bb\u7684MT4\u81ea\u52a8\u4ea4\u6613\u7b56\u7565\u3002\u76f8\u540c\u76842\u70b9\uff08pip\uff09\u4ef7\u5dee\uff0c\u5bf9\u4e8e20\u70b9\u6b62\u635f\u536010%\uff0c\u5bf9\u4e8e5\u70b9\u6b62\u635f\u5374\u536040%\u3002\u5c06\u4ef7\u5dee\u4e0e\u8ba1\u5212\u6b62\u635f\u8ddd\u79bb\u6bd4\u8f83\uff0c\u53ef\u4ee5\u5efa\u7acb\u4e0e\u4ea4\u6613\u5c3a\u5ea6\u76f8\u5173\u7684\u5165\u573a\u8fc7\u6ee4\u89c4\u5219\u3002<\/p>\n<h2>\u5b9a\u4e49\u8fc7\u6ee4\u6761\u4ef6<\/h2>\n<p>\u5728\u5df2\u6709\u5165\u573a\u4fe1\u53f7\u4e14\u7b56\u7565\u5141\u8bb8\u5f00\u4ed3\u65f6\uff0c\u8ba1\u7b97\u5f53\u524dAsk\u51cfBid\uff0c\u518d\u9664\u4ee5\u8ba1\u5212\u6b62\u635f\u8ddd\u79bb\u3002\u4e24\u8005\u5747\u4f7f\u7528\u4ef7\u683c\u5355\u4f4d\uff0c\u4e0d\u6df7\u7528\u62a5\u4ef7\u6700\u5c0f\u5355\u4f4dPoint\u548cpip\u3002\u8bbe\u4e0a\u9650\u4e3a0.10\uff0c\u7b49\u4e8e\u4e0a\u9650\u4e5f\u5141\u8bb8\u901a\u8fc7\u3002\u6b64\u8fc7\u6ee4\u5668\u53ea\u63a7\u5236\u65b0\u5f00\u4ed3\uff0c\u4e0d\u5e94\u963b\u6b62\u4fdd\u62a4\u6027\u5e73\u4ed3\u3002<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/www.patternsmart.com\/cn\/wp-content\/uploads\/2026\/11\/mt4_spread_ratio.png\" alt=\"mt4_spread_ratio.png\" width=\"800\" height=\"320\" style=\"max-width:100%;height:auto\"><figcaption>\u5047\u8bbe\u6b62\u635f\u8ddd\u79bb20\u70b9\uff08pip\uff09\uff0c\u4ef7\u5dee\u5360\u6bd4\u4e0a\u965010%\uff0c1\u548c2\u70b9\u901a\u8fc7\uff0c4\u70b9\u62d2\u7edd\u3002<\/figcaption><\/figure>\n<h2>\u6570\u503c\u6848\u4f8b<\/h2>\n<p>\u5047\u8bbeEURUSD\u8ba1\u5212\u6b62\u635f\u8ddd\u79bb\u4e3a0.0020\uff0c\u537320 pip\u3002\u82e5Bid\u4e3a1.10000\u3001Ask\u4e3a1.10020\uff0c\u4ef7\u5dee\u4e3a0.00020\uff0c\u5360\u6bd410%\uff0c\u5141\u8bb8\u5c1d\u8bd5\u5165\u573a\u3002\u82e5Ask\u5347\u81f31.10040\uff0c\u5360\u6bd420%\uff0c\u5219\u8df3\u8fc7\u3002\u5bf9\u4e8e\u4e94\u4f4d\u62a5\u4ef7\uff0c20 pip\u5bf9\u5e94200\u4e2aPoint\u3002<\/p>\n<h2>MQL4\u5b9e\u73b0<\/h2>\n<p>\u4ee5\u4e0b\u4e3a\u5f53\u524d\u56fe\u8868\u54c1\u79cd\u7684\u8f85\u52a9\u51fd\u6570\uff0c\u5728OnTick\u4e2d\u7684\u4fe1\u53f7\u4e0e\u6301\u4ed3\u68c0\u67e5\u4e4b\u540e\u3001OrderSend\u4e4b\u524d\u8c03\u7528\u3002RefreshRates\u7528\u4e8e\u66f4\u65b0\u5f53\u524d\u54c1\u79cd\u7684\u9884\u5b9a\u4e49\u62a5\u4ef7\u53d8\u91cf\u3002\u793a\u4f8b\u8c03\u7528\u5e94\u7f6e\u4e8e\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u5185\u90e8\uff0c\u4e0d\u662f\u5b8c\u6574EA\u3002<\/p>\n<pre style=\"white-space:pre;font-family:Consolas,Monaco,monospace\"><code>bool SpreadAllowed(double stopDistance, double maxRatio)<br>{<br>\u00a0\u00a0\u00a0\u00a0RefreshRates();<br>\u00a0\u00a0\u00a0\u00a0double spread = Ask - Bid;<br>\u00a0\u00a0\u00a0\u00a0if(stopDistance &lt;= 0 || maxRatio &lt; 0 || spread &lt; 0)<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return false;<br>\u00a0\u00a0\u00a0\u00a0return spread \/ stopDistance &lt;= maxRatio + 1e-9;<br>}<br>\/\/ Example: EURUSD, 20-pip planned stop distance<br>\/\/ Call immediately before attempting a fresh entry.<br>bool allowed = SpreadAllowed(0.0020, 0.10);<\/code><\/pre>\n<h2>\u4e0e\u5b9e\u9645\u8ba2\u5355\u7ed3\u5408<\/h2>\n<p>\u591a\u5934\u4ee5Ask\u4e70\u5165\u3001\u901a\u5e38\u4ee5Bid\u89e6\u53d1\u6b62\u635f\uff1b\u7a7a\u5934\u76f8\u53cd\u3002\u8ba1\u5212\u6b62\u635f\u8ddd\u79bb\u5e94\u6309\u9884\u671f\u5165\u573a\u4ef7\u4e0e\u5b9e\u9645\u6b62\u635f\u4ef7\u4e4b\u5dee\u8ba1\u7b97\u3002\u82e5\u6b62\u635f\u6e90\u81ea\u7ed3\u6784\u4f4e\u70b9\uff0c\u5e94\u5728\u66f4\u65b0\u62a5\u4ef7\u540e\u91cd\u65b0\u8ba1\u7b97\u8ddd\u79bb\u3002\u8fd8\u5e94\u68c0\u67e5\u7ecf\u7eaa\u5546\u6700\u5c0f\u6b62\u635f\u8ddd\u79bb\u3001\u4ef7\u683c\u7cbe\u5ea6\u3001\u624b\u6570\u548c\u4fdd\u8bc1\u91d1\u3002\u8fc7\u6ee4\u901a\u8fc7\u4e0d\u7b49\u4e8e\u6210\u4ea4\u6210\u529f\uff0c\u4ecd\u9700\u68c0\u67e5OrderSend\u8fd4\u56de\u503c\u548c\u9519\u8bef\u7801\u3002<\/p>\n<h2>\u4fe1\u53f7\u751f\u547d\u5468\u671f<\/h2>\n<p>\u5efa\u8bae\u660e\u786e\u62d2\u7edd\u540e\u662f\u5426\u5141\u8bb8\u91cd\u8bd5\u3002\u4f8b\u5982\u4ec5\u5728\u4fe1\u53f7K\u7ebf\u7ed3\u675f\u540e\u7684\u7b2c\u4e00\u7b14\u62a5\u4ef7\u68c0\u67e5\u4e00\u6b21\uff0c\u62d2\u7edd\u5373\u653e\u5f03\u8be5\u4fe1\u53f7\uff1b\u53e6\u4e00\u79cd\u65b9\u6848\u662f\u5728\u9650\u5b9a\u65f6\u95f4\u5185\u91cd\u8bd5\uff0c\u4f46\u5fc5\u987b\u9632\u6b62\u91cd\u590d\u5f00\u4ed3\u5e76\u91cd\u65b0\u9a8c\u8bc1\u4fe1\u53f7\u6709\u6548\u6027\u3002\u4e24\u79cd\u89c4\u5219\u5e94\u5206\u522b\u6d4b\u8bd5\u3002<\/p>\n<h2>\u6d4b\u8bd5\u4e0e\u9650\u5236<\/h2>\n<p>\u6bd4\u8f83\u65e0\u8fc7\u6ee4\u30015%\u300110%\u300120%\u4e0a\u9650\uff0c\u5728\u76f8\u540c\u4fe1\u53f7\u3001\u9000\u51fa\u548c\u4ed3\u4f4d\u89c4\u5219\u4e0b\u7edf\u8ba1\u62d2\u7edd\u7387\u3001\u51c0\u6536\u76ca\u3001\u56de\u64a4\u53ca\u6210\u4ea4\u6210\u672c\u3002\u68c0\u67e5\u8fb9\u754c\u7b49\u503c\u3001\u96f6\u8ddd\u79bb\u3001\u62a5\u4ef7\u8df3\u53d8\u548c\u4e0d\u540c\u62a5\u4ef7\u7cbe\u5ea6\u3002MT4\u5386\u53f2\u6d4b\u8bd5\u4e2d\u7684\u4ef7\u5dee\u6a21\u578b\u53ef\u80fd\u65e0\u6cd5\u53cd\u6620\u771f\u5b9e\u52a8\u6001\u4ef7\u5dee\uff0c\u5e94\u7ed3\u5408\u53ef\u7528\u7684\u9ad8\u8d28\u91cf\u6570\u636e\u548c\u6a21\u62df\u8d26\u6237\u524d\u5411\u6d4b\u8bd5\u3002\u4ef7\u5dee\u4e0d\u662f\u5168\u90e8\u6210\u672c\uff0c\u4f63\u91d1\u3001\u6ed1\u70b9\u548c\u8df3\u7a7a\u4ecd\u53ef\u80fd\u6269\u5927\u4e8f\u635f\u3002<\/p>\n<p>\u53c2\u8003\uff1a<a href=\"https:\/\/docs.mql4.com\/series\/refreshrates\">MQL4 RefreshRates<\/a>\u3002\u793a\u4f8b\u672a\u5b9e\u9645\u7f16\u8bd1\u6216\u56de\u6d4b\uff0c\u4ec5\u4f9b\u6559\u5b66\uff0c\u4e0d\u4fdd\u8bc1\u6536\u76ca\u3002<\/p>\n<p>\u5982\u9700\u5c06\u6b64\u514d\u8d39\u7b56\u7565\u601d\u8def\u6574\u5408\u5230\u73b0\u6709EA\uff0c\u8bf7\u8054\u7cfb\u6211\u4eec\u4e86\u89e3<a href=\"https:\/\/www.patternsmart.com\/cn\/custom\/\">MT4\u4ea4\u6613\u7b56\u7565\u5b9a\u5236\u5f00\u53d1\u670d\u52a1<\/a>\u3002<\/p>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u56fa\u5b9a\u6700\u5927\u4ef7\u5dee\u53ef\u80fd\u4e0d\u9002\u5408\u91c7\u7528\u4e0d\u540c\u6b62\u635f\u8ddd\u79bb\u7684MT4\u81ea\u52a8\u4ea4\u6613\u7b56\u7565\u3002\u76f8\u540c\u76842\u70b9\uff08pip\uff09\u4ef7\u5dee\uff0c\u5bf9\u4e8e20\u70b9\u6b62\u635f\u536010%\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2866,"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":[167,520,233],"tags":[194,426,126,675,673,342],"class_list":["post-2865","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mt4","category-520","category-233","tag-ea","tag-mql4","tag-mt4","tag-675","tag-673","tag-342"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/www.patternsmart.com\/cn\/wp-content\/uploads\/2026\/11\/mt4_spread_ratio.png","_links":{"self":[{"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/posts\/2865","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=2865"}],"version-history":[{"count":0,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/posts\/2865\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/media\/2866"}],"wp:attachment":[{"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/media?parent=2865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/categories?post=2865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/tags?post=2865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}