カギ足ã«ã¤ã„ã¦ã§ã™ã€‚
 
カギ足ã¯å€¤å¹…ã®ä¸Šæ˜‡ãƒ»ä¸‹é™ã‚’1本ã®ç·šã§è¡¨ã—ãŸã‚‚ã®ã§ã€ä¸€å®šã®æ¯”率ã®é¨°è½ã€ä¸€å®šã®å€¤å¹…ã®é¨°è½ã«ã¦åž‚ç›´ã®ç·šãŒä¸Šã¸ä¼¸ã³ã‚‹ã‹ã€ä¸‹ã«ä¼¸ã³ã‚‹ã‹ã‚’æç”»ã—ã¾ã™ã€‚
通常ã€éžæ™‚ç³»åˆ—ã®æŒ‡æ¨™ã§ã€æ™‚é–“ã®çµŒéŽã¯é–¢ä¿‚ãªãレートã®å‹•ãã®ã¿ã«ã‚ˆã£ã¦æã‹ã‚Œã¾ã™ãŒã€è‡ªå‹•売買システムUGã«å®Ÿè£…ã•れã¦ã„る内容ã¯ã€Œæ™‚系列カギ足ã€ã§ã™ã®ã§ãれã«ã¤ã„ã¦æŽ²è¼‰ã—ã¾ã™ã€‚
 
 
>>計算
一定ã®å€¤å¹…ã¯å¤‰å‹•率Nを決定。
期間ã®ã¯ã˜ã‚ã®ãƒ¬ãƒ¼ãƒˆã‚’基点Xã¨ã™ã‚‹ã€‚
â—(A)基点Xã‹ã‚‰ä¸Šæ˜‡ã®å ´åˆã€€åŸºç‚¹Xã«ä¸Šæ˜‡å¾Œã®ãƒ¬ãƒ¼ãƒˆã‚’代入⇒Cã¸
â—(B)基点Xã‹ã‚‰ä¸‹é™ã®å ´åˆã€€åŸºç‚¹Xã«ä¸‹é™å¾Œã®ãƒ¬ãƒ¼ãƒˆã‚’代入⇒Dã¸
C)基点Xã‹ã‚‰å¤‰å‹•率Nã‚’è¶…ãˆã¦ä¸‹è½ã—ãŸå ´åˆã€ä¸‹è½å¾Œã®ãƒ¬ãƒ¼ãƒˆã‚’基点Xã¨ã—ã¦ï¼ˆA)ã¸
D)基点Xã‹ã‚‰å¤‰å‹•率Nã‚’è¶…ãˆã¦ä¸Šæ˜‡ã—ãŸå ´åˆã€ä¸Šæ˜‡å¾Œã®ãƒ¬ãƒ¼ãƒˆã‚’基点Xã¨ã—ã¦ï¼ˆB)ã¸
以下ã€ä¸Šè¨˜ã®ç¹°ã‚Šè¿”ã—。
 
ä¸Šè¨˜ã§æ±ºå®šã•れる基点Xã®å€¤ã‚’時間ã®çµŒéŽã‚’横軸ã¨ã—ãŸãƒãƒ£ãƒ¼ãƒˆã«è¡¨ç¤ºã™ã‚‹ã¨ã€æ™‚系列カギ足ã¨ãªã‚Šã€Cã€Dã®æ™‚ã«ã®ã¿æ¨ªè»¸ã®ãƒ¡ãƒ¢ãƒªã‚’ã²ã¨ã¤é€²ã¾ã›ã€åŸºç‚¹Xã‚’æç”»ã™ã‚‹ã¨ã€ã‚«ã‚®è¶³ã¨ãªã‚‹ã€‚
 
 
>>ãƒãƒ£ãƒ¼ãƒˆ

(時系列カギ足:転æ›å€¤å¹…0.3)
 

(åŒMACD化:12-24-5)
 
 
 
>>VBAコード
‘※ エクセルã®1列目(A列)ã«è¡Œç•ªå·ã€2列目(B列)ã«æ—¥æ™‚ã€
‘※ 3列目(C列)~6列目(F列)ã«å§‹å€¤ãƒ»é«˜å€¤ãƒ»å®‰å€¤ãƒ»çµ‚値
‘********************************
‘ tensyu :変動率ã‹å¤‰å‹•å¹…ã‹ï¼ˆ1=変動率%ã€0=変動幅通貨å˜ä½ï¼‰
‘ ten :変動率・変動幅
‘ num:ç¾åœ¨ã®è¡Œ
‘ cell_h:基点(HIGH)書ãè¾¼ã¿åˆ—
‘ cell_l:基点(LOW)書込ã¿åˆ—
‘ cell_tï¼šä¸Šæ˜‡ãƒ»ä¸‹é™æ›¸ãè¾¼ã¿åˆ—
‘ cell_key:時系列カギ足
‘********************************
high = .Worksheets(s_name)Cells(num, 4)
low = .Worksheets(s_name)Cells(num, 5)
If tensyu = 1 Then
   ten = ten / 100
Else
   ten = ten
End If
If num > 2 Then
 If Cells(num, cell_key) = “” Then Cells(num, cell_key) = Cells(num - 1, cell_key)
 If Cells(num, cell_t) = “” Then Cells(num, cell_t) = Cells(num - 1, cell_t)
 If Cells(num - 1, cell_t) = “” Then Cells(num, cell_t) = 0
 If Cells(num, cell_h) = “” And Cells(num - 1, cell_h) = “” Then
   If Cells(num, cell_t) = “” Or Cells(num, cell_t) = 0 Then
     Cells(num, cell_h) = high
   End If
 End If
 If Cells(num, cell_l) = “” And Cells(num - 1, cell_l) = “” Then
   If Cells(num, cell_t) = “” Or Cells(num, cell_t) = 0 Then
     Cells(num, cell_l) = low
   End If
 End If
 If Cells(num, cell_h) = “” And Cells(num - 1, cell_h) <> “” Then
   If Cells(num, cell_t) = 0 Or Cells(num, cell_t) = 1 Then
     Cells(num, cell_h) = Cells(num - 1, cell_h)
   End If
 End If
 If Cells(num, cell_l) = “” And Cells(num - 1, cell_l) <> “” Then
   If Cells(num, cell_t) = 0 Or Cells(num, cell_t) = -1 Then
     Cells(num, cell_l) = Cells(num - 1, cell_l)
   End If
 End If
 If Cells(num, cell_h) <> “” Then
   pH = Cells(num, cell_h)
   If high > pH Then
     Cells(num, cell_h) = high
     If Cells(num, cell_t) = 1 Then Cells(num, cell_key) = Cells(num, cell_h)
   End If
   If tensyu = 1 Then
     pH_lim = Cells(num, cell_h) - Cells(num, cell_h) * ten
   Else
     pH_lim = Cells(num, cell_h) - ten
   End If
 End If
 If Cells(num, cell_l) <> “” Then
   pl = Cells(num, cell_l)
   If low < pl Then
     Cells(num, cell_l) = low
     If Cells(num, cell_t) = -1 Then Cells(num, cell_key) = Cells(num, cell_l)
   End If
   If tensyu = 1 Then
     pL_lim = Cells(num, cell_l) + Cells(num, cell_l) * ten
   Else
     pL_lim = Cells(num, cell_l) + ten
   End If
 End If
  Â
 If num > 2 Then
   If high >= pL_lim Then
     If Cells(num, cell_t) = -1 Or Cells(num, cell_t) = 0 Then
       Cells(num, cell_h) = high
       Cells(num, cell_t) = 1
       Cells(num, cell_l) = “”
       Cells(num, cell_key) = Cells(num, cell_h)
     End If
   End If
   If low <= pH_lim Then
     If Cells(num, cell_t) = 1 Or Cells(num, cell_t) = 0 Then
       Cells(num, cell_l) = low
       Cells(num, cell_t) = -1
       Cells(num, cell_h) = “”
       Cells(num, cell_key) = Cells(num, cell_l)
     End If
   End If
 End If
End If
Â
     
Â
     
| <PR> |
 |
| <PR> |