커뮤니티

부탁 합니다.

프로필 이미지
시그너스
2021-01-09 19:18:52
760
글번호 145303
답변완료
아래 수식중 피보나치의 숫자를 차트에 표시 될수있게 해 주시면 고맙 겠습니다. Input:length(10); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0), TL1(0),처리구분(""),T(0),TL2(0),TL3(0); var : hh(0),ll(0),ii(0),diff(0),TL41(0),TL42(0),TL43(0),TL44(0),TL45(0),TL46(0),tL31(0),tl21(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); TL_Delete(TL2); } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); TL_SetExtRight(TL2,False); TL2 = TL_New(sDate[1],sTime[1],고점[1,1],sdate,sTime,고점[1,1]); TL_SetColor(TL2,RED); TL_SetSize(TL2,1); 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); TL_Delete(TL3); } TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); TL_SetExtRight(TL3,False); TL3 = TL_New(sDate[1],sTime[1],저점[1,1],sdate,sTime,저점[1,1]); TL_SetColor(TL3,BLUE); TL_SetSize(TL3,1); 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,1); TL_SetColor(TL1,white); TL_SetEnd(TL2,sdate,stime,고점[1,1]); TL_SetEnd(TL3,sdate,stime,저점[1,1]); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); if T != T[1] then { if T == 1 Then { TL_SetExtRight(TL21,false); TL21 = TL2[1]; TL_SetExtRight(TL21,true); HH = 고점[2,1]; LL = 저점[1,1]; ii = index-고점[2,2]; diff = abs(HH-LL); } Else { TL_SetExtRight(TL31,false); TL31 = TL3[1]; TL_SetExtRight(TL31,true); HH = 고점[1,1]; LL = 저점[2,1]; ii = index-저점[2,2]; diff = abs(HH-LL); } TL_Delete(TL41); TL_Delete(TL42); TL_Delete(TL43); TL_Delete(TL44); TL_Delete(TL45); TL_Delete(TL46); TL41 = TL_New(sdate[ii],stime[ii],LL+diff*2.535,sdate,stime,LL+diff*2.535); TL42 = TL_New(sdate[ii],stime[ii],LL+diff*3.764,sdate,stime,LL+diff*3.764); TL43 = TL_New(sdate[ii],stime[ii],LL+diff*4.190,sdate,stime,LL+diff*4.190); TL44 = TL_New(sdate[ii],stime[ii],HH-diff*2.535,sdate,stime,HH-diff*2.535); TL45 = TL_New(sdate[ii],stime[ii],HH-diff*3.764,sdate,stime,HH-diff*3.764); TL46 = TL_New(sdate[ii],stime[ii],HH-diff*4.190,sdate,stime,HH-diff*4.190); TL_SetExtRight(TL41,true); TL_SetExtRight(TL42,true); TL_SetExtRight(TL43,true); TL_SetExtRight(TL44,true); TL_SetExtRight(TL45,true); TL_SetExtRight(TL46,true); TL_SetSize(TL41,0); TL_SetSize(TL42,0); TL_SetSize(TL43,1); TL_SetSize(TL44,0); TL_SetSize(TL45,0); TL_SetSize(TL46,1); }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-01-11 10:01:25

안녕하세요 예스스탁입니다. Input:length(10); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0), TL1(0),처리구분(""),T(0),TL2(0),TL3(0); var : hh(0),ll(0),ii(0),diff(0),TL41(0),TL42(0),TL43(0),TL44(0),TL45(0),TL46(0),tL31(0),tl21(0); var : tx41(0),tx42(0),tx43(0),tx44(0),tx45(0),tx46(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); TL_Delete(TL2); } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); TL_SetExtRight(TL2,False); TL2 = TL_New(sDate[1],sTime[1],고점[1,1],sdate,sTime,고점[1,1]); TL_SetColor(TL2,RED); TL_SetSize(TL2,1); 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); TL_Delete(TL3); } TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); TL_SetExtRight(TL3,False); TL3 = TL_New(sDate[1],sTime[1],저점[1,1],sdate,sTime,저점[1,1]); TL_SetColor(TL3,BLUE); TL_SetSize(TL3,1); 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,1); TL_SetColor(TL1,white); TL_SetEnd(TL2,sdate,stime,고점[1,1]); TL_SetEnd(TL3,sdate,stime,저점[1,1]); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); if T != T[1] then { if T == 1 Then { TL_SetExtRight(TL21,false); TL21 = TL2[1]; TL_SetExtRight(TL21,true); HH = 고점[2,1]; LL = 저점[1,1]; ii = index-고점[2,2]; diff = abs(HH-LL); } Else { TL_SetExtRight(TL31,false); TL31 = TL3[1]; TL_SetExtRight(TL31,true); HH = 고점[1,1]; LL = 저점[2,1]; ii = index-저점[2,2]; diff = abs(HH-LL); } TL_Delete(TL41); TL_Delete(TL42); TL_Delete(TL43); TL_Delete(TL44); TL_Delete(TL45); TL_Delete(TL46); TL41 = TL_New(sdate[ii],stime[ii],LL+diff*2.535,sdate,stime,LL+diff*2.535); TL42 = TL_New(sdate[ii],stime[ii],LL+diff*3.764,sdate,stime,LL+diff*3.764); TL43 = TL_New(sdate[ii],stime[ii],LL+diff*4.190,sdate,stime,LL+diff*4.190); TL44 = TL_New(sdate[ii],stime[ii],HH-diff*2.535,sdate,stime,HH-diff*2.535); TL45 = TL_New(sdate[ii],stime[ii],HH-diff*3.764,sdate,stime,HH-diff*3.764); TL46 = TL_New(sdate[ii],stime[ii],HH-diff*4.190,sdate,stime,HH-diff*4.190); TL_SetExtRight(TL41,true); TL_SetExtRight(TL42,true); TL_SetExtRight(TL43,true); TL_SetExtRight(TL44,true); TL_SetExtRight(TL45,true); TL_SetExtRight(TL46,true); TL_SetSize(TL41,0); TL_SetSize(TL42,0); TL_SetSize(TL43,1); TL_SetSize(TL44,0); TL_SetSize(TL45,0); TL_SetSize(TL46,1); Text_Delete(tx41); Text_Delete(tx42); Text_Delete(tx43); Text_Delete(tx44); Text_Delete(tx45); Text_Delete(tx46); Tx41 = Text_New(sdate,stime,LL+diff*2.535,NumToStr(LL+diff*2.535,2)); Tx42 = Text_New(sdate,stime,LL+diff*3.764,NumToStr(LL+diff*3.764,2)); Tx43 = Text_New(sdate,stime,LL+diff*4.190,NumToStr(LL+diff*4.190,2)); Tx44 = Text_New(sdate,stime,HH-diff*2.535,NumToStr(HH-diff*2.535,2)); Tx45 = Text_New(sdate,stime,HH-diff*3.764,NumToStr(HH-diff*3.764,2)); Tx46 = Text_New(sdate,stime,HH-diff*4.190,NumToStr(HH-diff*4.190,2)); Text_SetStyle(tx41,0,1); Text_SetStyle(tx42,0,1); Text_SetStyle(tx43,0,1); Text_SetStyle(tx44,0,1); Text_SetStyle(tx45,0,1); Text_SetStyle(tx46,0,1); } Text_SetLocation(tx41,sdate,stime,LL+diff*2.535); Text_SetLocation(tx42,sdate,stime,LL+diff*3.764); Text_SetLocation(tx43,sdate,stime,LL+diff*4.190); Text_SetLocation(tx44,sdate,stime,HH-diff*2.535); Text_SetLocation(tx45,sdate,stime,HH-diff*3.764); Text_SetLocation(tx46,sdate,stime,HH-diff*4.190); 즐거운 하루되세요 > 시그너스 님이 쓴 글입니다. > 제목 : 부탁 합니다. > 아래 수식중 피보나치의 숫자를 차트에 표시 될수있게 해 주시면 고맙 겠습니다. Input:length(10); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0), TL1(0),처리구분(""),T(0),TL2(0),TL3(0); var : hh(0),ll(0),ii(0),diff(0),TL41(0),TL42(0),TL43(0),TL44(0),TL45(0),TL46(0),tL31(0),tl21(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); TL_Delete(TL2); } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); TL_SetExtRight(TL2,False); TL2 = TL_New(sDate[1],sTime[1],고점[1,1],sdate,sTime,고점[1,1]); TL_SetColor(TL2,RED); TL_SetSize(TL2,1); 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); TL_Delete(TL3); } TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); TL_SetExtRight(TL3,False); TL3 = TL_New(sDate[1],sTime[1],저점[1,1],sdate,sTime,저점[1,1]); TL_SetColor(TL3,BLUE); TL_SetSize(TL3,1); 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,1); TL_SetColor(TL1,white); TL_SetEnd(TL2,sdate,stime,고점[1,1]); TL_SetEnd(TL3,sdate,stime,저점[1,1]); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); if T != T[1] then { if T == 1 Then { TL_SetExtRight(TL21,false); TL21 = TL2[1]; TL_SetExtRight(TL21,true); HH = 고점[2,1]; LL = 저점[1,1]; ii = index-고점[2,2]; diff = abs(HH-LL); } Else { TL_SetExtRight(TL31,false); TL31 = TL3[1]; TL_SetExtRight(TL31,true); HH = 고점[1,1]; LL = 저점[2,1]; ii = index-저점[2,2]; diff = abs(HH-LL); } TL_Delete(TL41); TL_Delete(TL42); TL_Delete(TL43); TL_Delete(TL44); TL_Delete(TL45); TL_Delete(TL46); TL41 = TL_New(sdate[ii],stime[ii],LL+diff*2.535,sdate,stime,LL+diff*2.535); TL42 = TL_New(sdate[ii],stime[ii],LL+diff*3.764,sdate,stime,LL+diff*3.764); TL43 = TL_New(sdate[ii],stime[ii],LL+diff*4.190,sdate,stime,LL+diff*4.190); TL44 = TL_New(sdate[ii],stime[ii],HH-diff*2.535,sdate,stime,HH-diff*2.535); TL45 = TL_New(sdate[ii],stime[ii],HH-diff*3.764,sdate,stime,HH-diff*3.764); TL46 = TL_New(sdate[ii],stime[ii],HH-diff*4.190,sdate,stime,HH-diff*4.190); TL_SetExtRight(TL41,true); TL_SetExtRight(TL42,true); TL_SetExtRight(TL43,true); TL_SetExtRight(TL44,true); TL_SetExtRight(TL45,true); TL_SetExtRight(TL46,true); TL_SetSize(TL41,0); TL_SetSize(TL42,0); TL_SetSize(TL43,1); TL_SetSize(TL44,0); TL_SetSize(TL45,0); TL_SetSize(TL46,1); }