{"id":544,"date":"2017-09-18T09:19:50","date_gmt":"2017-09-18T00:19:50","guid":{"rendered":"https:\/\/www.dogrow.net\/fx\/?p=544"},"modified":"2017-09-26T01:37:19","modified_gmt":"2017-09-25T16:37:19","slug":"blog16","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/fx\/blog16\/","title":{"rendered":"(16) \u3010MT4\u3011 \u30d2\u30b9\u30c8\u30ea\u30ab\u30eb\u30c7\u30fc\u30bf\uff08hst\u30d5\u30a1\u30a4\u30eb\uff09\u30d5\u30a9\u30fc\u30de\u30c3\u30c8"},"content":{"rendered":"<h1 class=\"my_h\">(1) hst\u30d5\u30a1\u30a4\u30eb\u30d5\u30a9\u30fc\u30de\u30c3\u30c8<\/h1>\n<p>MT4\u306e\u30d2\u30b9\u30c8\u30ea\u30ab\u30eb\u30c7\u30fc\u30bf\u306f hst\u306a\u308b\u72ec\u81ea\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u3002<br \/>\nhst\u306f\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308a\u3001\u30e1\u30e2\u5e33\u306a\u3069\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u4e2d\u8eab\u3092\u958b\u3044\u3066\u898b\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u3002<\/p>\n<p>\u3053\u3061\u3089\u306b\u30d5\u30a1\u30a4\u30eb\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u8a73\u7d30\u304c\u66f8\u304b\u308c\u3066\u3044\u308b\u3002<br \/>\n<a href=\"https:\/\/www.mql5.com\/en\/forum\/149178\" target=\"_blank\">MQL5: .hst file format . . . Old and New (Jan 2014)<br \/>\n<img decoding=\"async\" class=\"my_mgA_p5rem my_border_1px\" src=\"https:\/\/www.dogrow.net\/fx\/wp-content\/uploads\/2017\/09\/Image2-8.png\" alt=\"\" \/><\/a><\/p>\n<p>\u65b0\u65e7\u4e21\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u5dee\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3002<br \/>\n\u76f8\u9055\u70b91: \u30d8\u30c3\u30c0\u90e8\u5148\u982d4\u30d0\u30a4\u30c8\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u304c\u7570\u306a\u308b\u3002\uff08\u65b0\u306f401, \u65e7\u306f400\uff09<br \/>\n\u76f8\u9055\u70b92: \u65b0\u306f\u5404BAR\u30c7\u30fc\u30bf\u306e\u672b\u7aef\u306bSpread\u3068Volume\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3002\u65e7\u306b\u306f\u3053\u308c\u304c\u7121\u3044\u3002<br \/>\n\u76f8\u9055\u70b93: \u65b0\u306fvolume\u304c\u6574\u6570\u5024\u3067\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3002\u65e7\u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u5024\u3067\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<p>\u3082\u3057 hst \u2192 csv\u30b3\u30f3\u30d0\u30fc\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308b\u5834\u5408\u306f\u4e0a\u8a183\u70b9\u3092\u6ce8\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304c\u3001<br \/>\n\u305f\u3060\u5358\u306b \u300c\u3053\u306e\u30c7\u30fc\u30bf\u306f\u65b0\u65e7\u3069\u3063\u3061\u3060\u308d\u3046\uff1f\u300d \u3068\u78ba\u8a8d\u3057\u305f\u3044\u5834\u5408\u306f \u300c\u76f8\u9055\u70b91\u300d \u306e\u307f\u3092\u898b\u308c\u3070\u3088\u3044\u3002<\/p>\n<h1 class=\"my_h\">(2) \u65b0 or \u65e7\u3092\u78ba\u8a8d<\/h1>\n<p>\u300c<a href=\"https:\/\/www.dogrow.net\/fx\/blog2\/\">(2) \u904e\u53bb\u30c7\u30fc\u30bf\u306e\u53ce\u96c6<\/a>\u300d \u3067\u53d6\u5f97\u3057\u305f\u30d2\u30b9\u30c8\u30ea\u30ab\u30eb\u30c7\u30fc\u30bf\u306f\u3069\u3063\u3061\u3060\u308d\u3046\uff1f<br \/>\n\u307e\u3041MetaTrader5\u3067\u30ed\u30fc\u30c9\u3057\u305f\u3068\u304d\u306b Spread\u304c\u5165\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u304b\u3089\u65e7\u306a\u306e\u306f\u660e\u3089\u304b\u306a\u306e\u3060\u304c\u3002<\/p>\n<p>\u7c21\u5358\u306aPython\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u30d5\u30a1\u30a4\u30eb\u5148\u982d4\u30d0\u30a4\u30c8\u3092\u8997\u3044\u3066\u307f\u308b\u3002<\/p>\n<pre class=\"brush: python; class-name: &#039;my_border_1px&#039;; gutter: false; title: ; notranslate\" title=\"\">\r\n&gt;&gt;&gt; import struct\r\n&gt;&gt;&gt; fh = open(&quot;USDJPY.hst&quot;, &quot;rb&quot;)\r\n&gt;&gt;&gt; struct.unpack(&quot;I&quot;,fh.read(4))\r\n(400,)\r\n<\/pre>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7400\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u65e7\u30d0\u30fc\u30b8\u30e7\u30f3\u306e hst\u30d5\u30a1\u30a4\u30eb\u3060\u3068\u78ba\u8a8d\u3067\u304d\u305f\u3002<\/p>\n<h1 class=\"my_h\">(3) \u4e00\u5fdc\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u3066\u304a\u304f<\/h1>\n<p>\u3082\u3057\u304b\u3057\u305f\u3089\u4eca\u5f8c hst to csv\u30b3\u30f3\u30d0\u30fc\u30bf\u3092\u4f5c\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u306e\u3067\u3001\u65b0\u65e7\u5224\u5b9a\u7528\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u3066\u304a\u304f\u3002<\/p>\n<h3 class=\"my_h\">judge_hst_version.py<\/h3>\n<pre class=\"brush: python; class-name: &#039;my_border_syntaxhighlighter&#039;; title: ; notranslate\" title=\"\">\r\nimport argparse\r\nimport struct\r\n\r\ndef main():\r\n    parser = argparse.ArgumentParser()\r\n    parser.add_argument('-f','--fname', required=True)\r\n    args = parser.parse_args()\r\n    #------------------------------\r\n    fh = open(args.fname, &quot;rb&quot;)\r\n    v = struct.unpack(&quot;I&quot;, fh.read(4))\r\n    fh.close()\r\n    #------------------------------\r\n    if v&#x5B;0] &lt;= 400:\r\n        print(&quot;Old version&quot;)\r\n    else:\r\n        print(&quot;New version&quot;)\r\n\r\nif __name__==&quot;__main__&quot;: main()\r\n<\/pre>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u306e\u4f7f\u3044\u65b9\u306f\u3053\u3046\u3002<br \/>\n-f \u30aa\u30d7\u30b7\u30e7\u30f3\u3067hst\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre my_mgB_2rem\">\r\n[user@linux]$ python judge_hst_version.py -f USDJPY.hst\r\nOld version\r\n<\/pre>\n<p>\u4eca\u5f8c\u8907\u6570\u7a2e\u985e\u306e\u901a\u8ca8\u30da\u30a2\u306e\u30d2\u30b9\u30c8\u30ea\u30ab\u30eb\u30c7\u30fc\u30bf\u3092\u9ad8\u983b\u5ea6\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3088\u3046\u306a\u72b6\u6cc1\u306b\u306a\u308c\u3070\u3001\u30b3\u30f3\u30d0\u30fc\u30bf\u3092\u4f5c\u308b\u3053\u3068\u306b\u306a\u308b\u306f\u305a\u3002\u3056\u3063\u3068\u30b0\u30b0\u3063\u305f\u3089\u6d77\u5916\u30b5\u30a4\u30c8\u306b\u3042\u3063\u305f\u306e\u3067\u305d\u308c\u3092\u4f7f\u308f\u305b\u3066\u3044\u305f\u3060\u304f\u304b\u3082\u3057\u308c\u306a\u3044\u3002\u3067\u3082\u4f5c\u308b\u304b\u3082\u3002<\/p>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>(1) hst\u30d5\u30a1\u30a4\u30eb\u30d5\u30a9\u30fc\u30de\u30c3\u30c8 MT4\u306e\u30d2\u30b9\u30c8\u30ea\u30ab\u30eb\u30c7\u30fc\u30bf\u306f hst\u306a\u308b\u72ec\u81ea\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u3002 hst\u306f\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308a\u3001\u30e1\u30e2\u5e33\u306a\u3069\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u4e2d\u8eab\u3092\u958b\u3044\u3066\u898b\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u3002 \u3053\u3061\u3089\u306b\u30d5\u30a1\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/fx\/blog16\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,5],"tags":[],"class_list":["post-544","post","type-post","status-publish","format-standard","hentry","category-metatrader4","category-5"],"views":9542,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/fx\/wp-json\/wp\/v2\/posts\/544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/fx\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/fx\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/fx\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/fx\/wp-json\/wp\/v2\/comments?post=544"}],"version-history":[{"count":22,"href":"https:\/\/www.dogrow.net\/fx\/wp-json\/wp\/v2\/posts\/544\/revisions"}],"predecessor-version":[{"id":568,"href":"https:\/\/www.dogrow.net\/fx\/wp-json\/wp\/v2\/posts\/544\/revisions\/568"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/fx\/wp-json\/wp\/v2\/media?parent=544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/fx\/wp-json\/wp\/v2\/categories?post=544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/fx\/wp-json\/wp\/v2\/tags?post=544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}