{"id":2886,"date":"2009-04-01T10:44:19","date_gmt":"2009-04-01T01:44:19","guid":{"rendered":"http:\/\/www.ibi-square.jp\/blog\/?p=337"},"modified":"2023-05-13T16:18:10","modified_gmt":"2023-05-13T07:18:10","slug":"tech-calc-atr","status":"publish","type":"post","link":"https:\/\/atmtech.net\/main\/tech-calc-atr\/","title":{"rendered":"ATR\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>ATR\u306b\u3064\u3044\u3066\u3067\u3059\u3002\u8a08\u7b97\u5f0f\u3001\u30a8\u30af\u30bb\u30ebVBA\u3001\u30c1\u30e3\u30fc\u30c8\u3092\u63b2\u8f09\u3002<\/h1>\n<p>&nbsp;<\/p>\n<p>ATR\u306f\u3001\u30c8\u30ec\u30f3\u30c9\u306e\u6709\u7121\u3001\u76f8\u5834\u306e\u5927\u304d\u3055\u3001\u79fb\u52d5\u306e\u632f\u5e45\u3092\u8868\u3059\u6307\u6a19\u3067\u3001\u5024\u304c\u5927\u304d\u3044\u307b\u3069\u5927\u304d\u306a\u76f8\u5834\u3001\u9006\u306b\u5c0f\u3055\u3044\u5834\u5408\u306b\u306f\u76f8\u5834\u304c\u81a0\u7740\u72b6\u614b\u306b\u3042\u308b\u3053\u3068\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u79fb\u52d5\u5e73\u5747\u7dda\u3084MACD\u306a\u3069\u306e\u30c8\u30ec\u30f3\u30c9\u6307\u6a19\u306e\u3088\u3046\u306b\u3001\u76f8\u5834\u306e\u4e0a\u6607\u6642\u306b\u6307\u6a19\u306e\u5024\u304c\u4e0a\u304c\u308b\u3001\u76f8\u5834\u4e0b\u964d\u6642\u306b\u6307\u6a19\u306e\u5024\u304c\u4e0b\u304c\u308b\u3068\u3044\u3046\u30e9\u30a4\u30f3\u3067\u306f\u306a\u304f\u3001\u4e0a\u6607\u30fb\u4e0b\u964d\u306e\u5224\u65ad\u306f\u305b\u305a\u306b\u305d\u306e\u30c8\u30ec\u30f3\u30c9\u306e\u5927\u304d\u3055\u3001\u79fb\u52d5\u306e\u632f\u5e45\u306e\u307f\u3092\u30e9\u30a4\u30f3\u5316\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>ATR\u306e\u8a08\u7b97\u65b9\u6cd5\uff08N\u306f\u63a1\u7528\u672c\u6570\uff09<\/h2>\n<p>a\uff1a\u5f53\u8db3\uff08\u73fe\u5728\u306e\u30ed\u30a6\u30bd\u30af\u8db3\uff09\u306e\u9ad8\u5024\u3068\u5b89\u5024\u306e\u5024\u5e45<\/p>\n<p>b\uff1a\u76f4\u524d\u306e\u8db3\u306e\u7d42\u5024\u3068\u5f53\u8db3\u9ad8\u5024\u306e\u5024\u5e45\uff08\u7d76\u5bfe\u5024\uff09<\/p>\n<p>c\uff1a\u76f4\u524d\u306e\u8db3\u306e\u7d42\u5024\u3068\u5f53\u8db3\u5b89\u5024\u306e\u5024\u5e45\uff08\u7d76\u5bfe\u5024\uff09<\/p>\n<p>ATR=a,b,c\u306e\u3082\u3063\u3068\u3082\u5927\u304d\u3044\u3082\u306e\u306eN\u672c\u79fb\u52d5\u5e73\u5747\u7dda<\/p>\n<p>\u203b\u5404\u8db3\u3054\u3068\u306ba,b,c\u306e\u3046\u3061\u3082\u3063\u3068\u3082\u5927\u304d\u3044\u3082\u306e\u3092\u7b97\u51fa\u3057\u3001\u305d\u306e\u5024\u3092N\u672c\u5e73\u5747\u3059\u308b\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>ATR\u306e\u30c1\u30e3\u30fc\u30c8<\/h2>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/atmtech.net\/main\/tech\/atr1-1.JPG\" alt=\"\" width=\"460\" height=\"211\" \/><\/p>\n<p>(ATR\uff1a\u63a1\u7528\u672c\u657010\uff09<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/atmtech.net\/main\/tech\/atr1-2.JPG\" alt=\"\" width=\"462\" height=\"211\" \/><\/p>\n<p>(ATR\uff1a\u63a1\u7528\u672c\u657050\uff09<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>ATR\u306eVBA\u30b3\u30fc\u30c9<\/h2>\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; atr \uff1aATR\u306e\u63a1\u7528\u672c\u6570<br \/>\n&#8216; num\uff1a\u73fe\u5728\u306e\u884c<br \/>\n&#8216; r_now\uff1a\u73fe\u5728\u5024<br \/>\n&#8216; cell_max\uff1a\u6700\u5927\u5024\u66f8\u304d\u8fbc\u307f\u5217<br \/>\n&#8216; cell_atr\uff1aATR\u66f8\u304d\u8fbc\u307f\u5217<br \/>\n&#8216;********************************<br \/>\nIf num &gt;= 2 And .Cells(num &#8211; 1, 6) &lt;&gt; &#8220;&#8221; Then<br \/>\nmax_r1 = Cells(num, 4) &#8211; Cells(num, 5)<br \/>\nmax_r2 = Abs(Cells(num &#8211; 1, 6) &#8211; Cells(num, 4))<br \/>\nmax_r3 = Abs(Cells(num &#8211; 1, 6) &#8211; Cells(num, 5))<br \/>\nCells(num, cell_max) = Application.Max(max_r1, max_r2, max_r3)<br \/>\nEnd If<br \/>\nIf num &#8211; atr &gt;= 2 Then<br \/>\nCells(num, cell_atr) = Application.Average(Range(Cells(num &#8211; _<br \/>\n(atr &#8211; 1), cell_max), Cells(num, cell_max)))<br \/>\nEnd If<\/p>\n<p>&nbsp;<\/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; ATR\u306b\u3064\u3044\u3066\u3067\u3059\u3002\u8a08\u7b97\u5f0f\u3001\u30a8\u30af\u30bb\u30ebVBA\u3001\u30c1\u30e3\u30fc\u30c8\u3092\u63b2\u8f09\u3002 &nbsp; ATR\u306f\u3001\u30c8\u30ec\u30f3\u30c9\u306e\u6709\u7121\u3001\u76f8\u5834\u306e\u5927\u304d\u3055\u3001\u79fb\u52d5\u306e\u632f\u5e45\u3092\u8868\u3059\u6307\u6a19\u3067\u3001\u5024\u304c\u5927\u304d\u3044\u307b\u3069\u5927\u304d\u306a\u76f8\u5834\u3001\u9006\u306b\u5c0f\u3055\u3044\u5834\u5408\u306b\u306f\u76f8\u5834\u304c\u81a0\u7740\u72b6\u614b\u306b\u3042\u308b\u3053\u2026 <span class=\"read-more\"><a href=\"https:\/\/atmtech.net\/main\/tech-calc-atr\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":2887,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[30],"tags":[85,86,50,80,87,52,44],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/posts\/2886"}],"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=2886"}],"version-history":[{"count":5,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/posts\/2886\/revisions"}],"predecessor-version":[{"id":3854,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/posts\/2886\/revisions\/3854"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/media\/2887"}],"wp:attachment":[{"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/media?parent=2886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/categories?post=2886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmtech.net\/main\/wp-json\/wp\/v2\/tags?post=2886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}