커뮤니티

추세선

프로필 이미지
외국인
2022-09-17 15:45:30
1438
글번호 162264
답변완료

첨부 이미지

Input:length(3),선굵기(1); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),처리구분(""), TL_Val1(0),TL_Val2(0); var : T(0),LTL1(0); var : HTL1(0); Array:고점[10,2](0),저점[10,2](0); 처리구분 = ""; If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If 저점[1,1] > L Then 처리구분 = "저점처리"; If 고점[1,1] < H Then 처리구분 = "고점처리"; } Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리"; Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { T = 1; lastHiVal = H; If 고점[1,2] < 저점[1,2] Then { For j = 10 DownTo 2 { 고점[j,1] = 고점[j-1,1]; 고점[j,2] = 고점[j-1,2]; } } If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then { 고점[1,1] = H; 고점[1,2] = Index; sBar = Index - 저점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); } if T[1] != 1 Then{ TL_SetExtRight(LTL1,False); TL_Delete(LTL1); LTL1 = TL_New(sDate[index-저점[2,2]],sTime[index-저점[2,2]],저점[2,1],sDate[index-저점[1,2]],sTime[index-저점[1,2]],저점[1,1]); // TL_SetExtRight(LTL1,true); } If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then { sBar = Index - 저점[2,2]; eBar = Index - 저점[1,2]; } } } If 처리구분 == "저점처리" Then { T = -1; lastLoVal = L; If 저점[1,2] < 고점[1,2] Then { For j = 10 DownTo 2 { 저점[j,1] = 저점[j-1,1]; 저점[j,2] = 저점[j-1,2]; } } If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then { 저점[1,1] = L; 저점[1,2] = Index; sBar = Index - 고점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); } if T[1] != -1 then{ TL_SetExtRight(HTL1,false); TL_Delete(HTL1); HTL1 = TL_New(sDate[index-고점[2,2]],sTime[index-고점[2,2]],고점[2,1],sDate[index-고점[1,2]],sTime[index-고점[1,2]],고점[1,1]); TL_SetExtRight(HTL1,true); } If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then { sBar = Index - 고점[2,2]; eBar = Index - 고점[1,2]; } } } TL_SetSize(TL1,선굵기); TL_SetColor(TL1,BLACK); TL_SetColor(LTL1,green); TL_SetColor(HTL1,red); TL_SetSize(LTL1,선굵기); TL_SetSize(HTL1,선굵기); Input:blength(20); Var:bj(0),blastHiVal(0),blasbTLoVal(0),sbBar(0),ebBar(0),bTL1(0),b처리구분(""), bTL_Val1(0),bTL_Val2(0); var : bT(0),LbTL1(0); var : HbTL1(0); Array:b고점[10,2](0),b저점[10,2](0); b처리구분 = ""; If Highest(H,blength) == H and blastHiVal <> H and Lowest(L,blength) == L and blasbTLoVal <> L Then { If b저점[1,1] > L Then b처리구분 = "b저점처리"; If b고점[1,1] < H Then b처리구분 = "b고점처리"; } Else If Highest(H,blength) == H and blastHiVal <> H Then b처리구분 = "b고점처리"; Else If Lowest(L,blength) == L and blasbTLoVal <> L Then b처리구분 = "b저점처리"; If b처리구분 == "b고점처리" Then { bT = 1; blastHiVal = H; If b고점[1,2] < b저점[1,2] Then { For bj = 10 DownTo 2 { b고점[bj,1] = b고점[bj-1,1]; b고점[bj,2] = b고점[bj-1,2]; } } If b고점[1,2] < b저점[1,2] or b고점[1,1] < H Then { b고점[1,1] = H; b고점[1,2] = Index; sbBar = Index - b저점[1,2]; ebBar = 0; If TL_GetBeginDate(bTL1) == sDate[sbBar] and TL_GetBeginTime(bTL1) == sTime[sbBar] Then { TL_Delete(bTL1); } if bT[1] != 1 Then{ TL_SetExtRight(LbTL1,False); TL_Delete(LbTL1); LbTL1 = TL_New(sDate[index-b저점[2,2]],sTime[index-b저점[2,2]],b저점[2,1],sDate[index-b저점[1,2]],sTime[index-b저점[1,2]],b저점[1,1]); // TL_SetExtRight(LbTL1,true); } If b고점[3,1] < b고점[2,1] and b고점[2,1] > b고점[1,1] and b저점[2,1] < b저점[1,1] Then { sbBar = Index - b저점[2,2]; ebBar = Index - b저점[1,2]; } } } If b처리구분 == "b저점처리" Then { bT = -1; blasbTLoVal = L; If b저점[1,2] < b고점[1,2] Then { For bj = 10 DownTo 2 { b저점[bj,1] = b저점[bj-1,1]; b저점[bj,2] = b저점[bj-1,2]; } } If b저점[1,2] < b고점[1,2] or b저점[1,1] > L Then { b저점[1,1] = L; b저점[1,2] = Index; sbBar = Index - b고점[1,2]; ebBar = 0; If TL_GetBeginDate(bTL1) == sDate[sbBar] and TL_GetBeginTime(bTL1) == sTime[sbBar] Then { TL_Delete(bTL1); } if bT[1] != -1 then{ TL_SetExtRight(HbTL1,false); TL_Delete(HbTL1); HbTL1 = TL_New(sDate[index-b고점[2,2]],sTime[index-b고점[2,2]],b고점[2,1],sDate[index-b고점[1,2]],sTime[index-b고점[1,2]],b고점[1,1]); TL_SetExtRight(HbTL1,true); } If b저점[2,1] < b저점[1,1] and b저점[2,1] < b저점[3,1] and b고점[2,1] > b고점[1,1] Then { sbBar = Index - b고점[2,2]; ebBar = Index - b고점[1,2]; } } } TL_SetSize(bTL1,선굵기); TL_SetColor(bTL1,BLACK); TL_SetColor(LbTL1,darkgreen); TL_SetColor(HbTL1,darkred); TL_SetSize(LbTL1,선굵기); TL_SetSize(HbTL1,선굵기);
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-09-19 10:59:03

안녕하세요 예스스탁입니다. 문의하신 내용은 가능하지 않습니다. 해당 추세선은 Y축의 오른쪽 여백에 연장되어 표시되는 선인데 해당 영역에는 위치를 잡아 점등으로 표시를 할 수 없습니다. 도움을 드리지 못해 죄송합니다. 즐거운 하루되세요 > 외국인 님이 쓴 글입니다. > 제목 : 추세선 > Input:length(3),선굵기(1); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),처리구분(""), TL_Val1(0),TL_Val2(0); var : T(0),LTL1(0); var : HTL1(0); Array:고점[10,2](0),저점[10,2](0); 처리구분 = ""; If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If 저점[1,1] > L Then 처리구분 = "저점처리"; If 고점[1,1] < H Then 처리구분 = "고점처리"; } Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리"; Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { T = 1; lastHiVal = H; If 고점[1,2] < 저점[1,2] Then { For j = 10 DownTo 2 { 고점[j,1] = 고점[j-1,1]; 고점[j,2] = 고점[j-1,2]; } } If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then { 고점[1,1] = H; 고점[1,2] = Index; sBar = Index - 저점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); } if T[1] != 1 Then{ TL_SetExtRight(LTL1,False); TL_Delete(LTL1); LTL1 = TL_New(sDate[index-저점[2,2]],sTime[index-저점[2,2]],저점[2,1],sDate[index-저점[1,2]],sTime[index-저점[1,2]],저점[1,1]); // TL_SetExtRight(LTL1,true); } If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then { sBar = Index - 저점[2,2]; eBar = Index - 저점[1,2]; } } } If 처리구분 == "저점처리" Then { T = -1; lastLoVal = L; If 저점[1,2] < 고점[1,2] Then { For j = 10 DownTo 2 { 저점[j,1] = 저점[j-1,1]; 저점[j,2] = 저점[j-1,2]; } } If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then { 저점[1,1] = L; 저점[1,2] = Index; sBar = Index - 고점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); } if T[1] != -1 then{ TL_SetExtRight(HTL1,false); TL_Delete(HTL1); HTL1 = TL_New(sDate[index-고점[2,2]],sTime[index-고점[2,2]],고점[2,1],sDate[index-고점[1,2]],sTime[index-고점[1,2]],고점[1,1]); TL_SetExtRight(HTL1,true); } If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then { sBar = Index - 고점[2,2]; eBar = Index - 고점[1,2]; } } } TL_SetSize(TL1,선굵기); TL_SetColor(TL1,BLACK); TL_SetColor(LTL1,green); TL_SetColor(HTL1,red); TL_SetSize(LTL1,선굵기); TL_SetSize(HTL1,선굵기); Input:blength(20); Var:bj(0),blastHiVal(0),blasbTLoVal(0),sbBar(0),ebBar(0),bTL1(0),b처리구분(""), bTL_Val1(0),bTL_Val2(0); var : bT(0),LbTL1(0); var : HbTL1(0); Array:b고점[10,2](0),b저점[10,2](0); b처리구분 = ""; If Highest(H,blength) == H and blastHiVal <> H and Lowest(L,blength) == L and blasbTLoVal <> L Then { If b저점[1,1] > L Then b처리구분 = "b저점처리"; If b고점[1,1] < H Then b처리구분 = "b고점처리"; } Else If Highest(H,blength) == H and blastHiVal <> H Then b처리구분 = "b고점처리"; Else If Lowest(L,blength) == L and blasbTLoVal <> L Then b처리구분 = "b저점처리"; If b처리구분 == "b고점처리" Then { bT = 1; blastHiVal = H; If b고점[1,2] < b저점[1,2] Then { For bj = 10 DownTo 2 { b고점[bj,1] = b고점[bj-1,1]; b고점[bj,2] = b고점[bj-1,2]; } } If b고점[1,2] < b저점[1,2] or b고점[1,1] < H Then { b고점[1,1] = H; b고점[1,2] = Index; sbBar = Index - b저점[1,2]; ebBar = 0; If TL_GetBeginDate(bTL1) == sDate[sbBar] and TL_GetBeginTime(bTL1) == sTime[sbBar] Then { TL_Delete(bTL1); } if bT[1] != 1 Then{ TL_SetExtRight(LbTL1,False); TL_Delete(LbTL1); LbTL1 = TL_New(sDate[index-b저점[2,2]],sTime[index-b저점[2,2]],b저점[2,1],sDate[index-b저점[1,2]],sTime[index-b저점[1,2]],b저점[1,1]); // TL_SetExtRight(LbTL1,true); } If b고점[3,1] < b고점[2,1] and b고점[2,1] > b고점[1,1] and b저점[2,1] < b저점[1,1] Then { sbBar = Index - b저점[2,2]; ebBar = Index - b저점[1,2]; } } } If b처리구분 == "b저점처리" Then { bT = -1; blasbTLoVal = L; If b저점[1,2] < b고점[1,2] Then { For bj = 10 DownTo 2 { b저점[bj,1] = b저점[bj-1,1]; b저점[bj,2] = b저점[bj-1,2]; } } If b저점[1,2] < b고점[1,2] or b저점[1,1] > L Then { b저점[1,1] = L; b저점[1,2] = Index; sbBar = Index - b고점[1,2]; ebBar = 0; If TL_GetBeginDate(bTL1) == sDate[sbBar] and TL_GetBeginTime(bTL1) == sTime[sbBar] Then { TL_Delete(bTL1); } if bT[1] != -1 then{ TL_SetExtRight(HbTL1,false); TL_Delete(HbTL1); HbTL1 = TL_New(sDate[index-b고점[2,2]],sTime[index-b고점[2,2]],b고점[2,1],sDate[index-b고점[1,2]],sTime[index-b고점[1,2]],b고점[1,1]); TL_SetExtRight(HbTL1,true); } If b저점[2,1] < b저점[1,1] and b저점[2,1] < b저점[3,1] and b고점[2,1] > b고점[1,1] Then { sbBar = Index - b고점[2,2]; ebBar = Index - b고점[1,2]; } } } TL_SetSize(bTL1,선굵기); TL_SetColor(bTL1,BLACK); TL_SetColor(LbTL1,darkgreen); TL_SetColor(HbTL1,darkred); TL_SetSize(LbTL1,선굵기); TL_SetSize(HbTL1,선굵기);