커뮤니티

문의드립니다

프로필 이미지
장군
2020-11-23 12:03:41
566
글번호 144121
답변완료
Input:length(5); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),TL2(0),TL3(0),Tl4(0),TL5(0),Text1(0),처리구분(""), TL_Val1(0),TL_Val2(0); Var:TL11(0),TL12(0),TL13(0),TL14(0),TL15(0),TL16(0),TL17(0),TL18(0),TL19(0),TL20(0); Var:TL21(0),TL22(0),TL23(0),TL24(0),TL25(0),TL26(0),TL27(0),TL28(0),TL29(0),TL30(0),mav(0),T(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; TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { Text_Delete(Text1); If 고점[3,1][1] < 고점[2,1][1] and 고점[2,1][1] > 고점[1,1][1]and 저점[2,1][1] < 저점[1,1][1] Then { TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); } } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); TL2 = TL_New(sDate[eBar+1],sTime[eBar+1],고점[1,1]+ PriceScale*20,sDate[eBar],sTime[eBar],고점[1,1]+PriceScale*20); TL3 = TL_New(sDate[eBar+1],sTime[eBar+1],고점[1,1]+ PriceScale*40,sDate[eBar],sTime[eBar],고점[1,1]+PriceScale*40); TL4 = TL_New(sDate[eBar+1],sTime[eBar+1],고점[1,1]+ PriceScale*60,sDate[eBar],sTime[eBar],고점[1,1]+PriceScale*60); TL5 = TL_New(sDate[eBar+1],sTime[eBar+1],고점[1,1]+ PriceScale*80,sDate[eBar],sTime[eBar],고점[1,1]+PriceScale*80); TL_SetExtRight(Tl2,true); TL_SetColor(Tl2,YELLOW); TL_SetSize(TL2,1); TL_SetExtRight(Tl3,true); TL_SetColor(Tl3,YELLOW); TL_SetSize(TL3,2); TL_SetExtRight(Tl4,true); TL_SetColor(Tl4,YELLOW); TL_SetSize(TL4,2); TL_SetExtRight(Tl5,true); TL_SetColor(Tl5,YELLOW); TL_SetSize(TL5,2); TL_SetColor(TL1,BLACK); TL_SetSize(TL1,0); 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; TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { Text_Delete(Text1); If 저점[2,1][1] < 저점[1,1][1] and 저점[2,1][1] < 저점[3,1][1] and 고점[2,1][1] > 고점[1,1][1] Then { TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); } } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); TL2 = TL_New(sDate[eBar+1],sTime[eBar+1],저점[1,1]+ PriceScale*20,sDate[eBar],sTime[eBar],저점[1,1]+PriceScale*20); TL3 = TL_New(sDate[eBar+1],sTime[eBar+1], 저점[1,1]- PriceScale*40,sDate[eBar],sTime[eBar],저점[1,1]-PriceScale*40); TL4 = TL_New(sDate[eBar+1],sTime[eBar+1], 저점[1,1]- PriceScale*60,sDate[eBar],sTime[eBar],저점[1,1]-PriceScale*60); TL5 = TL_New(sDate[eBar+1],sTime[eBar+1], 저점[1,1]- PriceScale*80,sDate[eBar],sTime[eBar],저점[1,1]-PriceScale*80); TL_SetExtRight(Tl2,true); TL_SetColor(Tl2,BLACK); TL_SetSize(TL2,1); TL_SetExtRight(Tl3,true); TL_SetColor(Tl3,GREEN); TL_SetSize(TL3,2); TL_SetExtRight(Tl4,true); TL_SetColor(Tl4,GREEN); TL_SetSize(TL4,2); TL_SetExtRight(Tl5,true); TL_SetColor(Tl4,GREEN); TL_SetSize(TL4,2); TL_SetColor(TL1,BLACK); TL_SetSize(TL1,0); If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then { sBar = Index - 고점[2,2]; eBar = Index - 고점[1,2]; } } } mav = ma(C,20); 현재 고점과 저점을 지그재그선 이찍엇을때 20틱마다 수정한상태입니다 이상태에서 고점과저점이 20틱미만까지는 현재수평선이 변하지않게 하고십습니다 지금은 고점이나 저점에서 1`2틱만 움직여도 20틱수평선이 움직인만큼 변하게되어있습니다 다시말씀드리자면 현재의 수평선 20틱까지 상승이나 하락시변하지않게 20틱이상상승이나 하락시 그때수평선이 변하게 ~~`다시한번수정부탁드립니다~~20틱마다수평선에 수치가 나오게 텍스트출력을 원합니다~~항상감사드립니다
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-11-23 14:16:28

안녕하세요 예스스탁입니다. 죄송하지만 문의하신 내용은 처리할 방법을 모르겠습니다. 도움을 드리지 못해 죄송합니다. 즐거운 하루되세요 > 장군 님이 쓴 글입니다. > 제목 : 문의드립니다 > Input:length(5); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),TL2(0),TL3(0),Tl4(0),TL5(0),Text1(0),처리구분(""), TL_Val1(0),TL_Val2(0); Var:TL11(0),TL12(0),TL13(0),TL14(0),TL15(0),TL16(0),TL17(0),TL18(0),TL19(0),TL20(0); Var:TL21(0),TL22(0),TL23(0),TL24(0),TL25(0),TL26(0),TL27(0),TL28(0),TL29(0),TL30(0),mav(0),T(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; TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { Text_Delete(Text1); If 고점[3,1][1] < 고점[2,1][1] and 고점[2,1][1] > 고점[1,1][1]and 저점[2,1][1] < 저점[1,1][1] Then { TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); } } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); TL2 = TL_New(sDate[eBar+1],sTime[eBar+1],고점[1,1]+ PriceScale*20,sDate[eBar],sTime[eBar],고점[1,1]+PriceScale*20); TL3 = TL_New(sDate[eBar+1],sTime[eBar+1],고점[1,1]+ PriceScale*40,sDate[eBar],sTime[eBar],고점[1,1]+PriceScale*40); TL4 = TL_New(sDate[eBar+1],sTime[eBar+1],고점[1,1]+ PriceScale*60,sDate[eBar],sTime[eBar],고점[1,1]+PriceScale*60); TL5 = TL_New(sDate[eBar+1],sTime[eBar+1],고점[1,1]+ PriceScale*80,sDate[eBar],sTime[eBar],고점[1,1]+PriceScale*80); TL_SetExtRight(Tl2,true); TL_SetColor(Tl2,YELLOW); TL_SetSize(TL2,1); TL_SetExtRight(Tl3,true); TL_SetColor(Tl3,YELLOW); TL_SetSize(TL3,2); TL_SetExtRight(Tl4,true); TL_SetColor(Tl4,YELLOW); TL_SetSize(TL4,2); TL_SetExtRight(Tl5,true); TL_SetColor(Tl5,YELLOW); TL_SetSize(TL5,2); TL_SetColor(TL1,BLACK); TL_SetSize(TL1,0); 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; TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { Text_Delete(Text1); If 저점[2,1][1] < 저점[1,1][1] and 저점[2,1][1] < 저점[3,1][1] and 고점[2,1][1] > 고점[1,1][1] Then { TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); } } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); TL2 = TL_New(sDate[eBar+1],sTime[eBar+1],저점[1,1]+ PriceScale*20,sDate[eBar],sTime[eBar],저점[1,1]+PriceScale*20); TL3 = TL_New(sDate[eBar+1],sTime[eBar+1], 저점[1,1]- PriceScale*40,sDate[eBar],sTime[eBar],저점[1,1]-PriceScale*40); TL4 = TL_New(sDate[eBar+1],sTime[eBar+1], 저점[1,1]- PriceScale*60,sDate[eBar],sTime[eBar],저점[1,1]-PriceScale*60); TL5 = TL_New(sDate[eBar+1],sTime[eBar+1], 저점[1,1]- PriceScale*80,sDate[eBar],sTime[eBar],저점[1,1]-PriceScale*80); TL_SetExtRight(Tl2,true); TL_SetColor(Tl2,BLACK); TL_SetSize(TL2,1); TL_SetExtRight(Tl3,true); TL_SetColor(Tl3,GREEN); TL_SetSize(TL3,2); TL_SetExtRight(Tl4,true); TL_SetColor(Tl4,GREEN); TL_SetSize(TL4,2); TL_SetExtRight(Tl5,true); TL_SetColor(Tl4,GREEN); TL_SetSize(TL4,2); TL_SetColor(TL1,BLACK); TL_SetSize(TL1,0); If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then { sBar = Index - 고점[2,2]; eBar = Index - 고점[1,2]; } } } mav = ma(C,20); 현재 고점과 저점을 지그재그선 이찍엇을때 20틱마다 수정한상태입니다 이상태에서 고점과저점이 20틱미만까지는 현재수평선이 변하지않게 하고십습니다 지금은 고점이나 저점에서 1`2틱만 움직여도 20틱수평선이 움직인만큼 변하게되어있습니다 다시말씀드리자면 현재의 수평선 20틱까지 상승이나 하락시변하지않게 20틱이상상승이나 하락시 그때수평선이 변하게 ~~`다시한번수정부탁드립니다~~20틱마다수평선에 수치가 나오게 텍스트출력을 원합니다~~항상감사드립니다