{"id":2925,"date":"2026-11-30T10:34:58","date_gmt":"2026-11-30T16:34:58","guid":{"rendered":"https:\/\/www.patternsmart.com\/cn\/?p=2925"},"modified":"2026-11-30T16:37:12","modified_gmt":"2026-11-30T16:37:12","slug":"%e6%b3%a2%e5%8a%a8%e7%8e%87%e8%87%aa%e9%80%82%e5%ba%94%e7%aa%81%e7%a0%b4ea%e7%9a%84%e9%a3%8e%e9%99%a9%e5%ae%9a%e4%bb%93%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.patternsmart.com\/cn\/%e6%b3%a2%e5%8a%a8%e7%8e%87%e8%87%aa%e9%80%82%e5%ba%94%e7%aa%81%e7%a0%b4ea%e7%9a%84%e9%a3%8e%e9%99%a9%e5%ae%9a%e4%bb%93%e6%96%b9%e6%b3%95\/","title":{"rendered":"\u6ce2\u52a8\u7387\u81ea\u9002\u5e94\u7a81\u7834EA\u7684\u98ce\u9669\u5b9a\u4ed3\u65b9\u6cd5"},"content":{"rendered":"<div class=\"postie-post\">\n<h2>\u8ba9\u7a81\u7834\u7b56\u7565\u7684\u8d44\u91d1\u98ce\u9669\u968f\u6ce2\u52a8\u53d8\u5316\u4fdd\u6301\u76f8\u5bf9\u7a33\u5b9a<\/h2>\n<p>\u56fa\u5b9a\u624b\u6570\u4f1a\u4f7f\u4fdd\u62a4\u6027\u6b62\u635f\u8ddd\u79bb\u6269\u5927\u65f6\u7684\u8d44\u91d1\u98ce\u9669\u589e\u52a0\u3002MT5 EA \u53ef\u4ee5\u5728\u63d0\u4ea4\u5e02\u4ef7\u5355\u524d\uff0c\u6839\u636e\u8ba1\u5212\u5165\u573a\u4ef7\u548c\u6b62\u635f\u4ef7\u8ba1\u7b97\u4ea4\u6613\u624b\u6570\u3002\u4ee5\u4ec5\u505a\u591a\u7684\u7a81\u7834\u7b56\u7565\u4e3a\u4f8b\uff1a\u5df2\u6536\u76d8K\u7ebf\u7684\u6536\u76d8\u4ef7\u7a81\u7834\u6b64\u524d20\u6839\u5df2\u6536\u76d8K\u7ebf\u7684\u6700\u9ad8\u4ef7\uff0c\u6b62\u635f\u8bbe\u5728\u5f53\u524d\u5356\u4ef7\u4e0b\u65b9\u4e24\u500dATR(14)\u5904\u3002\u6bcf\u6839\u65b0K\u7ebf\u53ea\u5224\u65ad\u4e00\u6b21\uff1b\u5df2\u6709\u672c\u7b56\u7565\u6301\u4ed3\u6216\u5f85\u6210\u4ea4\u5165\u573a\u8ba2\u5355\u65f6\u8df3\u8fc7\u3002<\/p>\n<h2>\u6570\u503c\u793a\u4f8b<\/h2>\n<p>\u5047\u8bbe\u67d0\u54c1\u79cd\u6bcf\u624b\u6bcf\u70b9\u4e8f\u635f5\u7f8e\u5143\uff0c\u98ce\u9669\u9884\u7b97100\u7f8e\u5143\u3002\u6b62\u635f\u8ddd\u79bb20\u300140\u300180\u70b9\u5206\u522b\u5bf9\u5e941\u30010.5\u30010.25\u624b\uff0c\u524d\u63d0\u662f\u4ea4\u6613\u91cf\u6b65\u957f\u5141\u8bb8\u3002<\/p>\n<p> <img decoding=\"async\" alt=\"risk-sizing.png\" src=\"https:\/\/www.patternsmart.com\/cn\/wp-content\/uploads\/2026\/11\/risk-sizing.png\" width=\"480\"><\/p>\n<p><em>\u56fe\uff1a\u84dd\u8272\u4e3a\u6b62\u635f\u70b9\u6570\uff08PTS\uff09\uff0c\u7eff\u8272\u4e3a\u4ea4\u6613\u624b\u6570\uff08LOTS\uff09\uff0c\u4e24\u8005\u4f7f\u7528\u4e0d\u540c\u523b\u5ea6\uff0c\u6bcf\u7ec4\u7406\u8bba\u98ce\u9669\u5747\u4e3a100\u7f8e\u5143\uff0c\u672a\u8ba1\u4ea4\u6613\u6210\u672c\u3002<\/em><\/p>\n<h2>MQL5 \u5b9e\u73b0<\/h2>\n<p>OrderCalcProfit \u6839\u636e\u8ba2\u5355\u65b9\u5411\u3001\u624b\u6570\u548c\u4ef7\u683c\u4f30\u7b97\u4ee5\u8d26\u6237\u8d27\u5e01\u8ba1\u4ef7\u7684\u76c8\u4e8f\u3002\u624b\u6570\u5e94\u5411\u4e0b\u53d6\u6574\u3002\u4ee5\u4e0b\u8f85\u52a9\u51fd\u6570\u8981\u6c42\u6709\u6548\u7684\u9006\u5411\u6b62\u635f\u4ef7\u683c\u53ca\u5e02\u4ef7\u4e70\u5356\u65b9\u5411\uff0c\u8fd4\u56de0\u8868\u793a\u653e\u5f03\u4ea4\u6613\u3002<\/p>\n<pre style=\"white-space:pre;font-family:Consolas,Monaco,monospace\"><code>double RiskVolume(ENUM_ORDER_TYPE side, double entry, double stop, double budget)<br>{<br>\u00a0\u00a0\u00a0\u00a0double loss;<br>\u00a0\u00a0\u00a0\u00a0if(budget &lt;= 0 || !OrderCalcProfit(side,_Symbol,1.0,entry,stop,loss) || loss &gt;= 0)<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return 0;<br>\u00a0\u00a0\u00a0\u00a0double step = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP);<br>\u00a0\u00a0\u00a0\u00a0double minv = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN);<br>\u00a0\u00a0\u00a0\u00a0double maxv = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX);<br>\u00a0\u00a0\u00a0\u00a0if(step &lt;= 0) return 0;<br>\u00a0\u00a0\u00a0\u00a0double v = MathFloor(MathMin(maxv,budget\/(-loss))\/step)*step;<br>\u00a0\u00a0\u00a0\u00a0return v &gt;= minv ? v : 0;<br>}<\/code><\/pre>\n<p>\u4e70\u5165\u4f7f\u7528\u6700\u65b0Ask\uff0c\u5356\u51fa\u4f7f\u7528Bid\u3002\u6309\u6700\u5c0f\u4ef7\u683c\u53d8\u52a8\u5355\u4f4d\u89c4\u8303\u6b62\u635f\u4ef7\u683c\uff0c\u68c0\u67e5\u6700\u5c0f\u6b62\u635f\u8ddd\u79bb\uff1b\u82e5\u8c03\u6574\u6b62\u635f\uff0c\u987b\u91cd\u65b0\u8ba1\u7b97\u624b\u6570\u3002\u4e3a\u4f63\u91d1\u548c\u6ed1\u70b9\u9884\u7559\u98ce\u9669\u9884\u7b97\u3002\u53d1\u9001\u524d\u4f7f\u7528OrderCheck\u68c0\u67e5\u4fdd\u8bc1\u91d1\u53ca\u8bf7\u6c42\u53c2\u6570\uff0c\u5e76\u68c0\u67e5\u670d\u52a1\u5668\u8fd4\u56de\u7801\u548c\u5b9e\u9645\u6210\u4ea4\u3002\u51c0\u989d\u8d26\u6237\u4e2d\u82e5\u5176\u4ed6\u7b56\u7565\u4ea4\u6613\u540c\u4e00\u54c1\u79cd\uff0c\u5e94\u7279\u522b\u6ce8\u610f\u6301\u4ed3\u5408\u5e76\u95ee\u9898\u3002<\/p>\n<h2>\u6d4b\u8bd5\u4e0e\u5c40\u9650<\/h2>\n<p>\u4f7f\u7528\u76f8\u540c\u771f\u5b9e\u9010\u7b14\u5386\u53f2\u6570\u636e\u3001\u5408\u7406\u70b9\u5dee\u53ca\u4f63\u91d1\uff0c\u5bf9\u6bd4\u56fa\u5b9a\u624b\u6570\u4e0e\u98ce\u9669\u5b9a\u4ed3\u7248\u672c\u3002\u6d4b\u8bd5\u6700\u5c0f\u624b\u6570\u4e0d\u8db3\u3001\u8df3\u7a7a\u3001\u4fdd\u8bc1\u91d1\u4e0d\u8db3\u3001\u6c47\u7387\u53d8\u5316\u53ca\u91cd\u590d\u4fe1\u53f7\u3002\u5206\u522b\u8bb0\u5f55\u8ba1\u5212\u98ce\u9669\u548c\u5b9e\u9645\u4e8f\u635f\u3002\u793a\u4f8b\u51fd\u6570\u672a\u7ecf\u5b9e\u9645\u7f16\u8bd1\u6216\u56de\u6d4b\u3002\u6b62\u635f\u4e0d\u80fd\u4fdd\u8bc1\u6210\u4ea4\u4ef7\u683c\uff0c\u6760\u6746\u4ea4\u6613\u53ef\u80fd\u9020\u6210\u91cd\u5927\u635f\u5931\u3002<\/p>\n<p>\u5982\u9700\u9488\u5bf9\u7ecf\u7eaa\u5546\u7684\u6267\u884c\u63a7\u5236\u6216\u989d\u5916\u8fc7\u6ee4\u6761\u4ef6\uff0c\u8bf7\u4e86\u89e3<a href=\"https:\/\/www.patternsmart.com\/cn\/custom\/\">MT5\u4ea4\u6613\u7b56\u7565\u5b9a\u5236\u5f00\u53d1\u670d\u52a1<\/a>\u3002<\/p>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u8ba9\u7a81\u7834\u7b56\u7565\u7684\u8d44\u91d1\u98ce\u9669\u968f\u6ce2\u52a8\u53d8\u5316\u4fdd\u6301\u76f8\u5bf9\u7a33\u5b9a \u56fa\u5b9a\u624b\u6570\u4f1a\u4f7f\u4fdd\u62a4\u6027\u6b62\u635f\u8ddd\u79bb\u6269\u5927\u65f6\u7684\u8d44\u91d1\u98ce\u9669\u589e\u52a0\u3002MT5 EA \u53ef\u4ee5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2926,"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,520,233],"tags":[102,429,128,442,693,604,342],"class_list":["post-2925","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mt5","category-520","category-233","tag-atr","tag-mql5","tag-mt5","tag-442","tag-693","tag-604","tag-342"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/www.patternsmart.com\/cn\/wp-content\/uploads\/2026\/11\/risk-sizing.png","_links":{"self":[{"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/posts\/2925","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=2925"}],"version-history":[{"count":0,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/posts\/2925\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/media\/2926"}],"wp:attachment":[{"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/media?parent=2925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/categories?post=2925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.patternsmart.com\/cn\/wp-json\/wp\/v2\/tags?post=2925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}