{"id":2653,"date":"2024-10-11T16:28:40","date_gmt":"2024-10-11T07:28:40","guid":{"rendered":"https:\/\/trend-appsweb.com\/myportfolio\/?p=2653"},"modified":"2024-10-14T01:15:10","modified_gmt":"2024-10-13T16:15:10","slug":"2653","status":"publish","type":"post","link":"https:\/\/trend-appsweb.com\/myportfolio\/?p=2653","title":{"rendered":"MQL4\u3067\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\uff01\u521d\u5fc3\u8005\u5411\u3051\u89e3\u8aac\u2460"},"content":{"rendered":"<div class=\"article\">\n<h3 class=\"midashi\">MQL4\u3067\u81ea\u4f5c\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u5165\u9580\uff1a\u79fb\u52d5\u5e73\u5747\u7dda\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u4f5c\u6210\u30ac\u30a4\u30c9<\/h3>\n<p>&nbsp;<\/p>\n<div class=\"balloon\">\n<div class=\"face_icon\">\n<p><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof.png\" alt=\"\" width=\"256\" height=\"256\" class=\"alignnone size-full wp-image-2111\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof.png 1024w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-300x300.png 300w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-150x150.png 150w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-768x768.png 768w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/><\/p>\n<p style=\"text-align: center; margin: -20px auto 0 auto;\">\u306a\u304a\u3068<\/p>\n<\/div>\n<div class=\"chatting\">\n<div class=\"chat_content\">\u3053\u3093\u306b\u3061\u306f\uff01naoto555\u3067\u3059\u3002<br \/>\n\u4eca\u65e5\u306fMQL4\u3092\u4f7f\u3063\u3066\u81ea\u4f5c\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u3092\u4f5c\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n\u7279\u306b\u3001\u79fb\u52d5\u5e73\u5747\u7dda\u3092\u4f7f\u3063\u305f\u7c21\u5358\u306a\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u4f8b\u306b\u3001MQL4\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u57fa\u790e\u3092\u5b66\u3093\u3067\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/div>\n<\/div>\n<\/div>\n<div class=\"balloon\">\n<div class=\"face_icon2\">\n<p><img decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/10\/\u306f\u3042\u306f\u3042\u3053\u3093\u306b\u3083\u304f2.png\" alt=\"\" width=\"300\" height=\"300\" class=\"alignnone size-full wp-image-2446\" \/><\/p>\n<p style=\"text-align: center; margin: -20px auto 0 auto;\">\u8b0e\u3053\u3093\u306b\u3083\u304f<\/p>\n<\/div>\n<div class=\"chatting2\">\n<div class=\"chat_content2\">\u308f\u3041\u3001\u81ea\u4f5c\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u3067\u3059\u304b\uff1f<br \/>\n\u3067\u3082\u3001\u306a\u304a\u3068\u3055\u3093\u3001<br \/>\n\u305d\u3082\u305d\u3082MQL4\u3063\u3066\u4f55\u306a\u3093\u3067\u3057\u3087\u3046\uff1f<\/div>\n<\/div>\n<\/div>\n<div class=\"balloon\">\n<div class=\"face_icon\">\n<p><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof.png\" alt=\"\" width=\"256\" height=\"256\" class=\"alignnone size-full wp-image-2111\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof.png 1024w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-300x300.png 300w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-150x150.png 150w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-768x768.png 768w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/><\/p>\n<p style=\"text-align: center; margin: -20px auto 0 auto;\">\u306a\u304a\u3068<\/p>\n<\/div>\n<div class=\"chatting\">\n<div class=\"chat_content\">\u3044\u3044\u8cea\u554f\u3067\u3059\u306d\uff01MQL4\u306fMT4\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u7528\u306e<br \/>\n\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3059\u3002<br \/>\n\u3053\u308c\u3092\u4f7f\u3046\u3068\u3001\u30ab\u30b9\u30bf\u30e0\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u3084EA<br \/>\n\uff08\u81ea\u52d5\u58f2\u8cb7\u30b7\u30b9\u30c6\u30e0\uff09\u3092\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3093\u3067\u3059\u3002<\/div>\n<\/div>\n<\/div>\n<div class=\"balloon\">\n<div class=\"face_icon2\">\n<p><img decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/10\/\u306f\u3042\u306f\u3042\u3053\u3093\u306b\u3083\u304f2.png\" alt=\"\" width=\"300\" height=\"300\" class=\"alignnone size-full wp-image-2446\" \/><\/p>\n<p style=\"text-align: center; margin: -20px auto 0 auto;\">\u8b0e\u3053\u3093\u306b\u3083\u304f<\/p>\n<\/div>\n<div class=\"chatting2\">\n<div class=\"chat_content2\">\u81ea\u4f5c\u3059\u308b\u30e1\u30ea\u30c3\u30c8\u306f\u4f55\u3067\u3059\u304b\uff1f<br \/>\n\u305d\u306e\u8fba\u306e\u5974\u3092\u8cb7\u3063\u305f\u308a\u62fe\u3063\u305f\u308a\u3058\u3083\u30c0\u30e1\u306a\u3093\u3067\u3059\u304b\uff1f<\/div>\n<\/div>\n<\/div>\n<div class=\"balloon\">\n<div class=\"face_icon\">\n<p><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof.png\" alt=\"\" width=\"256\" height=\"256\" class=\"alignnone size-full wp-image-2111\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof.png 1024w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-300x300.png 300w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-150x150.png 150w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-768x768.png 768w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/><\/p>\n<p style=\"text-align: center; margin: -20px auto 0 auto;\">\u306a\u304a\u3068<\/p>\n<\/div>\n<div class=\"chatting\">\n<div class=\"chat_content\">\u81ea\u4f5c\u3059\u308b\u610f\u7fa9\u306f\u5927\u304d\u304f3\u3064\u3042\u308a\u307e\u3059\uff1a<br \/>\n\u2460\u81ea\u5206\u306e\u30b9\u30bf\u30a4\u30eb\u306b\u30de\u30c3\u30c1\u3057\u305f\u30c4\u30fc\u30eb\u304c\u4f5c\u308c\u308b<br \/>\n\u2461\u5e02\u8ca9\u3067\u306f\u5f97\u3089\u308c\u306a\u3044\u72ec\u81ea\u306e\u5206\u6790\u304c\u53ef\u80fd\u306b\u306a\u308b<br \/>\n\u2462\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u3084EA\u306e\u4ed5\u7d44\u307f\u304c\u5206\u304b\u308b\u304b\u3089<br \/>\n\u30c8\u30ec\u30fc\u30c9\u3082\u4e0a\u9054\u3059\u308b<\/div>\n<\/div>\n<\/div>\n<div class=\"balloon\">\n<div class=\"face_icon2\">\n<p><img decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/10\/\u306f\u3042\u306f\u3042\u3053\u3093\u306b\u3083\u304f2.png\" alt=\"\" width=\"300\" height=\"300\" class=\"alignnone size-full wp-image-2446\" \/><\/p>\n<p style=\"text-align: center; margin: -20px auto 0 auto;\">\u8b0e\u3053\u3093\u306b\u3083\u304f<\/p>\n<\/div>\n<div class=\"chatting2\">\n<div class=\"chat_content2\">\u306a\u308b\u307b\u3069\uff01\u3067\u3082\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u521d\u5fc3\u8005\u3067\u3082<br \/>\n\u59cb\u3081\u3089\u308c\u308b\u3093\u3067\u3057\u3087\u3046\u304b\uff1f<\/div>\n<\/div>\n<\/div>\n<div class=\"balloon\">\n<div class=\"face_icon\">\n<p><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof.png\" alt=\"\" width=\"256\" height=\"256\" class=\"alignnone size-full wp-image-2111\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof.png 1024w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-300x300.png 300w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-150x150.png 150w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-768x768.png 768w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/><\/p>\n<p style=\"text-align: center; margin: -20px auto 0 auto;\">\u306a\u304a\u3068<\/p>\n<\/div>\n<div class=\"chatting\">\n<div class=\"chat_content\">\u3082\u3061\u308d\u3093\u3067\u3059\uff01MQL4\u306f\u6bd4\u8f03\u7684\u5b66\u3073\u3084\u3059\u3044\u8a00\u8a9e\u3067\u3001<br \/>\nFX\u306e\u77e5\u8b58\u304c\u3042\u308c\u3070\u7406\u89e3\u3057\u3084\u3059\u3044\u3093\u3067\u3059\u3002<br \/>\n\u6e96\u5099\u3082\u7c21\u5358\u3067\u3001\u4e3b\u306b\u4ee5\u4e0b\u306e3\u30b9\u30c6\u30c3\u30d7\u3067\u59cb\u3081\u3089\u308c\u307e\u3059\uff1a<br \/>\n1. MetaTrader 4\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n2. MetaEditor\uff08MQL4\u7528\u306e\u7d71\u5408\u958b\u767a\u74b0\u5883\uff09\u3092\u958b\u304f<br \/>\n3. \u57fa\u672c\u7684\u306aMQL4\u306e\u6587\u6cd5\u3092\u5b66\u3076<\/div>\n<\/div>\n<\/div>\n<div class=\"balloon\">\n<div class=\"face_icon2\">\n<p><img decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/10\/\u306f\u3042\u306f\u3042\u3053\u3093\u306b\u3083\u304f2.png\" alt=\"\" width=\"300\" height=\"300\" class=\"alignnone size-full wp-image-2446\" \/><\/p>\n<p style=\"text-align: center; margin: -20px auto 0 auto;\">\u8b0e\u3053\u3093\u306b\u3083\u304f<\/p>\n<\/div>\n<div class=\"chatting2\">\n<div class=\"chat_content2\">\u306a\u308b\u307b\u3069\uff01\u305d\u308c\u306a\u3089\u50d5\u306b\u3082<br \/>\n\u3067\u304d\u305d\u3046\u3067\u3059\u306d&#8230;\u306f\u3041\u306f\u3041<\/div>\n<\/div>\n<\/div>\n<div class=\"balloon\">\n<div class=\"face_icon\">\n<p><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof.png\" alt=\"\" width=\"256\" height=\"256\" class=\"alignnone size-full wp-image-2111\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof.png 1024w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-300x300.png 300w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-150x150.png 150w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/02\/prof-768x768.png 768w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/><\/p>\n<p style=\"text-align: center; margin: -20px auto 0 auto;\">\u306a\u304a\u3068<\/p>\n<\/div>\n<div class=\"chatting\">\n<div class=\"chat_content\">\u4eca\u56de\u306f\u3001\u3053\u306e\u6e96\u5099\u3092\u6e08\u307e\u305b\u305f\u3068\u3044\u3046\u524d\u63d0\u3067\u3001<br \/>\n\u5b9f\u969b\u306b\u7c21\u5358\u306a\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u79fb\u52d5\u5e73\u5747\u7dda\u3092\u4f7f\u3063\u305f\u3001\u3068\u3066\u3082\u30b7\u30f3\u30d7\u30eb\u306a\u3082\u306e\u3067\u3059<\/div>\n<\/div>\n<\/div>\n<hr \/>\n<h4 class=\"tejun\">\u79fb\u52d5\u5e73\u5747\u7dda\u3092\u4f7f\u3063\u305f\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u306e\u57fa\u672c<\/h4>\n<p class=\"whitespace-pre-wrap break-words\">\u4eca\u56de\u4f5c\u6210\u3059\u308b\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7279\u5fb4\u3092\u6301\u3063\u3066\u3044\u307e\u3059\uff1a<\/p>\n<ul>\n<li>\u5358\u7d14\u79fb\u52d5\u5e73\u5747\u7dda\uff08SMA\uff09\u3092\u4f7f\u7528<\/li>\n<li>\u4fa1\u683c\u304cSMA\u3092\u4e0a\u5411\u304d\u306b\u7a81\u7834\u3057\u305f\u3089\u8cb7\u3044\u30b5\u30a4\u30f3<\/li>\n<li>\u4fa1\u683c\u304cSMA\u3092\u4e0b\u5411\u304d\u306b\u7a81\u7834\u3057\u305f\u3089\u58f2\u308a\u30b5\u30a4\u30f3<\/li>\n<\/ul>\n<div class=\"alert\">\n<div class=\"alert-title\">\u672c\u8a18\u4e8b\u306e\u30dd\u30a4\u30f3\u30c8<\/div>\n<ul>\n<li><strong>MQL4\u306e\u57fa\u672c\u69cb\u9020<\/strong>: init()\u95a2\u6570\u3068start()\u95a2\u6570\u306e\u5f79\u5272<\/li>\n<li><strong>\u79fb\u52d5\u5e73\u5747\u7dda\u306e\u8a08\u7b97<\/strong>: iMA()\u95a2\u6570\u306e\u4f7f\u3044\u65b9<\/li>\n<li><strong>\u30b5\u30a4\u30f3\u8868\u793a\u306e\u30ed\u30b8\u30c3\u30af<\/strong>: \u6761\u4ef6\u5206\u5c90\u3068\u30d0\u30c3\u30d5\u30a1\u306e\u4f7f\u7528\u65b9\u6cd5<\/li>\n<\/ul>\n<\/div>\n<h3 class=\"midashi\">\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u306e\u30b3\u30fc\u30c9\u5168\u6587<\/h3>\n<p class=\"whitespace-pre-wrap break-words\">\u4ee5\u4e0b\u304c\u4f5c\u6210\u3057\u305f\u30b3\u30fc\u30c9\u306e\u5168\u6587\u3067\u3059\u3002\u6b21\u306e\u898b\u51fa\u3057\u3067\u7d30\u304b\u304f\u629c\u7c8b\u3057\u3066\u307f\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\" style=\"margin-top: -10px;\">\n<pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\"><code>#property indicator_chart_window\r\n#property indicator_buffers 2\r\n#property indicator_color1 Lime\r\n#property indicator_color2 Red\r\n\r\nextern int MA_Period = 14;\r\n\r\ndouble BuyBuffer[];\r\ndouble SellBuffer[];\r\n\r\nint init()\r\n{\r\n    SetIndexStyle(0,DRAW_ARROW);\r\n    SetIndexArrow(0,233);\r\n    SetIndexBuffer(0,BuyBuffer);\r\n    SetIndexStyle(1,DRAW_ARROW);\r\n    SetIndexArrow(1,234);\r\n    SetIndexBuffer(1,SellBuffer);\r\n    return(0);\r\n}\r\n\r\nint start()\r\n{\r\n    int counted_bars = IndicatorCounted();\r\n    int limit = Bars - counted_bars - 1;\r\n    double ma;\r\n    \r\n    for(int i = limit; i >= 0; i--)\r\n    {\r\n        ma = iMA(NULL,0,MA_Period,0,MODE_SMA,PRICE_CLOSE,i);\r\n        \r\n        if(Close[i] > ma && Close[i+1] <= ma)\r\n        {\r\n            BuyBuffer[i] = Low[i] - 5*Point;\r\n        }\r\n        else if(Close[i] < ma &#038;&#038; Close[i+1] >= ma)\r\n        {\r\n            SellBuffer[i] = High[i] + 5*Point;\r\n        }\r\n    }\r\n    \r\n    return(0);\r\n}\r\n<\/code><\/pre>\n<\/div>\n<h4 class=\"tejun\">1. \u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u306e\u57fa\u672c\u8a2d\u5b9a<\/h4>\n<p class=\"whitespace-pre-wrap break-words\">\u30b3\u30fc\u30c9\u306e\u5192\u982d\u90e8\u5206\u3067\u3001\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u306e\u57fa\u672c\u7684\u306a\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\" style=\"margin-top: -10px;\">\n<pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\"><code>#property indicator_chart_window\r\n#property indicator_buffers 2\r\n#property indicator_color1 Lime\r\n#property indicator_color2 Red<\/code><\/pre>\n<\/div>\n<ul>\n<li><code>#property indicator_chart_window<\/code>: \u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u3092\u30c1\u30e3\u30fc\u30c8\u4e0a\u306b\u8868\u793a<\/li>\n<li><code>#property indicator_buffers 2<\/code>: 2\u3064\u306e\u30d0\u30c3\u30d5\u30a1\uff08\u8cb7\u3044\u3068\u58f2\u308a\uff09\u3092\u4f7f\u7528<\/li>\n<li><code>#property indicator_color1 Lime<\/code>: 1\u3064\u76ee\u306e\u30d0\u30c3\u30d5\u30a1\uff08\u8cb7\u3044\uff09\u306e\u8272\u3092\u7dd1\u306b\u8a2d\u5b9a<\/li>\n<li><code>#property indicator_color2 Red<\/code>: 2\u3064\u76ee\u306e\u30d0\u30c3\u30d5\u30a1\uff08\u58f2\u308a\uff09\u306e\u8272\u3092\u8d64\u306b\u8a2d\u5b9a<\/li>\n<\/ul>\n<h3 class=\"midashi\">\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u306e\u30b3\u30fc\u30c9\u89e3\u8aac<\/h3>\n<p class=\"whitespace-pre-wrap break-words\">\u3067\u306f\u3001\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u3092\u898b\u306a\u304c\u3089\u3001\u5404\u90e8\u5206\u306e\u5f79\u5272\u3092\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h4 class=\"tejun\">2. \u5909\u6570\u306e\u5b9a\u7fa9<\/h4>\n<div class=\"hcb_wrap\" style=\"margin-top: -10px;\">\n<pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\"><code>extern int MA_Period = 14;\r\n\r\ndouble BuyBuffer[];\r\ndouble SellBuffer[];<\/code><\/pre>\n<\/div>\n<p class=\"whitespace-pre-wrap break-words\"><code>extern int MA_Period = 14;<\/code> \u3067\u306f\u3001\u79fb\u52d5\u5e73\u5747\u7dda\u306e\u671f\u9593\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002extern\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u304cMT4\u4e0a\u3067\u7c21\u5358\u306b\u671f\u9593\u3092\u5909\u66f4\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4 class=\"tejun\">3. init()\u95a2\u6570\uff1a\u521d\u671f\u8a2d\u5b9a<\/h4>\n<div class=\"hcb_wrap\" style=\"margin-top: -10px;\">\n<pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\"><code>int init()\r\n{\r\n    SetIndexStyle(0,DRAW_ARROW);\r\n    SetIndexArrow(0,233);\r\n    SetIndexBuffer(0,BuyBuffer);\r\n    SetIndexStyle(1,DRAW_ARROW);\r\n    SetIndexArrow(1,234);\r\n    SetIndexBuffer(1,SellBuffer);\r\n    return(0);\r\n}<\/code><\/pre>\n<\/div>\n<p class=\"whitespace-pre-wrap break-words\">init()\u95a2\u6570\u306f\u3001\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u304c\u6700\u521d\u306b\u30c1\u30e3\u30fc\u30c8\u306b\u9069\u7528\u3055\u308c\u305f\u3068\u304d\u306b\u4e00\u5ea6\u3060\u3051\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u8cb7\u3044\u30b5\u30a4\u30f3\u3068\u58f2\u308a\u30b5\u30a4\u30f3\u306e\u8868\u793a\u65b9\u6cd5\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li><code>SetIndexStyle(0,DRAW_ARROW)<\/code>: 0\u756a\u76ee\u306e\u30d0\u30c3\u30d5\u30a1\uff08\u8cb7\u3044\uff09\u3092\u77e2\u5370\u3067\u8868\u793a<\/li>\n<li><code>SetIndexArrow(0,233)<\/code>: \u8cb7\u3044\u30b5\u30a4\u30f3\u306e\u77e2\u5370\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u8a2d\u5b9a\uff08233\u306f\u4e0a\u5411\u304d\u77e2\u5370\uff09<\/li>\n<li><code>SetIndexBuffer(0,BuyBuffer)<\/code>: 0\u756a\u76ee\u306e\u30d0\u30c3\u30d5\u30a1\u3092BuyBuffer\u306b\u95a2\u9023\u4ed8\u3051<\/li>\n<li><code>SetIndexStyle(1,DRAW_ARROW)<\/code>: 1\u756a\u76ee\u306e\u30d0\u30c3\u30d5\u30a1\uff08\u58f2\u308a\uff09\u3092\u77e2\u5370\u3067\u8868\u793a<\/li>\n<li><code>SetIndexArrow(1,234)<\/code>: \u58f2\u308a\u30b5\u30a4\u30f3\u306e\u77e2\u5370\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u8a2d\u5b9a\uff08234\u306f\u4e0b\u5411\u304d\u77e2\u5370\uff09<\/li>\n<li><code>SetIndexBuffer(1,SellBuffer)<\/code>: 1\u756a\u76ee\u306e\u30d0\u30c3\u30d5\u30a1\u3092SellBuffer\u306b\u95a2\u9023\u4ed8\u3051<\/li>\n<\/ul>\n<div class=\"alert\">\n<div class=\"alert-title\">\u77e2\u5370\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3064\u3044\u3066<\/div>\n<p>MQL4\u3067\u306f\u3001\u77e2\u5370\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u6570\u5024\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\u4e3b\u306a\u77e2\u5370\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\uff1a<\/p>\n<ul>\n<li><strong>233<\/strong>: \u4e0a\u5411\u304d\u77e2\u5370\uff08\u8cb7\u3044\u30b5\u30a4\u30f3\uff09<\/li>\n<li><strong>234<\/strong>: \u4e0b\u5411\u304d\u77e2\u5370\uff08\u58f2\u308a\u30b5\u30a4\u30f3\uff09<\/li>\n<\/ul>\n<p>\u4e0b\u306e\u753b\u50cf\u3067\u3001\u3055\u307e\u3056\u307e\u306a\u77e2\u5370\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n<div class=\"image-container\"><img decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/10\/MT4\u77e2\u5370.png\" alt=\"MT4\u77e2\u5370\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\" class=\"expandable-image\" width=\"500\" height=\"500\" \/><\/div>\n<h4 class=\"tejun\">4. start()\u95a2\u6570\uff1a\u30e1\u30a4\u30f3\u51e6\u7406<\/h4>\n<div class=\"hcb_wrap\" style=\"margin-top: -10px;\">\n<pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\"><code>int start()\r\n{\r\n    int counted_bars = IndicatorCounted();\r\n    int limit = Bars - counted_bars - 1;\r\n    double ma;\r\n    \r\n    for(int i = limit; i &gt;= 0; i--)\r\n    {\r\n        ma = iMA(NULL,0,MA_Period,0,MODE_SMA,PRICE_CLOSE,i);\r\n        \r\n        \/\/ \u30b5\u30a4\u30f3\u8868\u793a\u306e\u30ed\u30b8\u30c3\u30af\uff08\u4ee5\u4e0b\u3067\u8a73\u3057\u304f\u8aac\u660e\uff09\r\n    }\r\n    \r\n    return(0);\r\n}<\/code><\/pre>\n<\/div>\n<p class=\"whitespace-pre-wrap break-words\">start()\u95a2\u6570\u306f\u3001\u65b0\u3057\u3044\u4fa1\u683c\u30c7\u30fc\u30bf\u304c\u6765\u308b\u305f\u3073\u306b\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u3053\u3053\u3067\u79fb\u52d5\u5e73\u5747\u7dda\u306e\u8a08\u7b97\u3068\u30b5\u30a4\u30f3\u8868\u793a\u306e\u30ed\u30b8\u30c3\u30af\u3092\u5b9f\u88c5\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li><code>int counted_bars = IndicatorCounted();<\/code>: \u65e2\u306b\u8a08\u7b97\u6e08\u307f\u306e\u30d0\u30fc\u6570\u3092\u53d6\u5f97<\/li>\n<li><code>int limit = Bars - counted_bars - 1;<\/code>: \u8a08\u7b97\u304c\u5fc5\u8981\u306a\u6700\u3082\u53e4\u3044\u30d0\u30fc\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8a08\u7b97<\/li>\n<li><code>ma = iMA(NULL,0,MA_Period,0,MODE_SMA,PRICE_CLOSE,i);<\/code>: \u79fb\u52d5\u5e73\u5747\u7dda\u3092\u8a08\u7b97<\/li>\n<\/ul>\n<p class=\"whitespace-pre-wrap break-words\">iMA()\u95a2\u6570\u306f\u79fb\u52d5\u5e73\u5747\u3092\u8a08\u7b97\u3059\u308b\u7d44\u307f\u8fbc\u307f\u95a2\u6570\u3067\u3059\u3002\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u610f\u5473\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\uff1a<\/p>\n<ul>\n<li>NULL: \u73fe\u5728\u306e\u30b7\u30f3\u30dc\u30eb<\/li>\n<li>0: \u73fe\u5728\u306e\u6642\u9593\u8ef8<\/li>\n<li>MA_Period: \u79fb\u52d5\u5e73\u5747\u306e\u671f\u9593<\/li>\n<li>0: \u79fb\u52d5\u5e73\u5747\u306e\u79fb\u52d5\uff08\u30b7\u30d5\u30c8\uff09<\/li>\n<li>MODE_SMA: \u5358\u7d14\u79fb\u52d5\u5e73\u5747\u3092\u4f7f\u7528<\/li>\n<li>PRICE_CLOSE: \u7d42\u5024\u3092\u4f7f\u7528<\/li>\n<li>i: \u8a08\u7b97\u3059\u308b\u30d0\u30fc\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9<\/li>\n<\/ul>\n<h4 class=\"tejun\">5. \u30b5\u30a4\u30f3\u8868\u793a\u306e\u30ed\u30b8\u30c3\u30af<\/h4>\n<div class=\"hcb_wrap\" style=\"margin-top: -10px;\">\n<pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\"><code>if(Close[i] &gt; ma &amp;&amp; Close[i+1] &lt;= ma)\r\n{\r\n    BuyBuffer[i] = Low[i] - 5*Point;\r\n}\r\nelse if(Close[i] &lt; ma &amp;&amp; Close[i+1] &gt;= ma)\r\n{\r\n    SellBuffer[i] = High[i] + 5*Point;\r\n}<\/code><\/pre>\n<\/div>\n<p class=\"whitespace-pre-wrap break-words\">\u6761\u4ef6\u5206\u5c90\u3092\u4f7f\u3063\u3066\u3001\u8cb7\u3044\u30b5\u30a4\u30f3\u3068\u58f2\u308a\u30b5\u30a4\u30f3\u306e\u8868\u793a\u6761\u4ef6\u3092\u5224\u65ad\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u8cb7\u3044\u30b5\u30a4\u30f3\u6761\u4ef6: <code>Close[i] &gt; ma &amp;&amp; Close[i+1] &lt;= ma<\/code><\/li>\n<li>\u58f2\u308a\u30b5\u30a4\u30f3\u6761\u4ef6: <code>Close[i] &lt; ma &amp;&amp; Close[i+1] &gt;= ma<\/code><\/li>\n<\/ul>\n<p class=\"whitespace-pre-wrap break-words\">\u6761\u4ef6\u3092\u6e80\u305f\u3057\u305f\u5834\u5408\u3001\u305d\u308c\u305e\u308c\u306e\u30d0\u30c3\u30d5\u30a1\u306b\u5024\u3092\u30bb\u30c3\u30c8\u3057\u3066\u30b5\u30a4\u30f3\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<h3 class=\"midashi\">\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u306e\u52d5\u4f5c\u30a4\u30e1\u30fc\u30b8<\/h3>\n<p class=\"whitespace-pre-wrap break-words\">\u3053\u306e\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u3092MT4\u30c1\u30e3\u30fc\u30c8\u4e0a\u306b\u9069\u7528\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8868\u793a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"chart-analysis\">\n<div class=\"chart-image\" width=\"800\" height=\"800\">\n    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/10\/\u30bf\u30a4\u30c8\u30eb\u306a\u3057-1.png\" alt=\"\" width=\"623\" height=\"620\" class=\"alignnone size-full wp-image-2787 expandable-image\" srcset=\"https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/10\/\u30bf\u30a4\u30c8\u30eb\u306a\u3057-1.png 623w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/10\/\u30bf\u30a4\u30c8\u30eb\u306a\u3057-1-300x300.png 300w, https:\/\/trend-appsweb.com\/wp-content\/uploads\/2024\/10\/\u30bf\u30a4\u30c8\u30eb\u306a\u3057-1-150x150.png 150w\" sizes=\"(max-width: 623px) 100vw, 623px\" \/>\n<\/div>\n<div class=\"chart-info\">\n<div class=\"chart-details\">\n<p><strong>\u8868\u793a\u5185\u5bb9\uff1a<\/strong>\u8cb7\u3044\u30b5\u30a4\u30f3\uff08\u7dd1\u306e\u4e0a\u77e2\u5370\uff09\u3068\u58f2\u308a\u30b5\u30a4\u30f3\uff08\u8d64\u3044\u4e0b\u77e2\u5370\uff09<br \/>\n<strong>\u5224\u65ad\u57fa\u6e96\uff1a<\/strong>\u4fa1\u683c\u3068\u79fb\u52d5\u5e73\u5747\u7dda\u306e\u4f4d\u7f6e\u95a2\u4fc2<\/p>\n<\/div>\n<div class=\"chart-explanation\">\n<h4>\u4f7f\u3044\u65b9<\/h4>\n<p>\u30fb\u7dd1\u306e\u4e0a\u77e2\u5370\u304c\u8868\u793a\u3055\u308c\u305f\u3089\u3001\u4e0a\u6607\u30c8\u30ec\u30f3\u30c9\u306e\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u30fb\u8d64\u3044\u4e0b\u77e2\u5370\u304c\u8868\u793a\u3055\u308c\u305f\u3089\u3001\u4e0b\u964d\u30c8\u30ec\u30f3\u30c9\u306e\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u30fb\u4ed6\u306e\u5206\u6790\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u3001\u3088\u308a\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u30c8\u30ec\u30fc\u30c9\u5224\u65ad\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<\/div>\n<\/div>\n<\/div>\n<h3 class=\"midashi\">\u307e\u3068\u3081<\/h3>\n<p class=\"whitespace-pre-wrap break-words\">\u4eca\u56de\u306f\u3001MQL4\u3092\u4f7f\u3063\u3066\u79fb\u52d5\u5e73\u5747\u7dda\u30d9\u30fc\u30b9\u306e\u7c21\u5358\u306a\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002\u3053\u306e\u30b3\u30fc\u30c9\u3092\u57fa\u306b\u3001\u4ed6\u306e\u6307\u6a19\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u308a\u3001\u6761\u4ef6\u3092\u5909\u66f4\u3057\u305f\u308a\u3057\u3066\u3001\u81ea\u5206\u3060\u3051\u306e\u30aa\u30ea\u30b8\u30ca\u30eb\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p class=\"whitespace-pre-wrap break-words\">\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306f\u5b9f\u8df5\u3092\u901a\u3058\u3066\u4e0a\u9054\u3057\u307e\u3059\u3002\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3082\u8ae6\u3081\u305a\u306b\u3001\u5c11\u3057\u305a\u3064\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3057\u3066\u52d5\u4f5c\u3092\u78ba\u8a8d\u3057\u3066\u3044\u304f\u3053\u3068\u3067\u3001\u5fc5\u305a\u7406\u89e3\u304c\u6df1\u307e\u308a\u307e\u3059\u3002\u9811\u5f35\u3063\u3066\u30c1\u30e3\u30ec\u30f3\u30b8\u3057\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<div class=\"alert\">\n<div class=\"alert-title\">\u6b21\u306e\u30b9\u30c6\u30c3\u30d7<\/div>\n<ul>\n<li>\u79fb\u52d5\u5e73\u5747\u7dda\u306e\u671f\u9593\u3092\u5909\u3048\u3066\u3001\u611f\u5ea6\u306e\u9055\u3044\u3092\u78ba\u8a8d\u3057\u3066\u307f\u308b<\/li>\n<li>\u4ed6\u306e\u6307\u6a19\uff08RSI\u3084MACD\u306a\u3069\uff09\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u3001\u3088\u308a\u7cbe\u5ea6\u306e\u9ad8\u3044\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u4f5c\u6210\u3059\u308b<\/li>\n<li>\u30d0\u30c3\u30af\u30c6\u30b9\u30c8\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u3001\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u306e\u6027\u80fd\u3092\u691c\u8a3c\u3059\u308b<\/li>\n<\/ul>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>MQL4\u3067\u81ea\u4f5c\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u5165\u9580\uff1a\u79fb\u52d5\u5e73\u5747\u7dda\u30b5\u30a4\u30f3\u30c4\u30fc\u30eb\u4f5c\u6210\u30ac\u30a4\u30c9 &nbsp; \u306a\u304a\u3068 \u3053\u3093\u306b\u3061\u306f\uff01naoto555\u3067\u3059\u3002 \u4eca\u65e5\u306fMQL4\u3092\u4f7f\u3063\u3066\u81ea\u4f5c\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u3092\u4f5c\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002 \u7279\u306b\u3001\u79fb\u52d5\u5e73\u5747\u7dda [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2653","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts\/2653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2653"}],"version-history":[{"count":111,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts\/2653\/revisions"}],"predecessor-version":[{"id":2816,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=\/wp\/v2\/posts\/2653\/revisions\/2816"}],"wp:attachment":[{"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trend-appsweb.com\/myportfolio\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}