커뮤니티

문의드립니다

프로필 이미지
새벽에
2020-04-27 10:59:21
1105
글번호 138364
답변완료

첨부 이미지

안녕하세요? 추세선에 관하여 2가지질문을 드리고싶습니다 . 수식에 지식이 적은 사람이오니 양해해주시기를 미리 당부드립니다. 감사합니다 1. 추세선이 몇번이고 변하다가 고점또는저점이 확인되어 고정추세선이 생기기까지는 일정봉갯수 이후이다 란걸 몇차례 여러분들에 대한 답변의 글을읽고 알게되었습니다 그렇다면 사진의 예처럼 확정된 추세선이 생기기전까지 몇차례고 갱신되며 예비추세선이 생겼던 흔적을 그봉에 1.2.3~숫자로써지게 된다면 가장좋고 그게안된다면? 점이나 또는 어떠한형식이든 표현할수있는 방법이있는지 궁금합니다 2.사진에서보면 현재봉의 전전봉에 가격의 차후변화에 따라 추세선의 모양이 어떻게 변할지? 모르지만, 예비추세선이 일단 만들어져서 눈으로 볼수있습니다 그렇다면 저렇게 예비추세선을 계산하여 만들어 보여주고있는 근거는 아래수식에서 어느부분인지 궁금합니다 ,혹시 plot1 ,plot2 가 아닌가? 생각되는데 만약 맞다면 plot1,plot2는 일정봉수이후 확인추세선이 생기기전(예비추세선포함)까지 계속 챠트에 형현되게 하여주는 기능을 하는것인가요? 항상 도움주심에 감사드립니다 Input:length(12); Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); For j = 0 To 9 { barArr[j] = barArr[j] + 1; } Condition1 = Highest(H,length) == H and lastHiVal <> H; Condition2 = Lowest(L,length) == L and lastLoVal <> L; If Condition1 Then lastHiVal = H; If Condition2 Then lastLoVal = L; turnPntBit = ""; If Condition1 and Condition2 Then { If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then turnPntBit = "HiLo"; Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi"; Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo"; } Else If Condition1 Then turnPntBit = "Hi"; Else If Condition2 Then turnPntBit = "Lo"; If turnPntBit <> "" Then { If turnPntBit == "HiLo" Then { valArr[1] = IFF(turnPntArr[1] == "Hi",H,L); barArr[1] = 0; TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); If turnPntArr[1] == "Hi" Then turnPntBit = "Lo"; Else turnPntBit = "Hi"; } If turnPntBit <> turnPntArr[1] Then { for j = 8 downto 1 { valArr[j+1] = valArr[j]; barArr[j+1] = barArr[j]; turnPntArr[j+1] = turnPntArr[j]; } } If turnPntBit <> turnPntArr[1] or (turnPntBit == turnPntArr[1] and ((turnPntBit == "Hi" and valArr[1] < H) or (turnPntBit == "Lo" and valArr[1] > L))) Then { valArr[1] = IFF(turnPntBit == "Hi",H,L); barArr[1] = 0; turnPntArr[1] = turnPntBit; If turnPntArr[1][1] <> turnPntArr[1][0] Then TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2], sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Else TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); } } TL_SetSize(TL1,4); TL_SetColor(TL1,YELLOW); Plot1(Highest(H,length)); Plot2(Lowest(L,length));
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-04-27 19:05:57

안녕하세요 예스스탁입니다. 1 plot3과 plot4를 점그래프로 지정하고 굵기를 조금 굵게 지정하셔서 보시면 됩니다. Input:length(12); Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); For j = 0 To 9 { barArr[j] = barArr[j] + 1; } Condition1 = Highest(H,length) == H and lastHiVal <> H; Condition2 = Lowest(L,length) == L and lastLoVal <> L; If Condition1 Then lastHiVal = H; If Condition2 Then lastLoVal = L; turnPntBit = ""; If Condition1 and Condition2 Then { If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then turnPntBit = "HiLo"; Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi"; Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo"; } Else If Condition1 Then turnPntBit = "Hi"; Else If Condition2 Then turnPntBit = "Lo"; If turnPntBit <> "" Then { If turnPntBit == "HiLo" Then { valArr[1] = IFF(turnPntArr[1] == "Hi",H,L); barArr[1] = 0; TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); If turnPntArr[1] == "Hi" Then turnPntBit = "Lo"; Else turnPntBit = "Hi"; } If turnPntBit <> turnPntArr[1] Then { for j = 8 downto 1 { valArr[j+1] = valArr[j]; barArr[j+1] = barArr[j]; turnPntArr[j+1] = turnPntArr[j]; } } If turnPntBit <> turnPntArr[1] or (turnPntBit == turnPntArr[1] and ((turnPntBit == "Hi" and valArr[1] < H) or (turnPntBit == "Lo" and valArr[1] > L))) Then { valArr[1] = IFF(turnPntBit == "Hi",H,L); barArr[1] = 0; turnPntArr[1] = turnPntBit; If turnPntArr[1][1] <> turnPntArr[1][0] Then { TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Plot3(H,"점1",MAGENTA); } Else { TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Plot4(H,"점2",CYAN); } } } TL_SetSize(TL1,4); TL_SetColor(TL1,YELLOW); Plot1(Highest(H,length)); Plot2(Lowest(L,length)); 2 예 length기간 최고가와 최저가가 기준입니다. length기간 최고가 발생이후 length기간 최저가 발생까지가 고점구간이고 length기간 최저가 발생이후 length기간 최고가 발생까지가 저점구간입니다. 즐거운 하루되세요 > 새벽에 님이 쓴 글입니다. > 제목 : 문의드립니다 > 안녕하세요? 추세선에 관하여 2가지질문을 드리고싶습니다 . 수식에 지식이 적은 사람이오니 양해해주시기를 미리 당부드립니다. 감사합니다 1. 추세선이 몇번이고 변하다가 고점또는저점이 확인되어 고정추세선이 생기기까지는 일정봉갯수 이후이다 란걸 몇차례 여러분들에 대한 답변의 글을읽고 알게되었습니다 그렇다면 사진의 예처럼 확정된 추세선이 생기기전까지 몇차례고 갱신되며 예비추세선이 생겼던 흔적을 그봉에 1.2.3~숫자로써지게 된다면 가장좋고 그게안된다면? 점이나 또는 어떠한형식이든 표현할수있는 방법이있는지 궁금합니다 2.사진에서보면 현재봉의 전전봉에 가격의 차후변화에 따라 추세선의 모양이 어떻게 변할지? 모르지만, 예비추세선이 일단 만들어져서 눈으로 볼수있습니다 그렇다면 저렇게 예비추세선을 계산하여 만들어 보여주고있는 근거는 아래수식에서 어느부분인지 궁금합니다 ,혹시 plot1 ,plot2 가 아닌가? 생각되는데 만약 맞다면 plot1,plot2는 일정봉수이후 확인추세선이 생기기전(예비추세선포함)까지 계속 챠트에 형현되게 하여주는 기능을 하는것인가요? 항상 도움주심에 감사드립니다 Input:length(12); Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); For j = 0 To 9 { barArr[j] = barArr[j] + 1; } Condition1 = Highest(H,length) == H and lastHiVal <> H; Condition2 = Lowest(L,length) == L and lastLoVal <> L; If Condition1 Then lastHiVal = H; If Condition2 Then lastLoVal = L; turnPntBit = ""; If Condition1 and Condition2 Then { If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then turnPntBit = "HiLo"; Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi"; Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo"; } Else If Condition1 Then turnPntBit = "Hi"; Else If Condition2 Then turnPntBit = "Lo"; If turnPntBit <> "" Then { If turnPntBit == "HiLo" Then { valArr[1] = IFF(turnPntArr[1] == "Hi",H,L); barArr[1] = 0; TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); If turnPntArr[1] == "Hi" Then turnPntBit = "Lo"; Else turnPntBit = "Hi"; } If turnPntBit <> turnPntArr[1] Then { for j = 8 downto 1 { valArr[j+1] = valArr[j]; barArr[j+1] = barArr[j]; turnPntArr[j+1] = turnPntArr[j]; } } If turnPntBit <> turnPntArr[1] or (turnPntBit == turnPntArr[1] and ((turnPntBit == "Hi" and valArr[1] < H) or (turnPntBit == "Lo" and valArr[1] > L))) Then { valArr[1] = IFF(turnPntBit == "Hi",H,L); barArr[1] = 0; turnPntArr[1] = turnPntBit; If turnPntArr[1][1] <> turnPntArr[1][0] Then TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2], sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Else TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); } } TL_SetSize(TL1,4); TL_SetColor(TL1,YELLOW); Plot1(Highest(H,length)); Plot2(Lowest(L,length));