커뮤니티

추세 2파

프로필 이미지
고성
2024-10-12 23:25:10
1063
글번호 184226
답변완료
input : Period(100); Var:j(0),T(0),txx(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); Plot1(value12); For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(c,highest(H,Period)[1]) Then T = 1; if CrossDown(c,Lowest(L,Period)[1]) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Blue); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value11-value12,2)); Text_SetColor(Tx,Blue); Text_SetStyle(tx,1,0); Text_SetSize(tx,25); Text_SetBold(tx,1); } If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date22 = date[0]; time22 = stime[0]; Text_SetString(tx,NumToStr(value11-value12,2)); Text_SetLocation(tx,sDate,sTime,value12); } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Red); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value12-value11,2)); Text_SetColor(Tx,Red); Text_SetStyle(tx,1,1); Text_SetSize(tx,25); Text_SetBold(tx,1); } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; Text_SetString(tx,NumToStr(value12-value11,2)); Text_SetLocation(tx,sDate,sTime,value12); } } TL_SetSize(TL1,1); 직전 하락추세선의 크기가 0.8 이상일 때, 직전 고점보다 고점이 낮은 새로운 하락 추세선이, 크기가 0.8 이상에서 직전 하락추세선 저점을 깨면 네모 표시. (역N자형 하락2파) 상승은 반대. 감사합니다.
지표
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2024-10-14 13:58:14

안녕하세요 예스스탁입니다. input : Period(100); Var:j(0),T(0),txx(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tx2(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); #Plot1(value12); For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(c,highest(H,Period)[1]) Then T = 1; if CrossDown(c,Lowest(L,Period)[1]) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Blue); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value11-value12,2)); Text_SetColor(Tx,Blue); Text_SetStyle(tx,1,0); Text_SetSize(tx,25); Text_SetBold(tx,1); Condition1 = False; } If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date22 = date[0]; time22 = stime[0]; Text_SetString(tx,NumToStr(value11-value12,2)); Text_SetLocation(tx,sDate,sTime,value12); } if Condition1 == False and hival[0] < hival[1] and Loval[1] <= hival[1]-0.8 and Loval[0] <= hival[0]-0.8 and Loval[0] < loval[1] Then { TL_New(sDate,sTime,0,sDate,sTime,99999999); Condition1 = true; tx1 = Text_New(sDate,sTime,Loval[0],"■"); Text_SetStyle(tx1,2,0); Text_SetColor(tx1,Blue); } if Condition1 == true Then { Text_SetLocation(tx1,date12,time12,loval[0]); } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Red); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value12-value11,2)); Text_SetColor(Tx,Red); Text_SetStyle(tx,1,1); Text_SetSize(tx,25); Text_SetBold(tx,1); Condition2 = False; } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; Text_SetString(tx,NumToStr(value12-value11,2)); Text_SetLocation(tx,sDate,sTime,value12); } if Condition2 == False and loval[0] > loval[1] and hival[1] >= loval[1]+0.8 and hival[0] >= loval[0]+0.8 and hival[0] > hival[1] Then { Condition2 = true; tx2 = Text_New(sDate,sTime,hival[0],"■"); Text_SetStyle(tx2,2,1); Text_SetColor(tx2,Red); } if Condition2 == true Then { Text_SetLocation(tx2,date12,time12,hival[0]); } } TL_SetSize(TL1,1); 즐거운 하루되세요 > 고성 님이 쓴 글입니다. > 제목 : 추세 2파 > input : Period(100); Var:j(0),T(0),txx(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); Plot1(value12); For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(c,highest(H,Period)[1]) Then T = 1; if CrossDown(c,Lowest(L,Period)[1]) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Blue); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value11-value12,2)); Text_SetColor(Tx,Blue); Text_SetStyle(tx,1,0); Text_SetSize(tx,25); Text_SetBold(tx,1); } If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date22 = date[0]; time22 = stime[0]; Text_SetString(tx,NumToStr(value11-value12,2)); Text_SetLocation(tx,sDate,sTime,value12); } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Red); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value12-value11,2)); Text_SetColor(Tx,Red); Text_SetStyle(tx,1,1); Text_SetSize(tx,25); Text_SetBold(tx,1); } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; Text_SetString(tx,NumToStr(value12-value11,2)); Text_SetLocation(tx,sDate,sTime,value12); } } TL_SetSize(TL1,1); 직전 하락추세선의 크기가 0.8 이상일 때, 직전 고점보다 고점이 낮은 새로운 하락 추세선이, 크기가 0.8 이상에서 직전 하락추세선 저점을 깨면 네모 표시. (역N자형 하락2파) 상승은 반대. 감사합니다.
프로필 이미지

고성

2024-10-14 14:20:50

> 예스스탁 님이 쓴 글입니다. > 제목 : Re : 추세 2파 > 안녕하세요 예스스탁입니다. input : Period(100); Var:j(0),T(0),txx(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tx2(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); #Plot1(value12); For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(c,highest(H,Period)[1]) Then T = 1; if CrossDown(c,Lowest(L,Period)[1]) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Blue); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value11-value12,2)); Text_SetColor(Tx,Blue); Text_SetStyle(tx,1,0); Text_SetSize(tx,25); Text_SetBold(tx,1); Condition1 = False; } If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date22 = date[0]; time22 = stime[0]; Text_SetString(tx,NumToStr(value11-value12,2)); Text_SetLocation(tx,sDate,sTime,value12); } if Condition1 == False and hival[0] < hival[1] and Loval[1] <= hival[1]-0.8 and Loval[0] <= hival[0]-0.8 and Loval[0] < loval[1] Then { TL_New(sDate,sTime,0,sDate,sTime,99999999); Condition1 = true; tx1 = Text_New(sDate,sTime,Loval[0],"■"); Text_SetStyle(tx1,2,0); Text_SetColor(tx1,Blue); } if Condition1 == true Then { Text_SetLocation(tx1,date12,time12,loval[0]); } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Red); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value12-value11,2)); Text_SetColor(Tx,Red); Text_SetStyle(tx,1,1); Text_SetSize(tx,25); Text_SetBold(tx,1); Condition2 = False; } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; Text_SetString(tx,NumToStr(value12-value11,2)); Text_SetLocation(tx,sDate,sTime,value12); } if Condition2 == False and loval[0] > loval[1] and hival[1] >= loval[1]+0.8 and hival[0] >= loval[0]+0.8 and hival[0] > hival[1] Then { Condition2 = true; tx2 = Text_New(sDate,sTime,hival[0],"■"); Text_SetStyle(tx2,2,1); Text_SetColor(tx2,Red); } if Condition2 == true Then { Text_SetLocation(tx2,date12,time12,hival[0]); } } TL_SetSize(TL1,1); 즐거운 하루되세요 > 고성 님이 쓴 글입니다. > 제목 : 추세 2파 > input : Period(100); Var:j(0),T(0),txx(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); Plot1(value12); For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(c,highest(H,Period)[1]) Then T = 1; if CrossDown(c,Lowest(L,Period)[1]) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Blue); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value11-value12,2)); Text_SetColor(Tx,Blue); Text_SetStyle(tx,1,0); Text_SetSize(tx,25); Text_SetBold(tx,1); } If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date22 = date[0]; time22 = stime[0]; Text_SetString(tx,NumToStr(value11-value12,2)); Text_SetLocation(tx,sDate,sTime,value12); } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Red); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value12-value11,2)); Text_SetColor(Tx,Red); Text_SetStyle(tx,1,1); Text_SetSize(tx,25); Text_SetBold(tx,1); } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; Text_SetString(tx,NumToStr(value12-value11,2)); Text_SetLocation(tx,sDate,sTime,value12); } } TL_SetSize(TL1,1); 직전 하락추세선의 크기가 0.8 이상일 때, 직전 고점보다 고점이 낮은 새로운 하락 추세선이, 크기가 0.8 이상에서 직전 하락추세선 저점을 깨면 네모 표시. (역N자형 하락2파) 상승은 반대. 감사합니다. 재문의 네모가 끝까지 움직입니다. 돌파해서 2파가 된 시작점에서만 세로선으로 변경 부탁드립니다.
프로필 이미지

예스스탁 예스스탁 답변

2024-10-14 14:25:53

안녕하세요 예스스탁입니다. input : Period(100); Var:j(0),T(0),txx(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tx2(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); #Plot1(value12); For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(c,highest(H,Period)[1]) Then T = 1; if CrossDown(c,Lowest(L,Period)[1]) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Blue); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value11-value12,2)); Text_SetColor(Tx,Blue); Text_SetStyle(tx,1,0); Text_SetSize(tx,25); Text_SetBold(tx,1); Condition1 = False; } If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date22 = date[0]; time22 = stime[0]; Text_SetString(tx,NumToStr(value11-value12,2)); Text_SetLocation(tx,sDate,sTime,value12); } if Condition1 == False and hival[0] < hival[1] and Loval[1] <= hival[1]-0.8 and Loval[0] <= hival[0]-0.8 and Loval[0] < loval[1] Then { Condition1 = true; tx1 = Text_New(sDate,sTime,Loval[0],"■"); Text_SetStyle(tx1,2,0); Text_SetColor(tx1,Blue); } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Red); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value12-value11,2)); Text_SetColor(Tx,Red); Text_SetStyle(tx,1,1); Text_SetSize(tx,25); Text_SetBold(tx,1); Condition2 = False; } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; Text_SetString(tx,NumToStr(value12-value11,2)); Text_SetLocation(tx,sDate,sTime,value12); } if Condition2 == False and loval[0] > loval[1] and hival[1] >= loval[1]+0.8 and hival[0] >= loval[0]+0.8 and hival[0] > hival[1] Then { Condition2 = true; tx2 = Text_New(sDate,sTime,hival[0],"■"); Text_SetStyle(tx2,2,1); Text_SetColor(tx2,Red); } } TL_SetSize(TL1,1); 즐거운 하루되세요 > 고성 님이 쓴 글입니다. > 제목 : Re : Re : 추세 2파 > > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 추세 2파 > 안녕하세요 예스스탁입니다. input : Period(100); Var:j(0),T(0),txx(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tx2(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); #Plot1(value12); For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(c,highest(H,Period)[1]) Then T = 1; if CrossDown(c,Lowest(L,Period)[1]) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Blue); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value11-value12,2)); Text_SetColor(Tx,Blue); Text_SetStyle(tx,1,0); Text_SetSize(tx,25); Text_SetBold(tx,1); Condition1 = False; } If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date22 = date[0]; time22 = stime[0]; Text_SetString(tx,NumToStr(value11-value12,2)); Text_SetLocation(tx,sDate,sTime,value12); } if Condition1 == False and hival[0] < hival[1] and Loval[1] <= hival[1]-0.8 and Loval[0] <= hival[0]-0.8 and Loval[0] < loval[1] Then { TL_New(sDate,sTime,0,sDate,sTime,99999999); Condition1 = true; tx1 = Text_New(sDate,sTime,Loval[0],"■"); Text_SetStyle(tx1,2,0); Text_SetColor(tx1,Blue); } if Condition1 == true Then { Text_SetLocation(tx1,date12,time12,loval[0]); } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Red); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value12-value11,2)); Text_SetColor(Tx,Red); Text_SetStyle(tx,1,1); Text_SetSize(tx,25); Text_SetBold(tx,1); Condition2 = False; } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; Text_SetString(tx,NumToStr(value12-value11,2)); Text_SetLocation(tx,sDate,sTime,value12); } if Condition2 == False and loval[0] > loval[1] and hival[1] >= loval[1]+0.8 and hival[0] >= loval[0]+0.8 and hival[0] > hival[1] Then { Condition2 = true; tx2 = Text_New(sDate,sTime,hival[0],"■"); Text_SetStyle(tx2,2,1); Text_SetColor(tx2,Red); } if Condition2 == true Then { Text_SetLocation(tx2,date12,time12,hival[0]); } } TL_SetSize(TL1,1); 즐거운 하루되세요 > 고성 님이 쓴 글입니다. > 제목 : 추세 2파 > input : Period(100); Var:j(0),T(0),txx(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); Plot1(value12); For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(c,highest(H,Period)[1]) Then T = 1; if CrossDown(c,Lowest(L,Period)[1]) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Blue); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value11-value12,2)); Text_SetColor(Tx,Blue); Text_SetStyle(tx,1,0); Text_SetSize(tx,25); Text_SetBold(tx,1); } If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date22 = date[0]; time22 = stime[0]; Text_SetString(tx,NumToStr(value11-value12,2)); Text_SetLocation(tx,sDate,sTime,value12); } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Red); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value12-value11,2)); Text_SetColor(Tx,Red); Text_SetStyle(tx,1,1); Text_SetSize(tx,25); Text_SetBold(tx,1); } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; Text_SetString(tx,NumToStr(value12-value11,2)); Text_SetLocation(tx,sDate,sTime,value12); } } TL_SetSize(TL1,1); 직전 하락추세선의 크기가 0.8 이상일 때, 직전 고점보다 고점이 낮은 새로운 하락 추세선이, 크기가 0.8 이상에서 직전 하락추세선 저점을 깨면 네모 표시. (역N자형 하락2파) 상승은 반대. 감사합니다. 재문의 네모가 끝까지 움직입니다. 돌파해서 2파가 된 시작점에서만 세로선으로 변경 부탁드립니다.