{"id":2880,"date":"2009-03-04T10:00:16","date_gmt":"2009-03-04T01:00:16","guid":{"rendered":"http:\/\/www.ibi-square.jp\/blog\/?p=160"},"modified":"2023-05-13T16:18:30","modified_gmt":"2023-05-13T07:18:30","slug":"tech-calc-dmi","status":"publish","type":"post","link":"https:\/\/atmtech.net\/main\/tech-calc-dmi\/","title":{"rendered":"DMI(ADX\u30fbADXR)\uff08\u8a08\u7b97\u5f0f\u3001\u30c1\u30e3\u30fc\u30c8\u3001\u30a8\u30af\u30bb\u30ebVBA\u30b3\u30fc\u30c9\uff09\u30c6\u30af\u30cb\u30ab\u30eb\u6307\u6a19"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h1>DMI(ADX\u30fbADXR)\u306b\u3064\u3044\u3066\u3067\u3059\u3002\u8a08\u7b97\u5f0f\u3001\u30a8\u30af\u30bb\u30ebVBA\u30b3\u30fc\u30c9\u3001\u30c1\u30e3\u30fc\u30c8\u3092\u63b2\u8f09<\/h1>\n<p>&nbsp;<\/p>\n<p>DMI\u306fDirectional Movment Index\u306e\u7565\u3067\u3001\u76f8\u5834\u306b\u30c8\u30ec\u30f3\u30c9\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u3001\u3069\u306e\u7a0b\u5ea6\u65b9\u5411\u6027\u3092\u6301\u3063\u3066\u3044\u308b\u304b\u3092\u8868\u3059\u6307\u6a19\u3067\u3001\u30ed\u30a6\u30bd\u30af\u8db3\u306e\u306f\u3089\u307f\u7dda\u306e\u5224\u65ad\u306a\u3069\u3082\u4f7f\u7528\u3057\u3066\u8a08\u7b97\u3055\u308c\u3001\u00b1DI\u3001ADX\u3001ADXR\u306e4\u672c\u306e\u7dda\u304b\u3089\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><\/h2>\n<h2>DMI(ADX\u30fbADXR)\u306e\u8a08\u7b97\u5f0f<\/h2>\n<h2><\/h2>\n<p>\u306f\u3089\u307f\u7dda\u306e\u5834\u5408\u3000+DM=0\u3000-DM=0<\/p>\n<p>\u306f\u3089\u307f\u7dda\u4ee5\u5916\u3000\u25cb\u73fe\u5728\u306e\u9ad8\u5024-\u76f4\u524d\u306e\u9ad8\u5024\u3000\uff1e\u3000\u76f4\u524d\u306e\u5b89\u5024-\u73fe\u5728\u306e\u5b89\u5024\u3000\u306a\u3089<\/p>\n<p>+DM=\u73fe\u5728\u306e\u9ad8\u5024-\u76f4\u524d\u306e\u9ad8\u5024<\/p>\n<p>-DM=0<\/p>\n<p>\u25cb\u73fe\u5728\u306e\u9ad8\u5024-\u76f4\u524d\u306e\u9ad8\u5024\u3000\uff1c\u3000\u76f4\u524d\u306e\u5b89\u5024-\u73fe\u5728\u306e\u5b89\u5024\u3000\u306a\u3089<\/p>\n<p>+DM=0<\/p>\n<p>-DM=\u76f4\u524d\u306e\u5b89\u5024-\u73fe\u5728\u306e\u5b89\u5024<\/p>\n<p>\u25cb\u73fe\u5728\u306e\u9ad8\u5024-\u76f4\u524d\u306e\u9ad8\u5024\u3000\uff1d\u3000\u76f4\u524d\u306e\u5b89\u5024-\u73fe\u5728\u306e\u5b89\u5024\u3000\u306a\u3089<\/p>\n<p>+DM=0<\/p>\n<p>-DM=0<\/p>\n<p>tr\u3000=\u3000\u73fe\u5728\u306e\u9ad8\u5024-\u73fe\u5728\u306e\u5b89\u5024\u3001\u73fe\u5728\u306e\u9ad8\u5024-\u76f4\u524d\u7d42\u5024\u3001\u76f4\u524d\u306e\u7d42\u5024-\u73fe\u5728\u306e\u7d42\u5024\u306e\u3046\u3061\u4e00\u756a\u5927\u304d\u3044\u3082\u306e<\/p>\n<p>+DI = \u904e\u53bbX\u672c\u306e+DM\u306e\u5e73\u5747\/\u904e\u53bbX\u672c\u306etr\u306e\u5e73\u5747<\/p>\n<p>-DI = \u904e\u53bbX\u672c\u306e-DM\u306e\u5e73\u5747\/\u904e\u53bbX\u672c\u306etr\u306e\u5e73\u5747<\/p>\n<p>ADX = DX\u306eX\u672c\u5358\u7d14\u5e73\u5747<\/p>\n<p>ADXR = DX\u306e2X \u672c\u5358\u7d14\u79fb\u52d5\u5e73\u5747<\/p>\n<p>\u203bDX = |+DI-(-DI)| \/ |+DI+(-DI)|\u3000\u3000\uff08|\uff65\uff65\uff65|\u306f\u7d76\u5bfe\u5024\uff09<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>DMI(ADX\u30fbADXR)\u306e\u5224\u65ad<\/h2>\n<p>&nbsp;<\/p>\n<p>ADX,ADXR\u306f\u30c8\u30ec\u30f3\u30c9\u306e\u5927\u304d\u3055\u30011\u65b9\u5411\u3078\u306e\u79fb\u52d5\u306e\u5927\u304d\u3055\u3092\u8868\u3057\u3001\u00b1DI\u306f\u4e0a\u6607\u65b9\u5411\u3001\u4e0b\u964d\u65b9\u5411\u3078\u306e\u30c8\u30ec\u30f3\u30c9\u306e\u5f37\u3055\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>\u76f8\u5834\u306e\u4e0a\u6607\u6642\u306f\u3001+DI\u306f\u4e0a\u6607\u3001ADX\u3001ADXR\u306f\u305d\u306e\u4e0a\u6607\u306e\u52e2\u3044\u3068\u6bd4\u4f8b\u3057\u3001-DI\u306f\u4e0b\u964d\u3001\u4e0b\u964d\u6642\u306f-DI\u304c\u4e0a\u6607\u3057ADX\u3001ADXR\u306f\u305d\u306e\u4e0b\u964d\u306e\u52e2\u3044\u3068\u6bd4\u4f8b\u3057\u3001+DI\u306f\u4e0b\u964d\u3059\u308b\u3068\u3044\u3046\u5f62\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u58f2\u8cb7\u306e\u5224\u65ad\u3068\u3057\u3066\u306f\u3001+DI\u3068-DI\u306e\u30b4\u30fc\u30eb\u30c7\u30f3\u30af\u30ed\u30b9\u3067\u8cb7\u3044\u3001\u30c7\u30c3\u30c9\u30af\u30ed\u30b9\u3067\u58f2\u308a\u3001\u307e\u305f\u306f\u30af\u30ed\u30b9\u5f8c\u3001\u4e0b\u964d\u4e2d\u306e\u00b1DI\u3068ADX\u3084ADXR\u3068\u306e\u30af\u30ed\u30b9\u306b\u3066\u3088\u308a\u6b63\u78ba\u306a\u30dd\u30a4\u30f3\u30c8\u3092\u63a2\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>DMI(ADX\u30fbADXR)\u306e\u30c1\u30e3\u30fc\u30c8<\/h2>\n<p>&nbsp;<\/p>\n<p>&lt;\u3000\u00b1DI:14\u3000ADX:9\u3000ADXR:9\u3000&gt;<\/p>\n<p><img loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/atmtech.net\/main\/tech\/dmi1.JPG\" alt=\"\" width=\"462\" height=\"238\" \/><\/p>\n<p>\uff08\u6c34\u8272:+DI\u3000\u8d64:-DI\u3000\u9ec4\u8272:ADX\u3000\u7dd1:ADXR\uff09<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;\u3000\u00b1DI:26\u3000ADX:31\u3000ADXR:31\u3000&gt;<\/p>\n<p><img loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/atmtech.net\/main\/tech\/dmi2.JPG\" alt=\"\" width=\"462\" height=\"238\" \/><\/p>\n<p>\uff08\u6c34\u8272:+DI\u3000\u8d64:-DI\u3000\u9ec4\u8272:ADX\u3000\u7dd1:ADXR\uff09<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>DMI(ADX\u30fbADXR)\u306e\u30a8\u30af\u30bb\u30ebVBA\u30b3\u30fc\u30c9<\/h2>\n<p>&nbsp;<\/p>\n<p>&#8216;\u203b\u3000\u30a8\u30af\u30bb\u30eb\u306e1\u5217\u76ee(A\u5217)\u306b\u884c\u756a\u53f7\u30012\u5217\u76ee(B\u5217)\u306b\u65e5\u6642\u3001<br \/>\n&#8216;\u203b\u30003\u5217\u76ee(C\u5217)\uff5e6\u5217\u76ee(F\u5217)\u306b\u59cb\u5024\u30fb\u9ad8\u5024\u30fb\u5b89\u5024\u30fb\u7d42\u5024<br \/>\n&#8216;********************************<br \/>\n&#8216; di \uff1a\u00b1DI\u306e\u63a1\u7528\u672c\u6570<br \/>\n&#8216; adx \uff1aADX\u306e\u63a1\u7528\u672c\u6570<br \/>\n&#8216; adxr \uff1aADXR\u306e\u63a1\u7528\u672c\u6570<br \/>\n&#8216; num\uff1a\u73fe\u5728\u306e\u884c<br \/>\n&#8216; cell_dmp\uff1a+DM\u8a08\u7b97\u5024\u66f8\u8fbc\u307f\u5217<br \/>\n&#8216; cell_dmm\uff1a-DM\u8a08\u7b97\u5024\u66f8\u8fbc\u307f\u5217<br \/>\n&#8216; cell_tr\uff1atr\u8a08\u7b97\u5024\u66f8\u8fbc\u307f\u5217<br \/>\n&#8216; cell_dip\uff1a+DI\u8a08\u7b97\u5024\u66f8\u8fbc\u307f\u5217<br \/>\n&#8216; cell_dim\uff1a-DI\u8a08\u7b97\u5024\u66f8\u8fbc\u307f\u5217<br \/>\n&#8216; cell_dx\uff1aDX\u8a08\u7b97\u5024\u66f8\u8fbc\u307f\u5217<br \/>\n&#8216; cell_adx\uff1aADX\u8a08\u7b97\u5024\u66f8\u8fbc\u307f\u5217<br \/>\n&#8216; cell_adxr\uff1aADXR\u8a08\u7b97\u5024\u66f8\u8fbc\u307f\u5217<br \/>\n&#8216;********************************<\/p>\n<p>If Cells(num &#8211; 1, 4) &lt; Cells(num, 4) Then<br \/>\nf1 = Cells(num, 4) &#8211; Cells(num &#8211; 1, 4)<br \/>\nElse<br \/>\nf1 = 0<br \/>\nEnd If<\/p>\n<p>If Cells(num &#8211; 1, 5) &gt; Cells(num, 5) Then<br \/>\nf2 = Abs(Cells(num, 5) &#8211; Cells(num &#8211; 1, 5))<br \/>\nElse<br \/>\nf2 = 0<br \/>\nEnd If<\/p>\n<p>If f1 &lt; f2 Then Cells(num, cell_dmp) = 0 Else Cells(num, cell_dmp) = f1<br \/>\nIf f1 &gt; f2 Then Cells(num, cell_dmm) = 0 Else Cells(num, cell_dmm) = f2<\/p>\n<p>Cells(num, cell_tr) = Application.Max(Cells(num, 4) &#8211; Cells(num, 5), _<br \/>\nCells(num, 4) &#8211; Cells(num &#8211; 1, 6), Cells(num &#8211; 1, 6) _<br \/>\n&#8211; Cells(num, 5))<\/p>\n<p>If num &lt; 2 + di Then GoTo offend<\/p>\n<p>adip = Application.Average(Range(Cells(num &#8211; (di &#8211; 1), cell_dmp), _<br \/>\nCells(num, cell_dmp)))<br \/>\nadim = Application.Average(Range(Cells(num &#8211; (di &#8211; 1), cell_dmm), _<br \/>\nCells(num, cell_dmm)))<br \/>\natr = Application.Average(Range(Cells(num &#8211; (di &#8211; 1), cell_tr), _<br \/>\nCells(num, cell_tr)))<br \/>\nCells(num, cell_dip) = adip \/ atr * 100<br \/>\nCells(num, cell_dim) = adim \/ atr * 100<br \/>\nCells(num, cell_dx) = Abs(Cells(num, cell_dip) &#8211; Cells(num, cell_dim)) _<br \/>\n\/ (Cells(num, cell_dip) + Cells(num, cell_dim)) * 100<\/p>\n<p>If num &lt; 2 + di + adx Then Exit Sub<br \/>\nCells(num, cell_adx) = Application.Average _<br \/>\n(Range(Cells(num &#8211; (adx &#8211; 1), cell_dx), Cells(num, cell_dx)))<\/p>\n<p>If num &lt; 2 + di + adx + adxr Then Exit Sub<br \/>\nCells(num, cell_adxr) = (Cells(num &#8211; (adxr &#8211; 1), cell_adx) + _<br \/>\nCells(num, cell_adx)) \/ 2<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/atmtech.net\/main\/?cat=30\" target=\"_blank\" rel=\"noopener\">\u30c6\u30af\u30cb\u30ab\u30eb\u6307\u6a19\u4e00\u89a7<\/a><\/p>\n<p><a href=\"https:\/\/atmtech.net\/main\/?cat=109\" target=\"_blank\" rel=\"noopener\">\u7f6b\u7dda\u8ac7\u7fa9\u4e00\u89a7<\/a><\/p>\n<p>(\u5916\u90e8\u30ea\u30f3\u30af)<a href=\"https:\/\/ja.wikipedia.org\/wiki\/%E3%83%86%E3%82%AF%E3%83%8B%E3%82%AB%E3%83%AB%E6%8C%87%E6%A8%99%E4%B8%80%E8%A6%A7\" target=\"_blank\" rel=\"noopener\">\u30c6\u30af\u30cb\u30ab\u30eb\u6307\u6a19(Wikipedia)<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; DMI(ADX\u30fbADXR)\u306b\u3064\u3044\u3066\u3067\u3059\u3002\u8a08\u7b97\u5f0f\u3001\u30a8\u30af\u30bb\u30ebVBA\u30b3\u30fc\u30c9\u3001\u30c1\u30e3\u30fc\u30c8\u3092\u63b2\u8f09 &nbsp; DMI\u306fDirectional Movment Index\u306e\u7565\u3067\u3001\u76f8\u5834\u306b\u30c8\u30ec\u30f3\u30c9\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u3001\u3069\u306e\u7a0b\u5ea6\u65b9\u2026 <span class=\"read-more\"><a href=\"https:\/\/atmtech.net\/main\/tech-calc-dmi\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":2881,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[30],"tags":[75,76,77,40,50,80,17,78,44],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/posts\/2880"}],"collection":[{"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/comments?post=2880"}],"version-history":[{"count":5,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/posts\/2880\/revisions"}],"predecessor-version":[{"id":3857,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/posts\/2880\/revisions\/3857"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/media\/2881"}],"wp:attachment":[{"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/media?parent=2880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/categories?post=2880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/tags?post=2880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}