커뮤니티

부탁드립니다

프로필 이미지
마르뚝
2017-04-07 02:54:46
217
글번호 108548
답변완료
1. 진행되고 있는 60분봉의 고점,저점, 중간값에 우측으로 연장된 수평선을 긋고 그 값을 표시하고 싶습니다 부탁드립니다 (현재시간이 10시 16분이라면 9시~10시의 60분 캔들봉의 고가,저가,중간값에 우측으로 연장된 선을 긋고 그 가격을 표시함) 2.아래수식에서 지그재그선이 계속 나오는데요 진행중인 현재시점에서 마지막에 나온 고점과 저점을 이은 선의 중간값에 수평선과 그 값을 표시하고 싶습니다(1번과 동일) 부탁드립니다 Input:length(12),X(1); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),TL2(0),TL3(0),Text1(0),처리구분(""), TL_Val1(0),TL_Val2(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 { 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); 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); } if X == 1 Then TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); if H < 고점[2,1] Then TL_SetColor(TL1,red); Else TL_SetColor(TL1,MAGENTA); Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(고점[1,1],2)); Text_SetStyle(Text1, 2, 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]; TL_SetExtLeft(TL2,false); TL_SetExtRight(TL2,false); if X == 1 Then TL2 = TL_New(sDate[sBar],sTime[sBar],저점[2,1],sDate[eBar],sTime[eBar],저점[1,1]); TL_SetColor(TL2,BLUE); TL_SetExtLeft(TL2,true); TL_SetExtRight(TL2,true); } } } If 처리구분 == "저점처리" Then { 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); 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(TL3); } if X == 1 Then TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); TL_SetColor(TL1,blue); if L > 저점[2,1] Then TL_SetColor(TL1,blue); Else TL_SetColor(TL1,cyan); Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(저점[1,1],2)); Text_SetStyle(Text1, 2, 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]; TL_SetExtLeft(TL3,false); TL_SetExtRight(TL3,false); if X == 1 Then TL3 = TL_New(sDate[sBar],sTime[sBar],고점[2,1],sDate[eBar],sTime[eBar],고점[1,1]); TL_SetColor(TL3,RED); TL_SetExtLeft(TL3,true); TL_SetExtRight(TL3,true); } } } TL_SetSize(TL1,3); TL_SetSize(TL2,2); TL_SetSize(TL3,2);
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-04-07 15:20:33

안녕하세요 예스스탁입니다. 1. var : TF(0),DD(0),TT(0),HH(0),LL(0); var : TL1(0),TL2(0),TL3(0),Tx1(0),tx2(0),tx3(0); TF = TimeToMinutes(stime)%60; if sdate != date[1] or (sdate == sdate[1] and TF < TF[1]) Then{ HH = H; LL = L; DD = sdate[1]; TT = stime[1]; } if H > HH Then HH = H; if L < LL Then LL = L; TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL1 = TL_New(dd,tt,HH,sdate,stime,HH); TL2 = TL_New(dd,tt,LL,sdate,stime,LL); TL3 = TL_New(dd,tt,(HH+LL)/2,sdate,stime,(HH+LL)/2); TL_SetExtRight(TL1,true); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); Text_Delete(tx1); Text_Delete(tx2); Text_Delete(tx3); tx1 = Text_New(sdate,stime,HH,NumToStr(HH,2)); tx2 = Text_New(sdate,stime,LL,NumToStr(LL,2)); tx3 = Text_New(sdate,stime,(HH+LL)/2,NumToStr((HH+LL)/2,2)); 2 Input:length(12),X(1); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),TL2(0),TL3(0),Text1(0),처리구분(""), TL_Val1(0),TL_Val2(0),TL11(0),tx11(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 { 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); 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); } if X == 1 Then{ TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); } TL_Delete(TL11); TL11 = TL_New(sDate[sBar],sTime[sBar],(저점[1,1]+고점[1,1])/2,sDate[eBar],sTime[eBar],(저점[1,1]+고점[1,1])/2); TL_SetExtRight(TL11,true); Text_Delete(tx11); tx11 = Text_New(sdate,stime,(저점[1,1]+고점[1,1])/2,NumToStr((저점[1,1]+고점[1,1])/2,2)); if H < 고점[2,1] Then TL_SetColor(TL1,red); Else TL_SetColor(TL1,MAGENTA); Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(고점[1,1],2)); Text_SetStyle(Text1, 2, 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]; TL_SetExtLeft(TL2,false); TL_SetExtRight(TL2,false); if X == 1 Then TL2 = TL_New(sDate[sBar],sTime[sBar],저점[2,1],sDate[eBar],sTime[eBar],저점[1,1]); TL_SetColor(TL2,BLUE); TL_SetExtLeft(TL2,true); TL_SetExtRight(TL2,true); } } } If 처리구분 == "저점처리" Then { 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); 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(TL3); } if X == 1 Then{ TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); } TL_SetColor(TL1,blue); TL_Delete(TL11); TL11 = TL_New(sDate[sBar],sTime[sBar],(저점[1,1]+고점[1,1])/2,sDate[eBar],sTime[eBar],(저점[1,1]+고점[1,1])/2); TL_SetExtRight(TL11,true); Text_Delete(tx11); tx11 = Text_New(sdate,stime,(저점[1,1]+고점[1,1])/2,NumToStr((저점[1,1]+고점[1,1])/2,2)); if L > 저점[2,1] Then TL_SetColor(TL1,blue); Else TL_SetColor(TL1,cyan); Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(저점[1,1],2)); Text_SetStyle(Text1, 2, 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]; TL_SetExtLeft(TL3,false); TL_SetExtRight(TL3,false); if X == 1 Then TL3 = TL_New(sDate[sBar],sTime[sBar],고점[2,1],sDate[eBar],sTime[eBar],고점[1,1]); TL_SetColor(TL3,RED); TL_SetExtLeft(TL3,true); TL_SetExtRight(TL3,true); } } } TL_SetSize(TL1,3); TL_SetSize(TL2,2); TL_SetSize(TL3,2); 즐거운 하루되세요 > 마르뚝 님이 쓴 글입니다. > 제목 : 부탁드립니다 > 1. 진행되고 있는 60분봉의 고점,저점, 중간값에 우측으로 연장된 수평선을 긋고 그 값을 표시하고 싶습니다 부탁드립니다 (현재시간이 10시 16분이라면 9시~10시의 60분 캔들봉의 고가,저가,중간값에 우측으로 연장된 선을 긋고 그 가격을 표시함) 2.아래수식에서 지그재그선이 계속 나오는데요 진행중인 현재시점에서 마지막에 나온 고점과 저점을 이은 선의 중간값에 수평선과 그 값을 표시하고 싶습니다(1번과 동일) 부탁드립니다 Input:length(12),X(1); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),TL2(0),TL3(0),Text1(0),처리구분(""), TL_Val1(0),TL_Val2(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 { 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); 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); } if X == 1 Then TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); if H < 고점[2,1] Then TL_SetColor(TL1,red); Else TL_SetColor(TL1,MAGENTA); Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(고점[1,1],2)); Text_SetStyle(Text1, 2, 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]; TL_SetExtLeft(TL2,false); TL_SetExtRight(TL2,false); if X == 1 Then TL2 = TL_New(sDate[sBar],sTime[sBar],저점[2,1],sDate[eBar],sTime[eBar],저점[1,1]); TL_SetColor(TL2,BLUE); TL_SetExtLeft(TL2,true); TL_SetExtRight(TL2,true); } } } If 처리구분 == "저점처리" Then { 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); 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(TL3); } if X == 1 Then TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); TL_SetColor(TL1,blue); if L > 저점[2,1] Then TL_SetColor(TL1,blue); Else TL_SetColor(TL1,cyan); Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(저점[1,1],2)); Text_SetStyle(Text1, 2, 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]; TL_SetExtLeft(TL3,false); TL_SetExtRight(TL3,false); if X == 1 Then TL3 = TL_New(sDate[sBar],sTime[sBar],고점[2,1],sDate[eBar],sTime[eBar],고점[1,1]); TL_SetColor(TL3,RED); TL_SetExtLeft(TL3,true); TL_SetExtRight(TL3,true); } } } TL_SetSize(TL1,3); TL_SetSize(TL2,2); TL_SetSize(TL3,2);