{"id":65632,"date":"2026-03-15T03:27:04","date_gmt":"2026-03-14T18:27:04","guid":{"rendered":"https:\/\/sys-tre.com\/forexguide\/?p=65632"},"modified":"2026-03-24T22:40:55","modified_gmt":"2026-03-24T13:40:55","slug":"mql5-error-guide","status":"publish","type":"post","link":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/","title":{"rendered":"MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u89e3\u6c7a\u6cd5\u30fb\u30c7\u30d0\u30c3\u30b0"},"content":{"rendered":"\n<p>MQL5\u306eEA\u958b\u767a\u3067\u906d\u9047\u3059\u308b\u30a8\u30e9\u30fc\u3092\u7db2\u7f85\u7684\u306b\u307e\u3068\u3081\u307e\u3057\u305f\u3002EA\u304c\u52d5\u304b\u306a\u3044\u6642\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8\u3001\u53d6\u5f15\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u3068\u89e3\u6c7a\u6cd5\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u5bfe\u51e6\u6cd5\u3001\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u5168\u4e00\u89a7\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u5b9f\u88c5\u3001\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u307e\u3067\u3001\u3053\u306e\u30da\u30fc\u30b8\u3067\u3059\u3079\u3066\u89e3\u6c7a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"2400\" height=\"1260\" src=\"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/03\/mql_mql5-error-guide.jpg\" alt=\"MQL5 \u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7 \u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u30ab\u30fc\u30c9\" class=\"wp-image-67626\" srcset=\"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/03\/mql_mql5-error-guide.jpg 2400w, https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/03\/mql_mql5-error-guide-300x158.jpg 300w, https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/03\/mql_mql5-error-guide-1024x538.jpg 1024w, https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/03\/mql_mql5-error-guide-768x403.jpg 768w, https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/03\/mql_mql5-error-guide-1536x806.jpg 1536w, https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/03\/mql_mql5-error-guide-2048x1075.jpg 2048w\" sizes=\"(max-width: 2400px) 100vw, 2400px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ea-not-working\">EA\u304c\u52d5\u304b\u306a\u3044\u6642\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/h2>\n\n\n\n<p>EA\u3092\u30c1\u30e3\u30fc\u30c8\u306b\u8a2d\u7f6e\u3057\u305f\u306e\u306b\u4f55\u3082\u8d77\u304d\u306a\u3044\u3002\u30ed\u30b0\u306b\u30a8\u30e9\u30fc\u3082\u51fa\u306a\u3044\u3002\u3053\u306e\u72b6\u614b\u306e\u539f\u56e0\u306f\u307b\u3068\u3093\u3069\u306e\u5834\u5408\u3001\u30b3\u30fc\u30c9\u306e\u30d0\u30b0\u3067\u306f\u306a\u304fMT5\u5074\u306e\u8a2d\u5b9a\u306b\u3042\u308a\u307e\u3059\u3002\u4e0a\u304b\u3089\u9806\u306b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u81ea\u52d5\u58f2\u8cb7\u30dc\u30bf\u30f3\u304cOFF\u306b\u306a\u3063\u3066\u3044\u308b<\/h3>\n\n\n\n<p>MT5\u30c4\u30fc\u30eb\u30d0\u30fc\u306e\u300c\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u53d6\u5f15\u300d\u30dc\u30bf\u30f3\uff08Algo Trading\uff09\u3092\u78ba\u8a8d\u3002\u3053\u308c\u304cOFF\u3060\u3068\u5168EA\u304c\u505c\u6b62\u3057\u307e\u3059\u3002\u30c1\u30e3\u30fc\u30c8\u53f3\u4e0a\u306eEA\u540d\u306e\u6a2a\u306b\u30cb\u30b3\u3061\u3083\u3093\u30de\u30fc\u30af\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u308c\u3070ON\u3001\u7070\u8272\u30a2\u30a4\u30b3\u30f3\u306a\u3089OFF\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"\u81ea\u52d5\u58f2\u8cb7\u30c1\u30a7\u30c3\u30af\"><code>void OnTick()\n  {\n   if(!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))\n     {\n      Print(\"\u30a8\u30e9\u30fc: \u30bf\u30fc\u30df\u30ca\u30eb\u306e\u81ea\u52d5\u58f2\u8cb7\u304c\u7121\u52b9\u3067\u3059\");\n      return;\n     }\n   if(!MQLInfoInteger(MQL_TRADE_ALLOWED))\n     {\n      Print(\"\u30a8\u30e9\u30fc: \u3053\u306eEA\u306e\u81ea\u52d5\u58f2\u8cb7\u304c\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\");\n      return;\n     }\n  }<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2. EA\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u53d6\u5f15\u304c\u8a31\u53ef\u3055\u308c\u3066\u3044\u306a\u3044<\/h3>\n\n\n\n<p>\u30c1\u30e3\u30fc\u30c8\u4e0a\u306eEA\u540d\u3092\u53f3\u30af\u30ea\u30c3\u30af \u2192 \u30d7\u30ed\u30d1\u30c6\u30a3 \u2192 \u300c\u5171\u901a\u300d\u30bf\u30d6 \u2192 \u300c\u81ea\u52d5\u58f2\u8cb7\u3092\u8a31\u53ef\u3059\u308b\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3002WebRequest\u3084DLL\u3092\u4f7f\u3046EA\u306f\u3001\u305d\u308c\u305e\u308c\u306e\u8a31\u53ef\u30c1\u30a7\u30c3\u30af\u3082\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u53e3\u5ea7\u304c\u53d6\u5f15\u53ef\u80fd\u306a\u72b6\u614b\u3067\u306f\u306a\u3044<\/h3>\n\n\n\n<p>\u6295\u8cc7\u5bb6\u30d1\u30b9\u30ef\u30fc\u30c9\uff08\u8aad\u307f\u53d6\u308a\u5c02\u7528\uff09\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u308b\u3001\u30c7\u30e2\u53e3\u5ea7\u306e\u6709\u52b9\u671f\u9650\u304c\u5207\u308c\u3066\u3044\u308b\u3001\u53e3\u5ea7\u304c\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u308b\u3001\u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"\u53e3\u5ea7\u72b6\u614b\u30c1\u30a7\u30c3\u30af\"><code>int OnInit()\n  {\n   if(!AccountInfoInteger(ACCOUNT_TRADE_ALLOWED))\n     {\n      Print(\"\u3053\u306e\u53e3\u5ea7\u3067\u306f\u53d6\u5f15\u3067\u304d\u307e\u305b\u3093\");\n      Print(\"\u53e3\u5ea7\u30bf\u30a4\u30d7:\",\n            EnumToString((ENUM_ACCOUNT_TRADE_MODE)AccountInfoInteger(ACCOUNT_TRADE_MODE)));\n     }\n   return(INIT_SUCCEEDED);\n  }<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4. \u5e02\u5834\u304c\u9589\u307e\u3063\u3066\u3044\u308b<\/h3>\n\n\n\n<p>\u571f\u65e5\u3001\u795d\u65e5\u3001\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u6642\u9593\u5e2f\u306f\u30c6\u30a3\u30c3\u30af\u304c\u914d\u4fe1\u3055\u308c\u306a\u3044\u305f\u3081\u3001<code>OnTick()<\/code>\u306f\u4e00\u5ea6\u3082\u547c\u3070\u308c\u307e\u305b\u3093\u3002MT5\u4e0b\u90e8\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u30d0\u30fc\u306b\u63a5\u7d9a\u72b6\u614b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. \u901a\u8ca8\u30da\u30a2\u307e\u305f\u306f\u6642\u9593\u8db3\u304c\u60f3\u5b9a\u3068\u9055\u3046<\/h3>\n\n\n\n<p>EA\u304c\u7279\u5b9a\u306e\u901a\u8ca8\u30da\u30a2\u3084\u6642\u9593\u8db3\u3092\u524d\u63d0\u306b\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u9055\u3046\u30c1\u30e3\u30fc\u30c8\u306b\u30bb\u30c3\u30c8\u3057\u3066\u3082\u60f3\u5b9a\u901a\u308a\u306b\u52d5\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"\u901a\u8ca8\u30da\u30a2\u30fb\u6642\u9593\u8db3\u306e\u78ba\u8a8d\"><code>int OnInit()\n  {\n   Print(\"\u901a\u8ca8\u30da\u30a2:\", _Symbol,\"  \u6642\u9593\u8db3:\", EnumToString(_Period));\n   return(INIT_SUCCEEDED);\n  }<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6. \u30a8\u30f3\u30c8\u30ea\u30fc\u6761\u4ef6\u304c\u6210\u7acb\u3057\u3066\u3044\u306a\u3044<\/h3>\n\n\n\n<p>\u30b3\u30fc\u30c9\u306b\u554f\u984c\u306f\u306a\u304f\u3001\u5358\u306b\u58f2\u8cb7\u6761\u4ef6\u304c\u767a\u751f\u3057\u3066\u3044\u306a\u3044\u3060\u3051\u306e\u30b1\u30fc\u30b9\u3067\u3059\u3002<code>OnTick()<\/code>\u306e\u5148\u982d\u306bPrint\u3092\u5165\u308c\u3066\u3001\u30c6\u30a3\u30c3\u30af\u304c\u6765\u3066\u3044\u308b\u304b\u3001\u6761\u4ef6\u5224\u5b9a\u306e\u3069\u3053\u3067\u6b62\u307e\u3063\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"OnTick\u306e\u52d5\u4f5c\u78ba\u8a8d\"><code>void OnTick()\n  {\n   static int count = 0;\n   count++;\n   Print(\"Tick #\", count);  \/\/ \u3053\u308c\u304c\u51fa\u529b\u3055\u308c\u308c\u3070OnTick\u306f\u547c\u3070\u308c\u3066\u3044\u308b\n  }<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">7. \u30b9\u30d7\u30ec\u30c3\u30c9\u30d5\u30a3\u30eb\u30bf\u30fc\u3067\u5f3e\u304b\u308c\u3066\u3044\u308b<\/h3>\n\n\n\n<p>\u65e9\u671d\u3084\u6307\u6a19\u767a\u8868\u524d\u5f8c\u306f\u30b9\u30d7\u30ec\u30c3\u30c9\u304c\u5927\u304d\u304f\u5e83\u304c\u308a\u307e\u3059\u3002EA\u306b\u30b9\u30d7\u30ec\u30c3\u30c9\u5236\u9650\u3092\u5165\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u3053\u306e\u6642\u9593\u5e2f\u306f\u30a8\u30f3\u30c8\u30ea\u30fc\u304c\u30d6\u30ed\u30c3\u30af\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"\u30b9\u30d7\u30ec\u30c3\u30c9\u78ba\u8a8d\"><code>int spread = (int)SymbolInfoInteger(_Symbol, SYMBOL_SPREAD);\nPrint(\"\u73fe\u5728\u306e\u30b9\u30d7\u30ec\u30c3\u30c9:\", spread,\" point\");<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">8. \u6642\u9593\u30d5\u30a3\u30eb\u30bf\u30fc\u3067\u5f3e\u304b\u308c\u3066\u3044\u308b<\/h3>\n\n\n\n<p>\u53d6\u5f15\u6642\u9593\u5e2f\u3092\u5236\u9650\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30b5\u30fc\u30d0\u30fc\u6642\u9593\u3068\u30ed\u30fc\u30ab\u30eb\u6642\u9593\u306e\u305a\u308c\u306b\u6ce8\u610f\u3002\u30d6\u30ed\u30fc\u30ab\u30fc\u306b\u3088\u3063\u3066\u30b5\u30fc\u30d0\u30fc\u6642\u9593\u306e\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"\u30b5\u30fc\u30d0\u30fc\u6642\u9593\u306e\u78ba\u8a8d\"><code>Print(\"\u30b5\u30fc\u30d0\u30fc\u6642\u9593:\", TimeCurrent());\nPrint(\"GMT:\", TimeGMT());\nPrint(\"\u30ed\u30fc\u30ab\u30eb:\", TimeLocal());\nPrint(\"GMT\u30aa\u30d5\u30bb\u30c3\u30c8:\", (int)(TimeCurrent() - TimeGMT()) \/ 3600,\"\u6642\u9593\");<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">9. \u6700\u5927\u30dd\u30b8\u30b7\u30e7\u30f3\u6570\u306b\u9054\u3057\u3066\u3044\u308b<\/h3>\n\n\n\n<p>EA\u5074\u306e\u5236\u9650\u307e\u305f\u306f\u30d6\u30ed\u30fc\u30ab\u30fc\u5074\u306e\u5236\u9650\u3067\u3053\u308c\u4ee5\u4e0a\u30dd\u30b8\u30b7\u30e7\u30f3\u3092\u6301\u3066\u306a\u3044\u72b6\u614b\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"\u30dd\u30b8\u30b7\u30e7\u30f3\u6570\u30ab\u30a6\u30f3\u30c8\"><code>int myPositions = 0;\nfor(int i = 0; i &lt; PositionsTotal(); i++)\n  {\n   ulong ticket = PositionGetTicket(i);\n   if(PositionSelectByTicket(ticket))\n     {\n      if(PositionGetInteger(POSITION_MAGIC) == MagicNumber)\n         myPositions++;\n     }\n  }\nPrint(\"\u3053\u306eEA\u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u6570:\", myPositions);<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">10. \u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3044\u306a\u3044 \/ \u53e4\u3044.ex5\u304c\u52d5\u3044\u3066\u3044\u308b<\/h3>\n\n\n\n<p>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\uff08.mq5\uff09\u3092\u4fee\u6b63\u3057\u3066\u3082\u3001MetaEditor\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\uff08F7\uff09\u3057\u306a\u3044\u3068\u5909\u66f4\u306f\u53cd\u6620\u3055\u308c\u307e\u305b\u3093\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u5f8c\u3001MT5\u5074\u3067EA\u3092\u518d\u8aad\u307f\u8fbc\u307f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"common-trade-errors\">\u3088\u304f\u3042\u308b\u53d6\u5f15\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u3068\u89e3\u6c7a<\/h2>\n\n\n\n<p>OrderSend\u304c\u5931\u6557\u3057\u305f\u3068\u304d\u3001<code>MqlTradeResult.retcode<\/code>\u306b\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u304c\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002\u3053\u3053\u3067\u306fEA\u958b\u767a\u3067\u7279\u306b\u906d\u9047\u983b\u5ea6\u304c\u9ad8\u3044\u30a8\u30e9\u30fc\u3092\u3001\u539f\u56e0\u3068\u89e3\u6c7a\u30b3\u30fc\u30c9\u4ed8\u304d\u3067\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"error-10016\">10016: TRADE_RETCODE_INVALID_STOPS \u2014 SL\/TP\u304c\u4e0d\u6b63<\/h3>\n\n\n\n<p class=\"is-style-big_icon_caution\">EA\u958b\u767a\u3067\u6700\u3082\u906d\u9047\u983b\u5ea6\u304c\u9ad8\u3044\u30a8\u30e9\u30fc\u3067\u3059\u3002SL\/TP\u306e\u4f4d\u7f6e\u304c\u73fe\u5728\u4fa1\u683c\u306b\u8fd1\u3059\u304e\u308b\u3001\u307e\u305f\u306f\u8cb7\u3044\/\u58f2\u308a\u306e\u65b9\u5411\u306b\u5bfe\u3057\u3066SL\/TP\u306e\u4f4d\u7f6e\u304c\u8ad6\u7406\u7684\u306b\u77db\u76fe\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u4e3b\u306a\u539f\u56e0<\/strong>: \u30d6\u30ed\u30fc\u30ab\u30fc\u304c\u5b9a\u3081\u308b\u6700\u5c0f\u30b9\u30c8\u30c3\u30d7\u30ec\u30d9\u30eb\uff08SYMBOL_TRADE_STOPS_LEVEL\uff09\u3088\u308a\u73fe\u5728\u4fa1\u683c\u306b\u8fd1\u3044\u4f4d\u7f6e\u306bSL\/TP\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"INVALID_STOPS \u5bfe\u7b56\"><code>\/\/ 10016\u306b\u306a\u308b\u4f8b: SL\u304c\u73fe\u5728\u4fa1\u683c\u306b\u8fd1\u3059\u304e\u308b\nrequest.sl = SymbolInfoDouble(_Symbol, SYMBOL_ASK) - 1 * _Point;\n\n\/\/ \u6700\u5c0f\u30b9\u30c8\u30c3\u30d7\u30ec\u30d9\u30eb\u3092\u8003\u616e\u3057\u305f\u8a2d\u5b9a\ndouble ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);\nint stopsLevel = (int)SymbolInfoInteger(_Symbol, SYMBOL_TRADE_STOPS_LEVEL);\nif(stopsLevel == 0) stopsLevel = 15;  \/\/ 0\u306e\u5834\u5408\u306f\u5b89\u5168\u30de\u30fc\u30b8\u30f3\u3092\u53d6\u308b\n\ndouble minDistance = stopsLevel * _Point;\ndouble sl = NormalizeDouble(ask - MathMax(50 * _Point, minDistance), _Digits);\ndouble tp = NormalizeDouble(ask + MathMax(50 * _Point, minDistance), _Digits);<\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list is-style-check_list\">\n\n<li>SL\/TP\u3068\u73fe\u5728\u4fa1\u683c\u306e\u8ddd\u96e2\u304c <code>SYMBOL_TRADE_STOPS_LEVEL \u00d7 _Point<\/code> \u4ee5\u4e0a\u3042\u308b\u304b<\/li>\n\n\n<li>\u8cb7\u3044\u6ce8\u6587: SL &lt; Ask\u3001TP &gt; Ask \u306b\u306a\u3063\u3066\u3044\u308b\u304b<\/li>\n\n\n<li>\u58f2\u308a\u6ce8\u6587: SL &gt; Bid\u3001TP &lt; Bid \u306b\u306a\u3063\u3066\u3044\u308b\u304b<\/li>\n\n\n<li>SL\/TP\u306e\u5024\u304c <code>NormalizeDouble()<\/code> \u3067\u6b63\u898f\u5316\u3055\u308c\u3066\u3044\u308b\u304b<\/li>\n\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"error-10014\">10014: TRADE_RETCODE_INVALID_VOLUME \u2014 \u30ed\u30c3\u30c8\u6570\u304c\u4e0d\u6b63<\/h3>\n\n\n\n<p>\u30ed\u30c3\u30c8\u6570\u304c\u30d6\u30ed\u30fc\u30ab\u30fc\u306e\u8a31\u5bb9\u7bc4\u56f2\u5916\u3067\u3059\u3002\u6700\u5c0f\u30ed\u30c3\u30c8\u672a\u6e80\u3001\u6700\u5927\u30ed\u30c3\u30c8\u8d85\u904e\u3001\u307e\u305f\u306f\u30ed\u30c3\u30c8\u30b9\u30c6\u30c3\u30d7\u306b\u5408\u3063\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"\u30ed\u30c3\u30c8\u6b63\u898f\u5316\u95a2\u6570\"><code>double LotNormalize(string symbol, double lot)\n  {\n   double minLot  = SymbolInfoDouble(symbol, SYMBOL_VOLUME_MIN);\n   double maxLot  = SymbolInfoDouble(symbol, SYMBOL_VOLUME_MAX);\n   double lotStep = SymbolInfoDouble(symbol, SYMBOL_VOLUME_STEP);\n\n   lot = MathMax(minLot, lot);\n   lot = MathMin(maxLot, lot);\n   lot = MathFloor(lot \/ lotStep) * lotStep;\n   lot = NormalizeDouble(lot, 2);\n\n   return lot;\n  }<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"error-10019\">10019: TRADE_RETCODE_NO_MONEY \u2014 \u8cc7\u91d1\u4e0d\u8db3<\/h3>\n\n\n\n<p>\u6307\u5b9a\u3057\u305f\u30ed\u30c3\u30c8\u6570\u3092\u5efa\u3066\u308b\u305f\u3081\u306e\u8a3c\u62e0\u91d1\u304c\u53e3\u5ea7\u306b\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"\u8a3c\u62e0\u91d1\u30c1\u30a7\u30c3\u30af\"><code>double margin;\nif(!OrderCalcMargin(ORDER_TYPE_BUY, _Symbol, lot, ask, margin))\n  {\n   Print(\"\u8a3c\u62e0\u91d1\u8a08\u7b97\u30a8\u30e9\u30fc\");\n   return;\n  }\n\ndouble freeMargin = AccountInfoDouble(ACCOUNT_MARGIN_FREE);\nif(margin > freeMargin)\n  {\n   Print(\"\u8a3c\u62e0\u91d1\u4e0d\u8db3: \u5fc5\u8981=\", margin,\" \u5229\u7528\u53ef\u80fd=\", freeMargin);\n   return;\n  }<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"error-10013\">10013: TRADE_RETCODE_INVALID \u2014 \u30ea\u30af\u30a8\u30b9\u30c8\u304c\u4e0d\u6b63<\/h3>\n\n\n\n<p><code>MqlTradeRequest<\/code>\u69cb\u9020\u4f53\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u77db\u76fe\u3084\u4e0d\u5099\u304c\u3042\u308a\u307e\u3059\u3002\u6700\u3082\u591a\u3044\u539f\u56e0\u306f<code>action<\/code>\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6307\u5b9a\u6f0f\u308c\u3001\u307e\u305f\u306f<code>type_filling<\/code>\u306e\u672a\u6307\u5b9a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"MqlTradeRequest \u5fc5\u9808\u30d5\u30a3\u30fc\u30eb\u30c9\"><code>MqlTradeRequest request = {};\nrequest.action       = TRADE_ACTION_DEAL;          \/\/ \u5fc5\u9808: \u6210\u884c\u6ce8\u6587\nrequest.symbol       = _Symbol;                     \/\/ \u5fc5\u9808: \u901a\u8ca8\u30da\u30a2\nrequest.volume       = 0.1;                         \/\/ \u5fc5\u9808: \u30ed\u30c3\u30c8\u6570\nrequest.type         = ORDER_TYPE_BUY;              \/\/ \u5fc5\u9808: \u58f2\u8cb7\u65b9\u5411\nrequest.price        = SymbolInfoDouble(_Symbol, SYMBOL_ASK);  \/\/ \u5fc5\u9808: \u4fa1\u683c\nrequest.deviation    = 10;                          \/\/ \u63a8\u5968: \u8a31\u5bb9\u30b9\u30ea\u30c3\u30da\u30fc\u30b8\nrequest.type_filling = ORDER_FILLING_FOK;           \/\/ \u63a8\u5968: \u5145\u586b\u30bf\u30a4\u30d7\nrequest.magic        = MagicNumber;                 \/\/ \u63a8\u5968: EA\u8b58\u5225\u7528<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"error-10030\">10030: TRADE_RETCODE_INVALID_FILL \u2014 \u5145\u586b\u30bf\u30a4\u30d7\u304c\u4e0d\u6b63<\/h3>\n\n\n\n<p><code>type_filling<\/code>\u306b\u6307\u5b9a\u3057\u305f\u5145\u586b\u30bf\u30a4\u30d7\uff08FOK\/IOC\/RETURN\uff09\u3092\u3001\u305d\u306e\u30d6\u30ed\u30fc\u30ab\u30fc\u30fb\u9298\u67c4\u304c\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"\u5145\u586b\u30bf\u30a4\u30d7\u81ea\u52d5\u5224\u5b9a\"><code>ENUM_ORDER_TYPE_FILLING GetFillingType(string symbol)\n  {\n   int filling = (int)SymbolInfoInteger(symbol, SYMBOL_FILLING_MODE);\n\n   if((filling &amp; SYMBOL_FILLING_FOK) == SYMBOL_FILLING_FOK)\n      return ORDER_FILLING_FOK;\n   if((filling &amp; SYMBOL_FILLING_IOC) == SYMBOL_FILLING_IOC)\n      return ORDER_FILLING_IOC;\n\n   return ORDER_FILLING_RETURN;\n  }<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"error-10027\">10027: TRADE_RETCODE_CLIENT_DISABLES_AT \u2014 \u81ea\u52d5\u53d6\u5f15\u304c\u7121\u52b9<\/h3>\n\n\n\n<p>MT5\u306e\u300c\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u53d6\u5f15\u300d\u30dc\u30bf\u30f3\u304cOFF\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306e\u554f\u984c\u3067\u306f\u306a\u304fMT5\u306e\u8a2d\u5b9a\u306e\u554f\u984c\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"OnInit\u3067\u306e\u4e8b\u524d\u30c1\u30a7\u30c3\u30af\"><code>int OnInit()\n  {\n   if(!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))\n     {\n      Alert(\"\u81ea\u52d5\u58f2\u8cb7\u3092\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\");\n      return INIT_FAILED;\n     }\n   return INIT_SUCCEEDED;\n  }<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"compile-errors\">\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u4e00\u89a7\u3068\u5bfe\u51e6\u6cd5<\/h2>\n\n\n\n<p>MetaEditor\u3067F7\u3092\u62bc\u3057\u3066\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u305f\u969b\u306b\u8868\u793a\u3055\u308c\u308b\u30a8\u30e9\u30fc\u3067\u3059\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u304c\u3042\u308b\u3068EA\u306f\u52d5\u4f5c\u3057\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"is-style-big_icon_point\"><span class=\"swl-marker mark_orange\"><strong>\u30a8\u30e9\u30fc\u306f\u4e0a\u304b\u3089\u9806\u306b\u76f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/span>\u6700\u521d\u306e1\u3064\u3092\u76f4\u3059\u3060\u3051\u3067\u5f8c\u7d9a\u306e\u30a8\u30e9\u30fc\u304c\u6d88\u3048\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u69cb\u6587\u30a8\u30e9\u30fc<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\">\n<table class=\"has-fixed-layout\"><thead><tr><th>\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8<\/th><th>\u539f\u56e0<\/th><th>\u5bfe\u51e6<\/th><\/tr><\/thead><tbody><tr><td><code>';' expected<\/code><\/td><td>\u30bb\u30df\u30b3\u30ed\u30f3\u5fd8\u308c<\/td><td>\u30a8\u30e9\u30fc\u884c\u306e<strong>\u524d\u306e\u884c<\/strong>\u306e\u672b\u5c3e\u3092\u78ba\u8a8d<\/td><\/tr><tr><td><code>')' expected<\/code><\/td><td>\u9589\u3058\u62ec\u5f27\u306e\u4e0d\u8db3<\/td><td>if\u6587\u3084for\u6587\u306e\u6761\u4ef6\u5f0f\u306e\u62ec\u5f27\u3092\u78ba\u8a8d<\/td><\/tr><tr><td><code>'}' expected<\/code><\/td><td>\u9589\u3058\u6ce2\u62ec\u5f27\u306e\u4e0d\u8db3<\/td><td>Ctrl+, \u3067\u30a4\u30f3\u30c7\u30f3\u30c8\u6574\u5f62\u3057\u3066\u5bfe\u5fdc\u3092\u53ef\u8996\u5316<\/td><\/tr><tr><td><code>unexpected token<\/code><\/td><td>\u4e88\u671f\u3057\u306a\u3044\u6587\u5b57<\/td><td>\u524d\u306e\u884c\u306b\u30bb\u30df\u30b3\u30ed\u30f3\u5fd8\u308c\u304c\u306a\u3044\u304b\u78ba\u8a8d<\/td><\/tr><tr><td><code>expressions are not allowed on a global scope<\/code><\/td><td>\u95a2\u6570\u306e\u5916\u306b\u30b3\u30fc\u30c9\u304c\u3042\u308b<\/td><td>\u5b9f\u884c\u6587\u304cOnTick\u7b49\u306e\u95a2\u6570\u5185\u306b\u3042\u308b\u304b\u78ba\u8a8d<\/td><\/tr><\/tbody><\/table>\n<\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u5909\u6570\u30fb\u578b\u30a8\u30e9\u30fc<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\">\n<table class=\"has-fixed-layout\"><thead><tr><th>\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8<\/th><th>\u539f\u56e0<\/th><th>\u5bfe\u51e6<\/th><\/tr><\/thead><tbody><tr><td><code>'xxx' - undeclared identifier<\/code><\/td><td>\u5909\u6570\u304c\u672a\u5ba3\u8a00<\/td><td>\u30b9\u30da\u30eb\u30df\u30b9\uff08\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u542b\u3080\uff09\u304b\u5ba3\u8a00\u5fd8\u308c<\/td><\/tr><tr><td><code>'xxx' - variable already defined<\/code><\/td><td>\u540c\u540d\u5909\u6570\u304c2\u56de\u5ba3\u8a00<\/td><td>\u540c\u3058\u30b9\u30b3\u30fc\u30d7\u5185\u3067\u91cd\u8907\u3057\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d<\/td><\/tr><tr><td><code>implicit conversion<\/code><\/td><td>\u6570\u5024\u2192\u6587\u5b57\u5217\u306e\u6697\u9ed9\u5909\u63db<\/td><td><code>IntegerToString()<\/code>\u3084<code>DoubleToString()<\/code>\u3067\u660e\u793a\u5909\u63db<\/td><\/tr><tr><td><code>possible loss of data<\/code><\/td><td>\u7cbe\u5ea6\u304c\u5931\u308f\u308c\u308b\u578b\u5909\u63db<\/td><td><code>(int)<\/code>\u7b49\u3067\u660e\u793a\u30ad\u30e3\u30b9\u30c8\u3059\u308c\u3070\u6d88\u3048\u308b\uff08\u8b66\u544a\uff09<\/td><\/tr><tr><td><code>constant variable cannot be modified<\/code><\/td><td>const\u5909\u6570\u3078\u306e\u4ee3\u5165<\/td><td>const\u3092\u5916\u3059\u304b\u5225\u306e\u5909\u6570\u306b\u4ee3\u5165<\/td><\/tr><\/tbody><\/table>\n<\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u95a2\u6570\u30a8\u30e9\u30fc<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\">\n<table class=\"has-fixed-layout\"><thead><tr><th>\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8<\/th><th>\u539f\u56e0<\/th><th>\u5bfe\u51e6<\/th><\/tr><\/thead><tbody><tr><td><code>'xxx' - wrong parameters count<\/code><\/td><td>\u5f15\u6570\u306e\u6570\u304c\u9055\u3046<\/td><td>MQL4\u3068MQL5\u3067\u5f15\u6570\u304c\u5909\u308f\u3063\u305f\u95a2\u6570\u306b\u6ce8\u610f<\/td><\/tr><tr><td><code>'xxx' - function not defined<\/code><\/td><td>\u95a2\u6570\u304c\u5b58\u5728\u3057\u306a\u3044<\/td><td>\u30b9\u30da\u30eb\u30df\u30b9\u304b\u3001MQL4\u5c02\u7528\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d<\/td><\/tr><tr><td><code>not all control paths return a value<\/code><\/td><td>\u4e00\u90e8\u306e\u30d1\u30b9\u3067return\u304c\u306a\u3044<\/td><td>if\/else\u306e\u5168\u5206\u5c90\u3067return\u3092\u5165\u308c\u308b<\/td><\/tr><tr><td><code>cannot open file 'xxx.mqh'<\/code><\/td><td>\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u3089\u306a\u3044<\/td><td>&lt;&gt;\u306fInclude\u30d5\u30a9\u30eb\u30c0\u3001&#8221;&#8221;\u306f\u30ab\u30ec\u30f3\u30c8\u30d5\u30a9\u30eb\u30c0<\/td><\/tr><\/tbody><\/table>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"trade-retcodes\">\u53d6\u5f15\u30ea\u30bf\u30fc\u30f3\u30b3\u30fc\u30c9\u5168\u4e00\u89a7\uff08ENUM_TRADE_RETCODE\uff09<\/h2>\n\n\n\n<p>OrderSend \/ OrderSendAsync \u306e\u5b9f\u884c\u7d50\u679c\u3068\u3057\u3066 <code>MqlTradeResult.retcode<\/code> \u306b\u683c\u7d0d\u3055\u308c\u308b\u30b3\u30fc\u30c9\u306e\u5168\u4e00\u89a7\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\">\n<table class=\"has-fixed-layout\"><thead><tr><th>\u30b3\u30fc\u30c9<\/th><th>\u5b9a\u6570\u540d<\/th><th>\u610f\u5473<\/th><\/tr><\/thead><tbody><tr><td>10004<\/td><td>TRADE_RETCODE_REQUOTE<\/td><td>\u30ea\u30af\u30aa\u30fc\u30c8<\/td><\/tr><tr><td>10006<\/td><td>TRADE_RETCODE_REJECT<\/td><td>\u30ea\u30af\u30a8\u30b9\u30c8\u62d2\u5426<\/td><\/tr><tr><td>10007<\/td><td>TRADE_RETCODE_CANCEL<\/td><td>\u30c8\u30ec\u30fc\u30c0\u30fc\u306b\u3088\u308b\u30ad\u30e3\u30f3\u30bb\u30eb<\/td><\/tr><tr><td>10008<\/td><td>TRADE_RETCODE_PLACED<\/td><td>\u6ce8\u6587\u304c\u767a\u6ce8\u3055\u308c\u305f<\/td><\/tr><tr><td>10009<\/td><td>TRADE_RETCODE_DONE<\/td><td>\u30ea\u30af\u30a8\u30b9\u30c8\u5b8c\u4e86<\/td><\/tr><tr><td>10010<\/td><td>TRADE_RETCODE_DONE_PARTIAL<\/td><td>\u90e8\u5206\u7684\u306b\u5b8c\u4e86<\/td><\/tr><tr><td>10011<\/td><td>TRADE_RETCODE_ERROR<\/td><td>\u4e00\u822c\u7684\u306a\u51e6\u7406\u30a8\u30e9\u30fc<\/td><\/tr><tr><td>10012<\/td><td>TRADE_RETCODE_TIMEOUT<\/td><td>\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8<\/td><\/tr><tr><td>10013<\/td><td>TRADE_RETCODE_INVALID<\/td><td>\u7121\u52b9\u306a\u30ea\u30af\u30a8\u30b9\u30c8<\/td><\/tr><tr><td>10014<\/td><td>TRADE_RETCODE_INVALID_VOLUME<\/td><td>\u7121\u52b9\u306a\u30ed\u30c3\u30c8\u6570<\/td><\/tr><tr><td>10015<\/td><td>TRADE_RETCODE_INVALID_PRICE<\/td><td>\u7121\u52b9\u306a\u4fa1\u683c<\/td><\/tr><tr><td>10016<\/td><td>TRADE_RETCODE_INVALID_STOPS<\/td><td>\u7121\u52b9\u306aSL\/TP<\/td><\/tr><tr><td>10017<\/td><td>TRADE_RETCODE_TRADE_DISABLED<\/td><td>\u53d6\u5f15\u7121\u52b9<\/td><\/tr><tr><td>10018<\/td><td>TRADE_RETCODE_MARKET_CLOSED<\/td><td>\u5e02\u5834\u9589\u9396<\/td><\/tr><tr><td>10019<\/td><td>TRADE_RETCODE_NO_MONEY<\/td><td>\u8cc7\u91d1\u4e0d\u8db3<\/td><\/tr><tr><td>10020<\/td><td>TRADE_RETCODE_PRICE_CHANGED<\/td><td>\u4fa1\u683c\u5909\u52d5<\/td><\/tr><tr><td>10021<\/td><td>TRADE_RETCODE_PRICE_OFF<\/td><td>\u6c17\u914d\u5024\u306a\u3057<\/td><\/tr><tr><td>10022<\/td><td>TRADE_RETCODE_INVALID_EXPIRATION<\/td><td>\u7121\u52b9\u306a\u6709\u52b9\u671f\u9650<\/td><\/tr><tr><td>10023<\/td><td>TRADE_RETCODE_ORDER_CHANGED<\/td><td>\u6ce8\u6587\u72b6\u614b\u304c\u5909\u66f4\u3055\u308c\u305f<\/td><\/tr><tr><td>10024<\/td><td>TRADE_RETCODE_TOO_MANY_REQUESTS<\/td><td>\u30ea\u30af\u30a8\u30b9\u30c8\u904e\u591a<\/td><\/tr><tr><td>10025<\/td><td>TRADE_RETCODE_NO_CHANGES<\/td><td>\u5909\u66f4\u306a\u3057<\/td><\/tr><tr><td>10026<\/td><td>TRADE_RETCODE_SERVER_DISABLES_AT<\/td><td>\u30b5\u30fc\u30d0\u30fc\u5074\u3067\u81ea\u52d5\u53d6\u5f15\u7121\u52b9<\/td><\/tr><tr><td>10027<\/td><td>TRADE_RETCODE_CLIENT_DISABLES_AT<\/td><td>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u3067\u81ea\u52d5\u53d6\u5f15\u7121\u52b9<\/td><\/tr><tr><td>10028<\/td><td>TRADE_RETCODE_LOCKED<\/td><td>\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u30ed\u30c3\u30af\u4e2d<\/td><\/tr><tr><td>10029<\/td><td>TRADE_RETCODE_FROZEN<\/td><td>\u6ce8\u6587\/\u30dd\u30b8\u30b7\u30e7\u30f3\u304c\u51cd\u7d50<\/td><\/tr><tr><td>10030<\/td><td>TRADE_RETCODE_INVALID_FILL<\/td><td>\u7121\u52b9\u306a\u5145\u586b\u30bf\u30a4\u30d7<\/td><\/tr><tr><td>10031<\/td><td>TRADE_RETCODE_CONNECTION<\/td><td>\u63a5\u7d9a\u306a\u3057<\/td><\/tr><tr><td>10032<\/td><td>TRADE_RETCODE_ONLY_REAL<\/td><td>\u30ea\u30a2\u30eb\u53e3\u5ea7\u3067\u306e\u307f\u8a31\u53ef<\/td><\/tr><tr><td>10033<\/td><td>TRADE_RETCODE_LIMIT_ORDERS<\/td><td>\u5f85\u6a5f\u6ce8\u6587\u6570\u306e\u4e0a\u9650<\/td><\/tr><tr><td>10034<\/td><td>TRADE_RETCODE_LIMIT_VOLUME<\/td><td>\u30dc\u30ea\u30e5\u30fc\u30e0\u4e0a\u9650<\/td><\/tr><tr><td>10035<\/td><td>TRADE_RETCODE_INVALID_ORDER<\/td><td>\u7121\u52b9\u306a\u6ce8\u6587\u30bf\u30a4\u30d7<\/td><\/tr><tr><td>10036<\/td><td>TRADE_RETCODE_POSITION_CLOSED<\/td><td>\u30dd\u30b8\u30b7\u30e7\u30f3\u306f\u65e2\u306b\u30af\u30ed\u30fc\u30ba\u6e08\u307f<\/td><\/tr><tr><td>10038<\/td><td>TRADE_RETCODE_INVALID_CLOSE_VOLUME<\/td><td>\u7121\u52b9\u306a\u6c7a\u6e08\u30dc\u30ea\u30e5\u30fc\u30e0<\/td><\/tr><tr><td>10039<\/td><td>TRADE_RETCODE_CLOSE_ORDER_EXIST<\/td><td>\u65e2\u306b\u6c7a\u6e08\u6ce8\u6587\u304c\u5b58\u5728<\/td><\/tr><tr><td>10040<\/td><td>TRADE_RETCODE_LIMIT_POSITIONS<\/td><td>\u30dd\u30b8\u30b7\u30e7\u30f3\u6570\u306e\u4e0a\u9650<\/td><\/tr><tr><td>10041<\/td><td>TRADE_RETCODE_REJECT_CANCEL<\/td><td>\u30ad\u30e3\u30f3\u30bb\u30eb\u62d2\u5426<\/td><\/tr><tr><td>10042<\/td><td>TRADE_RETCODE_LONG_ONLY<\/td><td>\u8cb7\u3044\u306e\u307f\u8a31\u53ef<\/td><\/tr><tr><td>10043<\/td><td>TRADE_RETCODE_SHORT_ONLY<\/td><td>\u58f2\u308a\u306e\u307f\u8a31\u53ef<\/td><\/tr><tr><td>10044<\/td><td>TRADE_RETCODE_CLOSE_ONLY<\/td><td>\u6c7a\u6e08\u306e\u307f\u8a31\u53ef<\/td><\/tr><tr><td>10045<\/td><td>TRADE_RETCODE_FIFO_CLOSE<\/td><td>FIFO\u9806\u306e\u6c7a\u6e08\u306e\u307f\u8a31\u53ef<\/td><\/tr><\/tbody><\/table>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"runtime-errors\">\u30e9\u30f3\u30bf\u30a4\u30e0\u30a8\u30e9\u30fc\u4e00\u89a7<\/h2>\n\n\n\n<p><code>GetLastError()<\/code> \u3067\u53d6\u5f97\u3067\u304d\u308b\u30e9\u30f3\u30bf\u30a4\u30e0\u30a8\u30e9\u30fc\u3067\u3059\u3002\u53d6\u5f15\u30ea\u30bf\u30fc\u30f3\u30b3\u30fc\u30c9\u3068\u306f\u5225\u306e\u4f53\u7cfb\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\">\n<table class=\"has-fixed-layout\"><thead><tr><th>\u30b3\u30fc\u30c9<\/th><th>\u5b9a\u6570\u540d<\/th><th>\u610f\u5473<\/th><\/tr><\/thead><tbody><tr><td>0<\/td><td>ERR_SUCCESS<\/td><td>\u30a8\u30e9\u30fc\u306a\u3057<\/td><\/tr><tr><td>4001<\/td><td>ERR_INTERNAL_ERROR<\/td><td>\u4e88\u671f\u3057\u306a\u3044\u5185\u90e8\u30a8\u30e9\u30fc<\/td><\/tr><tr><td>4003<\/td><td>ERR_INVALID_PARAMETER<\/td><td>\u95a2\u6570\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u4e0d\u6b63<\/td><\/tr><tr><td>4004<\/td><td>ERR_NOT_ENOUGH_MEMORY<\/td><td>\u30e1\u30e2\u30ea\u4e0d\u8db3<\/td><\/tr><tr><td>4014<\/td><td>ERR_FUNCTION_NOT_ALLOWED<\/td><td>\u30b7\u30b9\u30c6\u30e0\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u4e0d\u53ef<\/td><\/tr><tr><td>4101<\/td><td>ERR_WRONG_FILENAME<\/td><td>\u7121\u52b9\u306a\u30d5\u30a1\u30a4\u30eb\u540d<\/td><\/tr><tr><td>4103<\/td><td>ERR_CANNOT_OPEN_FILE<\/td><td>\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3051\u306a\u3044<\/td><\/tr><tr><td>4301<\/td><td>ERR_UNKNOWN_SYMBOL<\/td><td>\u4e0d\u660e\u306a\u30b7\u30f3\u30dc\u30eb<\/td><\/tr><tr><td>4302<\/td><td>ERR_INDICATOR_CANNOT_INIT<\/td><td>\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u521d\u671f\u5316\u5931\u6557<\/td><\/tr><tr><td>4303<\/td><td>ERR_INDICATOR_CANNOT_CREATE<\/td><td>\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u4f5c\u6210\u5931\u6557<\/td><\/tr><tr><td>4401<\/td><td>ERR_ARRAY_RESIZE_ERROR<\/td><td>\u914d\u5217\u30ea\u30b5\u30a4\u30ba\u5931\u6557<\/td><\/tr><tr><td>5004<\/td><td>ERR_WEBREQUEST_INVALID_ADDRESS<\/td><td>WebRequest\u306eURL\u4e0d\u6b63<\/td><\/tr><tr><td>5200<\/td><td>ERR_WEBREQUEST_TIMEOUT<\/td><td>WebRequest\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8<\/td><\/tr><tr><td>5201<\/td><td>ERR_WEBREQUEST_REQUEST_FAILED<\/td><td>WebRequest\u30ea\u30af\u30a8\u30b9\u30c8\u5931\u6557<\/td><\/tr><\/tbody><\/table>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"error-handling\">\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306e\u5b9f\u88c5\u65b9\u6cd5<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"getlasterror\">GetLastError \/ ResetLastError<\/h3>\n\n\n\n<p><code>GetLastError()<\/code> \u306f\u76f4\u524d\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3067\u767a\u751f\u3057\u305f\u30e9\u30f3\u30bf\u30a4\u30e0\u30a8\u30e9\u30fc\u306e\u30b3\u30fc\u30c9\u3092\u8fd4\u3057\u307e\u3059\u3002\u53d6\u5f15\u30a8\u30e9\u30fc\uff08retcode\uff09\u3068\u306f\u5225\u306e\u4ed5\u7d44\u307f\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"GetLastError \u306e\u57fa\u672c\"><code>int handle = iMA(_Symbol, PERIOD_H1, 20, 0, MODE_SMA, PRICE_CLOSE);\nif(handle == INVALID_HANDLE)\n  {\n   int err = GetLastError();\n   Print(\"iMA\u4f5c\u6210\u5931\u6557: \u30a8\u30e9\u30fc\u30b3\u30fc\u30c9=\", err);\n   return;\n  }\n\n\/\/ ResetLastError: \u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u30920\u306b\u30ea\u30bb\u30c3\u30c8\n\/\/ \u8907\u6570\u306e\u95a2\u6570\u3092\u9023\u7d9a\u3057\u3066\u547c\u3076\u524d\u306b\u30ea\u30bb\u30c3\u30c8\u3057\u3066\u304a\u304f\u3068\n\/\/ \u3069\u306e\u95a2\u6570\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u304b\u7279\u5b9a\u3057\u3084\u3059\u3044\nResetLastError();\ndouble value[];\nint copied = CopyBuffer(handle, 0, 0, 1, value);\nif(copied &lt;= 0)\n  {\n   int err = GetLastError();\n   Print(\"CopyBuffer\u5931\u6557: \u30a8\u30e9\u30fc\u30b3\u30fc\u30c9=\", err);\n  }<\/code><\/pre><\/div>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-shadow\">\n<div class=\"cap_box_ttl\" data-has-icon=\"1\">\n<svg height=\"1em\" width=\"1em\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" viewBox=\"0 0 48 48\"><path d=\"M47 37.9 27.5 4.1c-.7-1.3-2-2-3.5-2s-2.7.7-3.5 2L1 37.9c-.7 1.3-.7 2.7 0 4 .7 1.3 2 2 3.5 2h39.1c1.4 0 2.7-.7 3.5-2 .6-1.3.6-2.7-.1-4zM21.5 17.5c0-1.4 1.1-2.5 2.5-2.5s2.5 1.1 2.5 2.5v10c0 1.4-1.1 2.5-2.5 2.5s-2.5-1.1-2.5-2.5v-10zM24 38c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3z\"><\/path><\/svg>\n<span><strong>\u6ce8\u610f<\/strong><\/span>\n<\/div>\n<div class=\"cap_box_content\">\n\n<p><code>GetLastError()<\/code> \u306f\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u3092\u8fd4\u3057\u307e\u3059\u304c\u3001MQL5\u3067\u306f\u81ea\u52d5\u30ea\u30bb\u30c3\u30c8\u3055\u308c\u307e\u305b\u3093\u3002\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u3092\u30ea\u30bb\u30c3\u30c8\u3059\u308b\u306b\u306f <code>ResetLastError()<\/code> \u3092\u660e\u793a\u7684\u306b\u547c\u3076\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u8907\u6570\u306e\u95a2\u6570\u3092\u9023\u7d9a\u3057\u3066\u547c\u3076\u5834\u5408\u306f\u3001\u5404\u547c\u3073\u51fa\u3057\u306e\u524d\u306b <code>ResetLastError()<\/code> \u3067\u30ea\u30bb\u30c3\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"retry-pattern\">\u30ea\u30c8\u30e9\u30a4\u30d1\u30bf\u30fc\u30f3\u306e\u5b9f\u88c5<\/h3>\n\n\n\n<p>\u30ea\u30af\u30aa\u30fc\u30c8\u3084\u4fa1\u683c\u5909\u52d5\u306a\u3069\u3001\u30ea\u30c8\u30e9\u30a4\u3067\u89e3\u6c7a\u3059\u308b\u30a8\u30e9\u30fc\u306b\u306f\u81ea\u52d5\u30ea\u30c8\u30e9\u30a4\u304c\u6709\u52b9\u3067\u3059\u3002\u305f\u3060\u3057\u30ea\u30c8\u30e9\u30a4\u3059\u3079\u304d\u3067\u306a\u3044\u30a8\u30e9\u30fc\u3092\u7121\u9650\u30ea\u30c8\u30e9\u30a4\u3059\u308b\u3068\u554f\u984c\u306b\u306a\u308b\u306e\u3067\u3001\u30a8\u30e9\u30fc\u7a2e\u5225\u306e\u5224\u5b9a\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"\u30ea\u30c8\u30e9\u30a4\u4ed8\u304dOrderSend\"><code>\/\/ \u30ea\u30c8\u30e9\u30a4\u5bfe\u8c61\u306e\u30a8\u30e9\u30fc\u304b\u3069\u3046\u304b\u5224\u5b9a\nbool IsRetryableError(uint retcode)\n  {\n   switch(retcode)\n     {\n      case TRADE_RETCODE_REQUOTE:\n      case TRADE_RETCODE_PRICE_CHANGED:\n      case TRADE_RETCODE_PRICE_OFF:\n      case TRADE_RETCODE_TIMEOUT:\n      case TRADE_RETCODE_CONNECTION:\n         return true;\n      default:\n         return false;\n     }\n  }\n\n\/\/ \u30ea\u30c8\u30e9\u30a4\u4ed8\u304d\u6ce8\u6587\u9001\u4fe1\nbool OrderSendWithRetry(MqlTradeRequest &amp;request, MqlTradeResult &amp;result, int maxRetry = 3)\n  {\n   for(int attempt = 1; attempt &lt;= maxRetry; attempt++)\n     {\n      \/\/ \u6210\u884c\u6ce8\u6587\u306e\u5834\u5408\u3001\u6bce\u56de\u6700\u65b0\u4fa1\u683c\u3092\u53d6\u5f97\n      if(request.action == TRADE_ACTION_DEAL)\n        {\n         if(request.type == ORDER_TYPE_BUY)\n            request.price = SymbolInfoDouble(request.symbol, SYMBOL_ASK);\n         else if(request.type == ORDER_TYPE_SELL)\n            request.price = SymbolInfoDouble(request.symbol, SYMBOL_BID);\n        }\n\n      if(!OrderSend(request, result))\n        {\n         Print(\"OrderSend\u5931\u6557 (attempt\", attempt,\"):\", GetLastError());\n         return false;\n        }\n\n      if(result.retcode == TRADE_RETCODE_DONE\n         || result.retcode == TRADE_RETCODE_PLACED)\n        {\n         Print(\"\u6ce8\u6587\u6210\u529f: ticket=\", result.order);\n         return true;\n        }\n\n      if(!IsRetryableError(result.retcode))\n        {\n         Print(\"\u30ea\u30c8\u30e9\u30a4\u4e0d\u53ef:\", result.retcode,\"\", result.comment);\n         return false;\n        }\n\n      Print(\"\u30ea\u30c8\u30e9\u30a4 (\", attempt,\"\/\", maxRetry,\"):\", result.retcode);\n      Sleep(300 * attempt);  \/\/ \u9593\u9694\u3092\u5f90\u3005\u306b\u5e83\u3052\u308b\n     }\n\n   Print(\"\u30ea\u30c8\u30e9\u30a4\u4e0a\u9650\u306b\u9054\u3057\u307e\u3057\u305f\");\n   return false;\n  }<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"debugging\">\u30c7\u30d0\u30c3\u30b0\u306e\u65b9\u6cd5<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"print-comment-alert\">Print \/ Comment \/ Alert<\/h3>\n\n\n\n<p>MQL5\u3067\u6700\u3082\u57fa\u672c\u7684\u306a3\u3064\u306e\u30c7\u30d0\u30c3\u30b0\u624b\u6bb5\u3067\u3059\u3002\u51fa\u529b\u5148\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\">\n<table class=\"has-fixed-layout\"><thead><tr><th>\u95a2\u6570<\/th><th>\u51fa\u529b\u5148<\/th><th>\u7528\u9014<\/th><\/tr><\/thead><tbody><tr><td><code>Print()<\/code><\/td><td>\u64cd\u4f5c\u5c65\u6b74\u30bf\u30d6 \/ \u30ed\u30b0\u30d5\u30a1\u30a4\u30eb<\/td><td>\u30e1\u30a4\u30f3\u306e\u30c7\u30d0\u30c3\u30b0\u624b\u6bb5\u3002\u30ed\u30b0\u306b\u6b8b\u308b<\/td><\/tr><tr><td><code>Comment()<\/code><\/td><td>\u30c1\u30e3\u30fc\u30c8\u5de6\u4e0a<\/td><td>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u5024\u3092\u30c1\u30e3\u30fc\u30c8\u4e0a\u306b\u8868\u793a<\/td><\/tr><tr><td><code>Alert()<\/code><\/td><td>\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u30c0\u30a4\u30a2\u30ed\u30b0<\/td><td>\u91cd\u8981\u306a\u30a4\u30d9\u30f3\u30c8\u306e\u901a\u77e5\u3002\u591a\u7528\u6ce8\u610f<\/td><\/tr><\/tbody><\/table>\n<\/figure>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"\u30c7\u30d0\u30c3\u30b0\u51fa\u529b\u306e\u4f7f\u3044\u5206\u3051\"><code>void OnTick()\n  {\n   double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);\n   double bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);\n   int spread = (int)SymbolInfoInteger(_Symbol, SYMBOL_SPREAD);\n\n   \/\/ \u30ed\u30b0\u306b\u8a18\u9332\n   Print(\"Ask=\", ask,\" Bid=\", bid,\" Spread=\", spread);\n\n   \/\/ \u30c1\u30e3\u30fc\u30c8\u4e0a\u306b\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u8868\u793a\n   Comment(\"Ask:\", ask,\"n\",\"Bid:\", bid,\"n\",\"Spread:\", spread,\" pt\");\n\n   \/\/ PrintFormat: \u66f8\u5f0f\u6307\u5b9a\u3067\u51fa\u529b\u3092\u6574\u3048\u308b\n   PrintFormat(\"\u6b8b\u9ad8: %.2f  \u8a3c\u62e0\u91d1: %.2f  \u640d\u76ca: %+.2f\",\n              AccountInfoDouble(ACCOUNT_BALANCE),\n              AccountInfoDouble(ACCOUNT_MARGIN),\n              AccountInfoDouble(ACCOUNT_PROFIT));\n  }<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"metaeditor-debugger\">MetaEditor\u306e\u30c7\u30d0\u30c3\u30ac<\/h3>\n\n\n\n<ol class=\"wp-block-list is-style-num_circle\">\n\n<li>MetaEditor\u3067\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u958b\u304f<\/li>\n\n\n<li>\u6b62\u3081\u305f\u3044\u884c\u306e\u5de6\u5074\u3092\u30af\u30ea\u30c3\u30af \u2192 \u8d64\u3044\u4e38\uff08\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\uff09\u304c\u8868\u793a\u3055\u308c\u308b<\/li>\n\n\n<li>F5\u3067\u30c7\u30d0\u30c3\u30b0\u958b\u59cb\uff08\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c6\u30b9\u30bf\u30fc\u304c\u8d77\u52d5\u3059\u308b\uff09<\/li>\n\n\n<li>\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3067\u505c\u6b62\u3057\u305f\u3089\u300c\u30a6\u30a9\u30c3\u30c1\u300d\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u5909\u6570\u306e\u5024\u3092\u78ba\u8a8d<\/li>\n\n\n<li>F10\u3067\u30b9\u30c6\u30c3\u30d7\u5b9f\u884c\uff081\u884c\u305a\u3064\u9032\u3080\uff09\u3001F11\u3067\u30b9\u30c6\u30c3\u30d7\u30a4\u30f3\uff08\u95a2\u6570\u306e\u4e2d\u306b\u5165\u308b\uff09<\/li>\n\n<\/ol>\n\n\n\n<p class=\"is-style-icon_info\">\u30c7\u30d0\u30c3\u30ac\u306f\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c6\u30b9\u30bf\u30fc\u4e0a\u3067\u52d5\u4f5c\u3057\u307e\u3059\u3002\u30e9\u30a4\u30d6\u30c1\u30e3\u30fc\u30c8\u3067\u306e\u30c7\u30d0\u30c3\u30b0\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u30e9\u30a4\u30d6\u3067\u306fPrint\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"reading-logs\">\u30ed\u30b0\u306e\u8aad\u307f\u65b9<\/h3>\n\n\n\n<p>MT5\u306e\u30ed\u30b0\u306f2\u7b87\u6240\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>\u64cd\u4f5c\u5c65\u6b74\u30bf\u30d6<\/strong>\uff08MT5\u753b\u9762\u4e0b\u90e8 \u2192 \u30c4\u30fc\u30eb\u30dc\u30c3\u30af\u30b9 \u2192 \u64cd\u4f5c\u5c65\u6b74\uff09: EA\u306ePrint\u51fa\u529b\u3068\u30b7\u30b9\u30c6\u30e0\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u53f3\u30af\u30ea\u30c3\u30af \u2192\u300c\u81ea\u52d5\u30b9\u30af\u30ed\u30fc\u30eb\u300d\u3092ON\u306b\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002<\/li>\n\n\n<li><strong>\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb<\/strong>: MT5\u306e\u300c\u30d5\u30a1\u30a4\u30eb\u300d\u2192\u300c\u30c7\u30fc\u30bf\u30d5\u30a9\u30eb\u30c0\u3092\u958b\u304f\u300d\u2192 Logs \u30d5\u30a9\u30eb\u30c0\u5185\u306b\u65e5\u4ed8\u3054\u3068\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002<\/li>\n\n<\/ul>\n\n\n\n<p class=\"is-style-big_icon_point\">OnInit()\u3067\u521d\u671f\u72b6\u614b\u3092\u307e\u3068\u3081\u3066\u51fa\u529b\u3057\u3066\u304a\u304f\u3068\u3001\u5f8c\u304b\u3089\u30ed\u30b0\u3092\u78ba\u8a8d\u3059\u308b\u969b\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\" data-file=\"EA\u521d\u671f\u5316\u30ed\u30b0\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\"><code>int OnInit()\n  {\n   Print(\"========== EA START ==========\");\n   Print(\"EA:\", MQLInfoString(MQL_PROGRAM_NAME));\n   Print(\"Symbol:\", _Symbol,\"  Period:\", EnumToString(_Period));\n   Print(\"Account:\", AccountInfoInteger(ACCOUNT_LOGIN),\"  Server:\", AccountInfoString(ACCOUNT_SERVER));\n   Print(\"Balance:\", AccountInfoDouble(ACCOUNT_BALANCE),\"  Leverage: 1:\", AccountInfoInteger(ACCOUNT_LEVERAGE));\n   Print(\"Trade allowed (terminal):\", TerminalInfoInteger(TERMINAL_TRADE_ALLOWED));\n   Print(\"Trade allowed (EA):\", MQLInfoInteger(MQL_TRADE_ALLOWED));\n   Print(\"==============================\");\n   return INIT_SUCCEEDED;\n  }<\/code><\/pre><\/div>\n\n\n\n<p>\u3042\u306a\u305f\u306eEA\u3092\u30b7\u30b9\u30c8\u30ec.COM\u3067\u8ca9\u58f2\u3057\u307e\u305b\u3093\u304b\uff1f \u2192 <a href=\"https:\/\/sys-tre.com\" target=\"_blank\" rel=\"noopener noreferrer\">\u51fa\u54c1\u306b\u3064\u3044\u3066<\/a><\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081\uff1aMQL5\u30a8\u30e9\u30fc\u5bfe\u51e6\u306e\u57fa\u672c\u3068\u52b9\u7387\u7684\u306a\u30c7\u30d0\u30c3\u30b0<\/h2>\n\n\n\n<p>MQL5\u306e\u30a8\u30e9\u30fc\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u30fb\u30e9\u30f3\u30bf\u30a4\u30e0\u30a8\u30e9\u30fc\u30fb\u53d6\u5f15\u30ea\u30bf\u30fc\u30f3\u30b3\u30fc\u30c9\u306e3\u7a2e\u985e\u306b\u5927\u5225\u3055\u308c\u307e\u3059\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306fMetaEditor\u306e\u30ed\u30b0\u3067\u7279\u5b9a\u3067\u304d\u3001\u30e9\u30f3\u30bf\u30a4\u30e0\u30a8\u30e9\u30fc\u306fPrint()\u3084Comment()\u3092\u4f7f\u3063\u305f\u30c7\u30d0\u30c3\u30b0\u3067\u539f\u56e0\u3092\u7d5e\u308a\u8fbc\u307f\u307e\u3059\u3002\u53d6\u5f15\u30ea\u30bf\u30fc\u30f3\u30b3\u30fc\u30c9\uff08ENUM_TRADE_RETCODE\uff09\u306f\u3001\u6ce8\u6587\u304c\u901a\u3089\u306a\u3044\u7406\u7531\u3092\u5224\u65ad\u3059\u308b\u969b\u306b\u5fc5\u9808\u306e\u77e5\u8b58\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30a8\u30e9\u30fc\u5bfe\u51e6\u306e\u52b9\u7387\u3092\u4e0a\u3052\u308b\u306b\u306f\u3001\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u306e\u610f\u5473\u3092\u899a\u3048\u308b\u3053\u3068\u3088\u308a\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3092EA\u306b\u7d44\u307f\u8fbc\u3093\u3067\u81ea\u52d5\u7684\u306b\u30ed\u30b0\u51fa\u529b\u30fb\u30ea\u30c8\u30e9\u30a4\u3059\u308b\u4ed5\u7d44\u307f\u3092\u4f5c\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u30b7\u30b9\u30c8\u30ec.COM\u3067\u306f\u3001\u5b89\u5b9a\u7a3c\u50cd\u5b9f\u7e3e\u306e\u3042\u308bEA\u306e\u30d5\u30a9\u30ef\u30fc\u30c9\u30c6\u30b9\u30c8\u7d50\u679c\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002MQL5\u958b\u767a\u306b\u6163\u308c\u3066\u304d\u305f\u3089\u3001\u305c\u3072\u81ea\u4f5cEA\u306e\u904b\u7528\u3082\u691c\u8a0e\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n<h2 class=\"wp-block-heading\">MQL5\u30a8\u30e9\u30fc\u30ac\u30a4\u30c9 \u3088\u304f\u3042\u308b\u8cea\u554f<\/h2>\n\n\n\n<div class=\"swell-block-faq\">\n<div class=\"swell-block-faq__item\"><h3 class=\"faq_q\">MQL5\u306e\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u3092\u8abf\u3079\u308b\u65b9\u6cd5\u306f\uff1f<\/h3><div class=\"faq_a\"><p>GetLastError()\u3067\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u3001ErrorDescription()\uff08ERR_*)\u3067\u4eba\u9593\u304c\u8aad\u3081\u308b\u8aac\u660e\u6587\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002MQL5\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306e\u300c\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u300d\u30da\u30fc\u30b8\u306bENUM_TRADE_RETCODE\u3068\u30e9\u30f3\u30bf\u30a4\u30e0\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u306e\u4e00\u89a7\u304c\u3042\u308a\u307e\u3059\u3002<\/p><\/div><\/div>\n\n\n\n<div class=\"swell-block-faq__item\"><h3 class=\"faq_q\">MQL5\u306eOrderSend\u304c\u5931\u6557\u3059\u308b\u4e3b\u306a\u539f\u56e0\u306f\uff1f<\/h3><div class=\"faq_a\"><p>TRADE_RETCODE_INVALIDSTOPS\u306fSL\/TP\u5024\u304c\u4e0d\u6b63\u3001TRADE_RETCODE_NO_MONEY\u306f\u8a3c\u62e0\u91d1\u4e0d\u8db3\u3001TRADE_RETCODE_MARKET_CLOSED\u306f\u5e02\u5834\u9589\u9396\u304c\u539f\u56e0\u3067\u3059\u3002result.retcode\u3068result.comment\u3067\u8a73\u7d30\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p><\/div><\/div>\n\n\n\n<div class=\"swell-block-faq__item\"><h3 class=\"faq_q\">MQL5\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306e\u5bfe\u51e6\u6cd5\u306f\uff1f<\/h3><div class=\"faq_a\"><p>\u300cundeclared identifier\u300d\u306f\u5909\u6570\/\u95a2\u6570\u306e\u5ba3\u8a00\u6f0f\u308c\u3001\u300ccannot convert\u300d\u306f\u578b\u4e0d\u4e00\u81f4\u3001\u300cunexpected token\u300d\u306f\u62ec\u5f27\u3084\u6ce2\u62ec\u5f27\u306e\u30df\u30b9\u304c\u539f\u56e0\u3067\u3059\u3002MetaEditor\u306e\u30a8\u30e9\u30fc\u884c\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u8a72\u5f53\u7b87\u6240\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p><\/div><\/div>\n\n\n\n<div class=\"swell-block-faq__item\"><h3 class=\"faq_q\">TRADE_RETCODE_DONE\u3068\u306f\u3069\u3046\u3044\u3046\u610f\u5473\uff1f<\/h3><div class=\"faq_a\"><p>\u53d6\u5f15\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u6b63\u5e38\u306b\u51e6\u7406\u3055\u308c\u305f\u3053\u3068\u3092\u793a\u3059\u30ea\u30bf\u30fc\u30f3\u30b3\u30fc\u30c9\uff08\u5024:10009\uff09\u3067\u3059\u3002OrderSend()\u5f8c\u306bresult.retcode == TRADE_RETCODE_DONE\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u3067\u6ce8\u6587\u306e\u6210\u5426\u3092\u5224\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p><\/div><\/div>\n\n\n\n<div class=\"swell-block-faq__item\"><h3 class=\"faq_q\">MQL5\u3067\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u306f\uff1f<\/h3><div class=\"faq_a\"><p>OrderSend()\u306e\u623b\u308a\u5024\u3068result.retcode\u3092\u78ba\u8a8d\u3057\u3001\u5931\u6557\u6642\u306fPrint()\u3067\u30ed\u30b0\u51fa\u529b\u3057\u307e\u3059\u3002TRADE_RETCODE_REQUOTE\u3084TRADE_RETCODE_CONNECTION\u306a\u3069\u518d\u8a66\u884c\u53ef\u80fd\u306a\u30a8\u30e9\u30fc\u306fSleep()\u5f8c\u306b\u30ea\u30c8\u30e9\u30a4\u3057\u307e\u3059\u3002<\/p><\/div><\/div>\n\n\n\n<div class=\"swell-block-faq__item\"><h3 class=\"faq_q\">MQL5\u306e\u30c7\u30d0\u30c3\u30b0\u65b9\u6cd5\u306f\uff1f<\/h3><div class=\"faq_a\"><p>MetaEditor\u306e\u30c7\u30d0\u30c3\u30ac\u3067\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3092\u8a2d\u5b9a\u3057\u3066\u30b9\u30c6\u30c3\u30d7\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002Print()\/PrintFormat()\u3067\u30ed\u30b0\u3092Experts\u30bf\u30d6\u306b\u51fa\u529b\u3001Comment()\u3067\u30c1\u30e3\u30fc\u30c8\u306b\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u8868\u793a\u3059\u308b\u65b9\u6cd5\u3082\u6709\u52b9\u3067\u3059\u3002<\/p><\/div><\/div>\n<\/div>\n\n\n<div class=\"p-blogParts post_content\" data-partsID=\"59754\">\n\n  <style>\n   \n    .systrade-horizontal-banner {\n      width: 100%;\n      max-width: 800px;\n      margin: 20px auto;\n      background: linear-gradient(135deg, #F5F5F7, #E8E9EB);\n      border-radius: 12px;\n      overflow: hidden;\n      position: relative;\n      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n      font-family: 'Noto Sans JP', sans-serif;\n      box-shadow: \n        0 10px 20px rgba(0, 0, 0, 0.1),\n        0 0 0 1px rgba(0, 0, 0, 0.03) inset;\n      display: flex;\n      flex-direction: row;\n      align-items: center;\n      height: auto;\n      min-height: 120px;\n      box-sizing: border-box;\n    }\n\n    .systrade-horizontal-banner::before {\n      content: '';\n      position: absolute;\n      top: 0;\n      left: 0;\n      right: 0;\n      bottom: 0;\n      background: \n        radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.8) 0%, transparent 50%),\n        radial-gradient(circle at 100% 100%, rgba(255, 107, 0, 0.05) 0%, transparent 50%);\n      z-index: 1;\n    }\n\n    .systrade-horizontal-banner::after {\n      content: '';\n      position: absolute;\n      top: 0;\n      left: 0;\n      right: 0;\n      height: 2px;\n      background: linear-gradient(90deg, \n        transparent,\n        #FF6B00,\n        transparent\n      );\n      animation: borderGlow 3s ease-in-out infinite;\n      z-index: 2;\n    }\n\n    @keyframes borderGlow {\n      0%, 100% { opacity: 0.5; }\n      50% { opacity: 1; }\n    }\n\n    .systrade-horizontal-banner:hover {\n      transform: translateY(-2px);\n      box-shadow: \n        0 12px 25px rgba(0, 0, 0, 0.15),\n        0 0 0 1px rgba(0, 0, 0, 0.05) inset;\n    }\n\n    .systrade-horizontal-anchor {\n      display: flex;\n      width: 100%;\n      text-decoration: none;\n      color: inherit;\n      position: relative;\n      z-index: 2;\n      flex-wrap: wrap;\n    }\n\n    .systrade-horizontal-header {\n      width: 30%;\n      min-width: 150px;\n      position: relative;\n      display: flex;\n      flex-direction: column;\n      align-items: center;\n      justify-content: center;\n      padding: 12px;\n      background: rgba(255, 255, 255, 0.5);\n      border-radius: 10px;\n      border: 1px solid rgba(255, 255, 255, 0.8);\n      overflow: hidden;\n      backdrop-filter: blur(10px);\n      -webkit-backdrop-filter: blur(10px);\n      margin: 10px;\n      height: calc(100% - 20px);\n    }\n\n    .systrade-horizontal-header::before {\n      content: '';\n      position: absolute;\n      top: -50%;\n      left: -50%;\n      width: 200%;\n      height: 200%;\n      background: linear-gradient(\n        45deg,\n        transparent,\n        rgba(255, 255, 255, 0.4),\n        transparent\n      );\n      transform: rotate(45deg);\n      animation: headerGlow 4s ease-in-out infinite;\n    }\n\n    @keyframes headerGlow {\n      0% { transform: rotate(45deg) translateX(-100%); }\n      50% { transform: rotate(45deg) translateX(100%); }\n      100% { transform: rotate(45deg) translateX(100%); }\n    }\n\n    .systrade-horizontal-inner {\n      width: 100%;\n      position: relative;\n      z-index: 2;\n      text-align: center;\n    }\n\n    .systrade-horizontal-image {\n      height: 30px;\n      width: auto;\n      margin: 8px auto;\n      display: block;\n      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));\n    }\n\n    .systrade-horizontal-title {\n      color: #333;\n      font-size: 0.9em;\n      font-weight: 900;\n      white-space: nowrap;\n      background: linear-gradient(90deg, #333, #FF6B00, #333);\n      background-size: 200% auto;\n      -webkit-background-clip: text;\n      -webkit-text-fill-color: transparent;\n      animation: titleFlow 3s linear infinite;\n      padding: 4px 0;\n    }\n\n    @keyframes titleFlow {\n      0% { background-position: 0% center; }\n      100% { background-position: 200% center; }\n    }\n\n    .systrade-horizontal-content {\n      display: flex;\n      flex: 1;\n      flex-direction: column;\n      justify-content: space-between;\n      padding: 12px;\n    }\n\n    .systrade-horizontal-list {\n      display: grid;\n      grid-template-columns: repeat(2, 1fr);\n      gap: 8px;\n      margin-bottom: 10px;\n    }\n\n    .systrade-horizontal-item {\n      background: rgba(255, 255, 255, 0.7);\n      padding: 8px 6px;\n      border-radius: 8px;\n      border: 1px solid rgba(255, 255, 255, 0.9);\n      text-align: center;\n      transition: all 0.3s ease;\n      position: relative;\n      overflow: hidden;\n    }\n\n    .systrade-horizontal-item:hover {\n      transform: translateY(-2px);\n      background: rgba(255, 107, 0, 0.05);\n      border-color: rgba(255, 107, 0, 0.2);\n      box-shadow: 0 4px 12px rgba(255, 107, 0, 0.1);\n    }\n\n    .systrade-horizontal-item::after {\n      content: '';\n      position: absolute;\n      top: -50%;\n      left: -50%;\n      width: 200%;\n      height: 200%;\n      background: linear-gradient(\n        45deg,\n        transparent,\n        rgba(255, 107, 0, 0.1),\n        transparent\n      );\n      transform: rotate(45deg);\n      animation: itemGlow 3s ease-in-out infinite;\n      opacity: 0;\n    }\n\n    .systrade-horizontal-item:hover::after {\n      opacity: 1;\n    }\n\n    @keyframes itemGlow {\n      0% { transform: rotate(45deg) translateX(-100%); }\n      100% { transform: rotate(45deg) translateX(100%); }\n    }\n\n    .systrade-horizontal-desc {\n      color: #333;\n      font-size: 0.7em;\n      font-weight: 700;\n      line-height: 1.3;\n      position: relative;\n      z-index: 1;\n    }\n\n    .systrade-horizontal-button {\n      background: linear-gradient(90deg, #FF6B00, #FF8534);\n      color: white;\n      padding: 10px;\n      border-radius: 8px;\n      font-weight: 900;\n      font-size: 0.85em;\n      text-align: center;\n      position: relative;\n      overflow: hidden;\n      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n      transition: all 0.3s ease;\n      margin-top: auto;\n    }\n\n    .systrade-horizontal-button::before {\n      content: '';\n      position: absolute;\n      top: 0;\n      left: 0;\n      right: 0;\n      bottom: 0;\n      background: linear-gradient(90deg, \n        transparent,\n        rgba(255, 255, 255, 0.2),\n        transparent\n      );\n      transform: translateX(-100%);\n      animation: buttonGlow 3s ease-in-out infinite;\n    }\n\n    @keyframes buttonGlow {\n      0% { transform: translateX(-100%); }\n      50% { transform: translateX(100%); }\n      100% { transform: translateX(100%); }\n    }\n\n    .systrade-horizontal-button:hover {\n      transform: translateY(-2px);\n      box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);\n    }\n\n    \/* Responsive breakpoints *\/\n    @media (max-width: 768px) {\n      .systrade-horizontal-banner {\n        min-height: auto;\n      }\n      \n      .systrade-horizontal-header {\n        min-width: 120px;\n        padding: 8px;\n      }\n      \n      .systrade-horizontal-image {\n        height: 25px;\n      }\n      \n      .systrade-horizontal-title {\n        font-size: 0.8em;\n      }\n      \n      .systrade-horizontal-desc {\n        font-size: 0.65em;\n      }\n      \n      .systrade-horizontal-button {\n        font-size: 0.8em;\n        padding: 8px;\n      }\n    }\n    \n    @media (max-width: 600px) {\n      .systrade-horizontal-banner {\n        flex-direction: column;\n        min-height: auto;\n      }\n      \n      .systrade-horizontal-header {\n        width: calc(100% - 20px);\n        min-width: auto;\n        margin: 10px;\n      }\n      \n      .systrade-horizontal-content {\n        width: 100%;\n      }\n      \n      .systrade-horizontal-image {\n        height: 30px;\n        margin: 5px auto;\n      }\n      \n      .systrade-horizontal-title {\n        font-size: 0.85em;\n      }\n      \n      .systrade-horizontal-list {\n        grid-template-columns: repeat(2, 1fr);\n        gap: 6px;\n        margin-bottom: 8px;\n      }\n      \n      .systrade-horizontal-item {\n        padding: 6px 4px;\n      }\n      \n      .systrade-horizontal-desc {\n        font-size: 0.65em;\n      }\n      \n      .systrade-horizontal-button {\n        margin-top: 5px;\n      }\n    }\n\n    @media (max-width: 400px) {\n      .systrade-horizontal-list {\n        grid-template-columns: 1fr;\n      }\n      \n      .systrade-horizontal-item {\n        padding: 8px 6px;\n      }\n      \n      .systrade-horizontal-desc {\n        font-size: 0.7em;\n      }\n    }\n    \n    \/* Print media query *\/\n    @media print {\n      .systrade-horizontal-banner {\n        box-shadow: none;\n        border: 1px solid #ccc;\n      }\n      \n      .systrade-horizontal-banner::before,\n      .systrade-horizontal-banner::after,\n      .systrade-horizontal-header::before,\n      .systrade-horizontal-item::after,\n      .systrade-horizontal-button::before {\n        display: none;\n      }\n      \n      .systrade-horizontal-button {\n        background: #FF6B00;\n        text-shadow: none;\n      }\n    }\n  <\/style>\n\n  <div class=\"systrade-horizontal-banner\">\n    <a href=\"https:\/\/sys-tre.com\/\" class=\"systrade-horizontal-anchor\">\n      <div class=\"systrade-horizontal-header\">\n        <div class=\"systrade-horizontal-inner\">\n          <div class=\"systrade-horizontal-title\">FX\u81ea\u52d5\u58f2\u8cb7\uff08EA\uff09\u306a\u3089\uff01<\/div>\n          <img decoding=\"async\" src=\"https:\/\/sys-tre.com\/broker\/wp-content\/uploads\/2025\/01\/\u30b7\u30b9\u30c8\u30ec.COM_B-2.png\" alt=\"\u30b7\u30b9\u30c8\u30ec.COM \u516c\u5f0fCTA\u30ed\u30b4\" class=\"systrade-horizontal-image\">\n        <\/div>\n      <\/div>\n\n      <div class=\"systrade-horizontal-content\">\n        <div class=\"systrade-horizontal-list\">\n          <div class=\"systrade-horizontal-item\">\n            <div class=\"systrade-horizontal-desc\">\u5b9f\u7e3e\u306e\u3042\u308bEA\u304c\u7121\u6599\u3067\u4f7f\u3048\u308b\uff01<\/div>\n          <\/div>\n          <div class=\"systrade-horizontal-item\">\n            <div class=\"systrade-horizontal-desc\">\u6709\u6599\u7248\u3067\u53e3\u5ea7\u5236\u9650\u306a\u3057\uff01<\/div>\n          <\/div>\n          <div class=\"systrade-horizontal-item\">\n            <div class=\"systrade-horizontal-desc\">\u5168\u5546\u54c1\u30d5\u30a9\u30ef\u30fc\u30c9\u30c6\u30b9\u30c8\u516c\u958b\u4e2d\uff01<\/div>\n          <\/div>\n          <div class=\"systrade-horizontal-item\">\n            <div class=\"systrade-horizontal-desc\">\u521d\u5fc3\u8005\u3067\u3082\u5b89\u5fc3\u3057\u3066\u3054\u5229\u7528\u53ef\u80fd\uff01<\/div>\n          <\/div>\n        <\/div>\n\n        <div class=\"systrade-horizontal-button\">\n          \u4eca\u3059\u3050\u7121\u6599\u3067\u30b7\u30b9\u30c6\u30e0\u30c8\u30ec\u30fc\u30c9\u3092\u59cb\u3081\u308b\uff01\n        <\/div>\n      <\/div>\n    <\/a>\n  <\/div>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">MQL5\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9 \u95a2\u9023\u8a18\u4e8b<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/sys-tre.com\/forexguide\/mql5-trade-functions\/\">MQL5 \u53d6\u5f15\u95a2\u6570<\/a> \u2014 CTrade\u30fbOrderSend<\/li>\n<li><a href=\"https:\/\/sys-tre.com\/forexguide\/mql5-indicator-functions\/\">MQL5 \u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u95a2\u6570<\/a> \u2014 iMA\u30fbCopyBuffer<\/li>\n<li>MQL5 \u53e3\u5ea7\u30fb\u30de\u30fc\u30b1\u30c3\u30c8\u60c5\u5831 \u2014 \u8a3c\u62e0\u91d1\u8a08\u7b97<\/li>\n<li><a href=\"https:\/\/sys-tre.com\/forexguide\/mql5-event-handlers\/\">MQL5 \u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9<\/a> \u2014 OnTrade\u30fbOnTimer<\/li>\n<li><a href=\"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/\">MQL5 \u30a8\u30e9\u30fc\u30ac\u30a4\u30c9<\/a> \u2014 \u30c7\u30d0\u30c3\u30b0\u624b\u6cd5<\/li>\n<li>MQL5 \u6642\u9593\u30fb\u65e5\u4ed8\u95a2\u6570 \u2014 MqlDateTime<\/li>\n<li><a href=\"https:\/\/sys-tre.com\/forexguide\/ea-howto\/\">EA\u59cb\u3081\u65b9\u30ac\u30a4\u30c9<\/a> \u2014 MT5\u3078\u306eEA\u8a2d\u5b9a\u624b\u9806<\/li>\n<\/ul>\n\n\n\n<script type=\"application\/ld+json\">\n{\"@context\":\"https:\/\/schema.org\",\"@type\":\"FAQPage\",\"mainEntity\": [\n    {\"@type\":\"Question\",\"name\":\"MQL5\u306e\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u3092\u8abf\u3079\u308b\u65b9\u6cd5\u306f\uff1f\",\"acceptedAnswer\": {\"@type\":\"Answer\",\"text\":\"GetLastError()\u3067\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u3001ErrorDescription()\u3067\u8aac\u660e\u6587\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002MQL5\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306eENUM_TRADE_RETCODE\u3068\u30e9\u30f3\u30bf\u30a4\u30e0\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u3082\u53c2\u7167\u3067\u304d\u307e\u3059\u3002\"}},\n    {\"@type\":\"Question\",\"name\":\"MQL5\u306eOrderSend\u304c\u5931\u6557\u3059\u308b\u4e3b\u306a\u539f\u56e0\u306f\uff1f\",\"acceptedAnswer\": {\"@type\":\"Answer\",\"text\":\"TRADE_RETCODE_INVALIDSTOPS\u306fSL\/TP\u5024\u4e0d\u6b63\u3001TRADE_RETCODE_NO_MONEY\u306f\u8a3c\u62e0\u91d1\u4e0d\u8db3\u3001TRADE_RETCODE_MARKET_CLOSED\u306f\u5e02\u5834\u9589\u9396\u304c\u539f\u56e0\u3067\u3059\u3002\"}},\n    {\"@type\":\"Question\",\"name\":\"MQL5\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306e\u5bfe\u51e6\u6cd5\u306f\uff1f\",\"acceptedAnswer\": {\"@type\":\"Answer\",\"text\":\"undeclared identifier\u306f\u5909\u6570\u5ba3\u8a00\u6f0f\u308c\u3001cannot convert\u306f\u578b\u4e0d\u4e00\u81f4\u3001unexpected token\u306f\u62ec\u5f27\u30df\u30b9\u304c\u539f\u56e0\u3067\u3059\u3002MetaEditor\u306e\u30a8\u30e9\u30fc\u884c\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u78ba\u8a8d\u3057\u307e\u3059\u3002\"}},\n    {\"@type\":\"Question\",\"name\":\"TRADE_RETCODE_DONE\u3068\u306f\u3069\u3046\u3044\u3046\u610f\u5473\uff1f\",\"acceptedAnswer\": {\"@type\":\"Answer\",\"text\":\"\u53d6\u5f15\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u6b63\u5e38\u306b\u51e6\u7406\u3055\u308c\u305f\u3053\u3068\u3092\u793a\u3059\u30ea\u30bf\u30fc\u30f3\u30b3\u30fc\u30c9\uff08\u5024:10009\uff09\u3067\u3059\u3002OrderSend()\u5f8c\u306bresult.retcode == TRADE_RETCODE_DONE\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u3067\u6ce8\u6587\u306e\u6210\u5426\u3092\u5224\u5b9a\u3067\u304d\u307e\u3059\u3002\"}},\n    {\"@type\":\"Question\",\"name\":\"MQL5\u3067\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u306f\uff1f\",\"acceptedAnswer\": {\"@type\":\"Answer\",\"text\":\"OrderSend()\u306e\u623b\u308a\u5024\u3068result.retcode\u3092\u78ba\u8a8d\u3057\u3001\u5931\u6557\u6642\u306fPrint()\u3067\u30ed\u30b0\u51fa\u529b\u3057\u307e\u3059\u3002\u518d\u8a66\u884c\u53ef\u80fd\u306a\u30a8\u30e9\u30fc\u306fSleep()\u5f8c\u306b\u30ea\u30c8\u30e9\u30a4\u3057\u307e\u3059\u3002\"}},\n    {\"@type\":\"Question\",\"name\":\"MQL5\u306e\u30c7\u30d0\u30c3\u30b0\u65b9\u6cd5\u306f\uff1f\",\"acceptedAnswer\": {\"@type\":\"Answer\",\"text\":\"MetaEditor\u306e\u30c7\u30d0\u30c3\u30ac\u3067\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3092\u8a2d\u5b9a\u3057\u3066\u30b9\u30c6\u30c3\u30d7\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002Print()\/PrintFormat()\u3067Experts\u30bf\u30d6\u306b\u30ed\u30b0\u51fa\u529b\u3001Comment()\u3067\u30c1\u30e3\u30fc\u30c8\u306b\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u8868\u793a\u3059\u308b\u65b9\u6cd5\u3082\u6709\u52b9\u3067\u3059\u3002\"}}\n]}\n<\/script>\n\n\n\n\n<address class=\"author author-box\">\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8\uff5c200\u7a2e\u985e\u4ee5\u4e0a\u306eEA\u3092\u30d5\u30a9\u30ef\u30fc\u30c9\u8a08\u6e2c\u3059\u308b\u904b\u55b63\u5e74\u306e\u691c\u8a3c\u30e1\u30c7\u30a3\u30a2\u3002MetaTrader (MT4\/MT5) \u3092\u5b9f\u904b\u7528\u3057\u3066\u304d\u305f\u7de8\u96c6\u90e8\u304c\u76e3\u4fee\u30fb\u57f7\u7b46\u3057\u3066\u3044\u307e\u3059\u3002<\/address>\n","protected":false},"excerpt":{"rendered":"<p>MQL5\u306eEA\u958b\u767a\u3067\u906d\u9047\u3059\u308b\u30a8\u30e9\u30fc\u3092\u7db2\u7f85\u7684\u306b\u307e\u3068\u3081\u307e\u3057\u305f\u3002EA\u304c\u52d5\u304b\u306a\u3044\u6642\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8\u3001\u53d6\u5f15\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u3068\u89e3\u6c7a\u6cd5\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u5bfe\u51e6\u6cd5\u3001\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u5168\u4e00\u89a7\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u5b9f\u88c5\u3001\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u307e\u3067\u3001\u3053\u306e\u30da\u30fc\u30b8\u3067\u3059\u3079 [&hellip;]<\/p>\n","protected":false},"author":686,"featured_media":71194,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"MQL5 \u30a8\u30e9\u30fc","_yoast_wpseo_title":"MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u30c7\u30d0\u30c3\u30b0","_yoast_wpseo_metadesc":"MQL5\u306e\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fbGetLastError()\u306e\u4f7f\u3044\u65b9\u30fb\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u3092\u89e3\u8aac\u3002\u53d6\u5f15\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u3068\u89e3\u6c7a\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002","swell_btn_cv_data":"","footnotes":""},"categories":[301],"tags":[303],"class_list":["post-65632","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mql-reference","tag-mql5"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u30c7\u30d0\u30c3\u30b0<\/title>\n<meta name=\"description\" content=\"MQL5\u306e\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fbGetLastError()\u306e\u4f7f\u3044\u65b9\u30fb\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u3092\u89e3\u8aac\u3002\u53d6\u5f15\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u3068\u89e3\u6c7a\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u30c7\u30d0\u30c3\u30b0\" \/>\n<meta property=\"og:description\" content=\"MQL5\u306e\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fbGetLastError()\u306e\u4f7f\u3044\u65b9\u30fb\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u3092\u89e3\u8aac\u3002\u53d6\u5f15\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u3068\u89e3\u6c7a\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Forex Guide\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-14T18:27:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-24T13:40:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/06\/forexguide-mqlref-eyecatch.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/06\/forexguide-mqlref-eyecatch.png\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/systre_COM\" \/>\n<meta name=\"twitter:site\" content=\"@systre_COM\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"6\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/\"},\"author\":{\"name\":\"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/#\\\/schema\\\/person\\\/6d4b91f175c62b272d48ff74ffe237c1\"},\"headline\":\"MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u89e3\u6c7a\u6cd5\u30fb\u30c7\u30d0\u30c3\u30b0\",\"datePublished\":\"2026-03-14T18:27:04+00:00\",\"dateModified\":\"2026-03-24T13:40:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/\"},\"wordCount\":449,\"publisher\":{\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/forexguide-mqlref-eyecatch.png\",\"keywords\":[\"MQL5\"],\"articleSection\":[\"MQL\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/\",\"url\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/\",\"name\":\"MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u30c7\u30d0\u30c3\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/forexguide-mqlref-eyecatch.png\",\"datePublished\":\"2026-03-14T18:27:04+00:00\",\"dateModified\":\"2026-03-24T13:40:55+00:00\",\"description\":\"MQL5\u306e\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fbGetLastError()\u306e\u4f7f\u3044\u65b9\u30fb\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u3092\u89e3\u8aac\u3002\u53d6\u5f15\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u3068\u89e3\u6c7a\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/forexguide-mqlref-eyecatch.png\",\"contentUrl\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/forexguide-mqlref-eyecatch.png\",\"width\":2400,\"height\":1260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/mql5-error-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MQL\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\",\"item\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/category\\\/mql-reference\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u89e3\u6c7a\u6cd5\u30fb\u30c7\u30d0\u30c3\u30b0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/#website\",\"url\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/\",\"name\":\"\u30b7\u30b9\u30c8\u30ec.COM\",\"description\":\"\u30b7\u30b9\u30c8\u30ec.COM ForexGuide\uff5cFX\u81ea\u52d5\u58f2\u8cb7\u306b\u95a2\u3059\u308b\u304a\u5f79\u7acb\u3061\u60c5\u5831\u3092\u66f4\u65b0\u4e2d\uff01\",\"publisher\":{\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/#organization\"},\"alternateName\":\"\u30b7\u30b9\u30c8\u30ecCOM\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/#organization\",\"name\":\"\u30b7\u30b9\u30c8\u30ec.COM\",\"alternateName\":\"\u30b7\u30b9\u30c8\u30ecCOM\",\"url\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/\u30b7\u30b9\u30c8\u30ec.COM_\u30ed\u30b4-1.svg\",\"contentUrl\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/\u30b7\u30b9\u30c8\u30ec.COM_\u30ed\u30b4-1.svg\",\"width\":500,\"height\":500,\"caption\":\"\u30b7\u30b9\u30c8\u30ec.COM\"},\"image\":{\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/systre_COM\",\"https:\\\/\\\/www.youtube.com\\\/@systre_com\",\"https:\\\/\\\/www.facebook.com\\\/people\\\/%E3%82%B7%E3%82%B9%E3%83%88%E3%83%ACcom\\\/61587699411751\\\/\",\"https:\\\/\\\/www.instagram.com\\\/systre_com\\\/\",\"https:\\\/\\\/www.tiktok.com\\\/@sys_tre.com\"],\"description\":\"FX\u81ea\u52d5\u58f2\u8cb7EA\uff08Expert Advisor\uff09200\u672c\u4ee5\u4e0a\u3092\u7121\u6599\u63d0\u4f9b\u3059\u308b\u30de\u30fc\u30b1\u30c3\u30c8\u30d7\u30ec\u30a4\u30b9\u3002\u5168EA\u306e\u30d5\u30a9\u30ef\u30fc\u30c9\u30c6\u30b9\u30c8\u30fb\u30ea\u30a2\u30eb\u53e3\u5ea7\u904b\u7528\u30c7\u30fc\u30bf\u3092\u516c\u958b\u3002MT4\\\/MT5\u5bfe\u5fdc\u3002\",\"foundingDate\":\"2023\",\"knowsAbout\":[\"FX\u81ea\u52d5\u58f2\u8cb7\",\"Expert Advisor\",\"MetaTrader\",\"\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790\",\"\u30b7\u30b9\u30c6\u30e0\u30c8\u30ec\u30fc\u30c9\"],\"contactPoint\":{\"@type\":\"ContactPoint\",\"contactType\":\"customer service\",\"url\":\"https:\\\/\\\/sys-tre.com\\\/contact-us\\\/\",\"availableLanguage\":[\"Japanese\",\"English\"]},\"legalName\":\"Attempia Ltd\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/#\\\/schema\\\/person\\\/6d4b91f175c62b272d48ff74ffe237c1\",\"name\":\"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b6ee0bfaa0b0a8c1c9af71dab7cf7fce04ac8f81a3d6bc3155344b588e526631?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b6ee0bfaa0b0a8c1c9af71dab7cf7fce04ac8f81a3d6bc3155344b588e526631?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b6ee0bfaa0b0a8c1c9af71dab7cf7fce04ac8f81a3d6bc3155344b588e526631?s=96&d=mm&r=g\",\"caption\":\"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8\"},\"description\":\"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8\u306f\u3001FX\u81ea\u52d5\u58f2\u8cb7\uff08EA\uff09\u3068\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790\u3092\u5c02\u9580\u3068\u3059\u308b\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30e1\u30c7\u30a3\u30a2\u300c\u30b7\u30b9\u30c8\u30ec.COM\u300d\u306e\u7de8\u96c6\u30c1\u30fc\u30e0\u3067\u3059\u3002200\u672c\u4ee5\u4e0a\u306eEA\u306e\u30d5\u30a9\u30ef\u30fc\u30c9\u30c6\u30b9\u30c8\u7d50\u679c\u3092\u516c\u958b\u3057\u3001\u5b9f\u969b\u306e\u904b\u7528\u30c7\u30fc\u30bf\u306b\u57fa\u3065\u3044\u305f\u5ba2\u89b3\u7684\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u307e\u3059\u3002\u8a18\u4e8b\u306e\u57f7\u7b46\u30fb\u76e3\u4fee\u306fMetaTrader\uff08MT4\\\/MT5\uff09\u3067\u306e\u5b9f\u904b\u7528\u7d4c\u9a13\u3092\u6301\u3064\u30b9\u30bf\u30c3\u30d5\u304c\u62c5\u5f53\u3002\",\"sameAs\":[\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/about\\\/\",\"https:\\\/\\\/x.com\\\/systre_COM\"],\"jobTitle\":\"FX\u81ea\u52d5\u58f2\u8cb7\u30fb\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790 \u7de8\u96c6\u30c1\u30fc\u30e0\",\"knowsAbout\":[\"FX\u81ea\u52d5\u58f2\u8cb7\",\"Expert Advisor (EA)\",\"\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790\",\"MetaTrader 4\",\"MetaTrader 5\",\"MQL4\",\"MQL5\",\"\u30ea\u30b9\u30af\u7ba1\u7406\",\"\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u30c8\u30ec\u30fc\u30c9\"],\"url\":\"https:\\\/\\\/sys-tre.com\\\/forexguide\\\/about\\\/\",\"worksFor\":{\"@type\":\"Organization\",\"name\":\"\u30b7\u30b9\u30c8\u30ec.COM\",\"url\":\"https:\\\/\\\/sys-tre.com\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u30c7\u30d0\u30c3\u30b0","description":"MQL5\u306e\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fbGetLastError()\u306e\u4f7f\u3044\u65b9\u30fb\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u3092\u89e3\u8aac\u3002\u53d6\u5f15\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u3068\u89e3\u6c7a\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/","og_locale":"ja_JP","og_type":"article","og_title":"MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u30c7\u30d0\u30c3\u30b0","og_description":"MQL5\u306e\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fbGetLastError()\u306e\u4f7f\u3044\u65b9\u30fb\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u3092\u89e3\u8aac\u3002\u53d6\u5f15\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u3068\u89e3\u6c7a\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002","og_url":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/","og_site_name":"Forex Guide","article_published_time":"2026-03-14T18:27:04+00:00","article_modified_time":"2026-03-24T13:40:55+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/06\/forexguide-mqlref-eyecatch.png","type":"image\/png"}],"author":"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_image":"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/06\/forexguide-mqlref-eyecatch.png","twitter_creator":"@https:\/\/twitter.com\/systre_COM","twitter_site":"@systre_COM","twitter_misc":{"\u57f7\u7b46\u8005":"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"6\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/#article","isPartOf":{"@id":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/"},"author":{"name":"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8","@id":"https:\/\/sys-tre.com\/forexguide\/#\/schema\/person\/6d4b91f175c62b272d48ff74ffe237c1"},"headline":"MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u89e3\u6c7a\u6cd5\u30fb\u30c7\u30d0\u30c3\u30b0","datePublished":"2026-03-14T18:27:04+00:00","dateModified":"2026-03-24T13:40:55+00:00","mainEntityOfPage":{"@id":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/"},"wordCount":449,"publisher":{"@id":"https:\/\/sys-tre.com\/forexguide\/#organization"},"image":{"@id":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/06\/forexguide-mqlref-eyecatch.png","keywords":["MQL5"],"articleSection":["MQL\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/","url":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/","name":"MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u30c7\u30d0\u30c3\u30b0","isPartOf":{"@id":"https:\/\/sys-tre.com\/forexguide\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/#primaryimage"},"image":{"@id":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/06\/forexguide-mqlref-eyecatch.png","datePublished":"2026-03-14T18:27:04+00:00","dateModified":"2026-03-24T13:40:55+00:00","description":"MQL5\u306e\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fbGetLastError()\u306e\u4f7f\u3044\u65b9\u30fb\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u3092\u89e3\u8aac\u3002\u53d6\u5f15\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u3068\u89e3\u6c7a\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/#primaryimage","url":"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/06\/forexguide-mqlref-eyecatch.png","contentUrl":"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2026\/06\/forexguide-mqlref-eyecatch.png","width":2400,"height":1260},{"@type":"BreadcrumbList","@id":"https:\/\/sys-tre.com\/forexguide\/mql5-error-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/sys-tre.com\/forexguide\/"},{"@type":"ListItem","position":2,"name":"MQL\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9","item":"https:\/\/sys-tre.com\/forexguide\/category\/mql-reference\/"},{"@type":"ListItem","position":3,"name":"MQL5 \u30a8\u30e9\u30fc\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u4e00\u89a7\u30fb\u539f\u56e0\u30fb\u89e3\u6c7a\u6cd5\u30fb\u30c7\u30d0\u30c3\u30b0"}]},{"@type":"WebSite","@id":"https:\/\/sys-tre.com\/forexguide\/#website","url":"https:\/\/sys-tre.com\/forexguide\/","name":"\u30b7\u30b9\u30c8\u30ec.COM","description":"\u30b7\u30b9\u30c8\u30ec.COM ForexGuide\uff5cFX\u81ea\u52d5\u58f2\u8cb7\u306b\u95a2\u3059\u308b\u304a\u5f79\u7acb\u3061\u60c5\u5831\u3092\u66f4\u65b0\u4e2d\uff01","publisher":{"@id":"https:\/\/sys-tre.com\/forexguide\/#organization"},"alternateName":"\u30b7\u30b9\u30c8\u30ecCOM","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sys-tre.com\/forexguide\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/sys-tre.com\/forexguide\/#organization","name":"\u30b7\u30b9\u30c8\u30ec.COM","alternateName":"\u30b7\u30b9\u30c8\u30ecCOM","url":"https:\/\/sys-tre.com\/forexguide\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/sys-tre.com\/forexguide\/#\/schema\/logo\/image\/","url":"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2023\/05\/\u30b7\u30b9\u30c8\u30ec.COM_\u30ed\u30b4-1.svg","contentUrl":"https:\/\/sys-tre.com\/forexguide\/wp-content\/uploads\/2023\/05\/\u30b7\u30b9\u30c8\u30ec.COM_\u30ed\u30b4-1.svg","width":500,"height":500,"caption":"\u30b7\u30b9\u30c8\u30ec.COM"},"image":{"@id":"https:\/\/sys-tre.com\/forexguide\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/systre_COM","https:\/\/www.youtube.com\/@systre_com","https:\/\/www.facebook.com\/people\/%E3%82%B7%E3%82%B9%E3%83%88%E3%83%ACcom\/61587699411751\/","https:\/\/www.instagram.com\/systre_com\/","https:\/\/www.tiktok.com\/@sys_tre.com"],"description":"FX\u81ea\u52d5\u58f2\u8cb7EA\uff08Expert Advisor\uff09200\u672c\u4ee5\u4e0a\u3092\u7121\u6599\u63d0\u4f9b\u3059\u308b\u30de\u30fc\u30b1\u30c3\u30c8\u30d7\u30ec\u30a4\u30b9\u3002\u5168EA\u306e\u30d5\u30a9\u30ef\u30fc\u30c9\u30c6\u30b9\u30c8\u30fb\u30ea\u30a2\u30eb\u53e3\u5ea7\u904b\u7528\u30c7\u30fc\u30bf\u3092\u516c\u958b\u3002MT4\/MT5\u5bfe\u5fdc\u3002","foundingDate":"2023","knowsAbout":["FX\u81ea\u52d5\u58f2\u8cb7","Expert Advisor","MetaTrader","\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790","\u30b7\u30b9\u30c6\u30e0\u30c8\u30ec\u30fc\u30c9"],"contactPoint":{"@type":"ContactPoint","contactType":"customer service","url":"https:\/\/sys-tre.com\/contact-us\/","availableLanguage":["Japanese","English"]},"legalName":"Attempia Ltd"},{"@type":"Person","@id":"https:\/\/sys-tre.com\/forexguide\/#\/schema\/person\/6d4b91f175c62b272d48ff74ffe237c1","name":"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/b6ee0bfaa0b0a8c1c9af71dab7cf7fce04ac8f81a3d6bc3155344b588e526631?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b6ee0bfaa0b0a8c1c9af71dab7cf7fce04ac8f81a3d6bc3155344b588e526631?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b6ee0bfaa0b0a8c1c9af71dab7cf7fce04ac8f81a3d6bc3155344b588e526631?s=96&d=mm&r=g","caption":"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8"},"description":"\u30b7\u30b9\u30c8\u30ec.COM\u7de8\u96c6\u90e8\u306f\u3001FX\u81ea\u52d5\u58f2\u8cb7\uff08EA\uff09\u3068\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790\u3092\u5c02\u9580\u3068\u3059\u308b\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30e1\u30c7\u30a3\u30a2\u300c\u30b7\u30b9\u30c8\u30ec.COM\u300d\u306e\u7de8\u96c6\u30c1\u30fc\u30e0\u3067\u3059\u3002200\u672c\u4ee5\u4e0a\u306eEA\u306e\u30d5\u30a9\u30ef\u30fc\u30c9\u30c6\u30b9\u30c8\u7d50\u679c\u3092\u516c\u958b\u3057\u3001\u5b9f\u969b\u306e\u904b\u7528\u30c7\u30fc\u30bf\u306b\u57fa\u3065\u3044\u305f\u5ba2\u89b3\u7684\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u307e\u3059\u3002\u8a18\u4e8b\u306e\u57f7\u7b46\u30fb\u76e3\u4fee\u306fMetaTrader\uff08MT4\/MT5\uff09\u3067\u306e\u5b9f\u904b\u7528\u7d4c\u9a13\u3092\u6301\u3064\u30b9\u30bf\u30c3\u30d5\u304c\u62c5\u5f53\u3002","sameAs":["https:\/\/sys-tre.com\/forexguide\/about\/","https:\/\/x.com\/systre_COM"],"jobTitle":"FX\u81ea\u52d5\u58f2\u8cb7\u30fb\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790 \u7de8\u96c6\u30c1\u30fc\u30e0","knowsAbout":["FX\u81ea\u52d5\u58f2\u8cb7","Expert Advisor (EA)","\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790","MetaTrader 4","MetaTrader 5","MQL4","MQL5","\u30ea\u30b9\u30af\u7ba1\u7406","\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u30c8\u30ec\u30fc\u30c9"],"url":"https:\/\/sys-tre.com\/forexguide\/about\/","worksFor":{"@type":"Organization","name":"\u30b7\u30b9\u30c8\u30ec.COM","url":"https:\/\/sys-tre.com\/"}}]}},"_links":{"self":[{"href":"https:\/\/sys-tre.com\/forexguide\/wp-json\/wp\/v2\/posts\/65632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sys-tre.com\/forexguide\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sys-tre.com\/forexguide\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sys-tre.com\/forexguide\/wp-json\/wp\/v2\/users\/686"}],"replies":[{"embeddable":true,"href":"https:\/\/sys-tre.com\/forexguide\/wp-json\/wp\/v2\/comments?post=65632"}],"version-history":[{"count":3,"href":"https:\/\/sys-tre.com\/forexguide\/wp-json\/wp\/v2\/posts\/65632\/revisions"}],"predecessor-version":[{"id":67370,"href":"https:\/\/sys-tre.com\/forexguide\/wp-json\/wp\/v2\/posts\/65632\/revisions\/67370"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sys-tre.com\/forexguide\/wp-json\/wp\/v2\/media\/71194"}],"wp:attachment":[{"href":"https:\/\/sys-tre.com\/forexguide\/wp-json\/wp\/v2\/media?parent=65632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sys-tre.com\/forexguide\/wp-json\/wp\/v2\/categories?post=65632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sys-tre.com\/forexguide\/wp-json\/wp\/v2\/tags?post=65632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}