커뮤니티

수식 부탁드립니다.

프로필 이미지
천년대로
2024-10-21 16:08:46
685
글번호 184449
답변완료
안녕하ㅔ요? 아래의 지표수식을 상승의 추세선 유지후 하락의 추세선이 발생시에 경고의음이 나오고 발생된 순간시점의 봉에 굵은 점표시 생기고 추세선은 기존의 수식대로 그려지게 해주시면 감사하겠습니다. 항상 도움에 감사드립니다. input : Period(250),선두께(3); Var:상승색(Red), 하락색(Blue); Var:j(0),T(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); var : box1(0),box2(0),box3(0),box4(0); Plot1(0); 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,하락색); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; box1 = Box_New(sdate,stime,LoVal[0]-0.25,NextBarSdate,NextBarStime,LoVal[0]-0.50); Box_SetColor(box1,Green); Box_SetFill(box1,true); box2 = box1[1]; Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box1,sDate,sTime,LoVal[0]-0.25); Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } } 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,상승색); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; box3 = Box_New(sdate,stime,HiVal[0]+0.25,NextBarSdate,NextBarStime,HiVal[0]+0.50); Box_SetColor(box3,Yellow); Box_SetFill(box3,true); box4 = box3[1]; Box_SetEnd(box3,Sdate,Stime,HiVal[1]+0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box3,sDate,sTime,HiVal[0]+0.25); Box_SetEnd(box4,Sdate,Stime,HiVal[1]+0.50); } } Box_SetEnd(box1,NextBarSdate,NextBarStime,LoVal[0]-0.5); Box_SetEnd(box3,NextBarSdate,NextBarStime,HiVal[0]+0.5); TL_SetSize(TL1,선두께);
시스템
답변 5
프로필 이미지

예스스탁 예스스탁 답변

2024-10-22 10:22:57

안녕하세요 예스스탁입니다. 소리출력함수(playsound)는 함수내에 지정한 경로의 wav파일이 구동됩니다. 아래는 예스트레이더에 기본으로 제공되는 wav파일을 지정했습니다. 원하시는 wav파일의 경로와 이름으로 수정하시기 바랍니다. 게시판에서 식을 복사할 경우 경로명 중 ₩의 폰트가 깨질수 있으므로 ₩는 다시 타이핑하시기 바랍니다. input : Period(250),선두께(3); Var:상승색(Red), 하락색(Blue); Var:j(0),T(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); var : box1(0),box2(0),box3(0),box4(0); Plot1(0); 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,하락색); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; box1 = Box_New(sdate,stime,LoVal[0]-0.25,NextBarSdate,NextBarStime,LoVal[0]-0.50); Box_SetColor(box1,Green); Box_SetFill(box1,true); box2 = box1[1]; Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box1,sDate,sTime,LoVal[0]-0.25); Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } } 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,상승색); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; box3 = Box_New(sdate,stime,HiVal[0]+0.25,NextBarSdate,NextBarStime,HiVal[0]+0.50); Box_SetColor(box3,Yellow); Box_SetFill(box3,true); box4 = box3[1]; Box_SetEnd(box3,Sdate,Stime,HiVal[1]+0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box3,sDate,sTime,HiVal[0]+0.25); Box_SetEnd(box4,Sdate,Stime,HiVal[1]+0.50); } } Box_SetEnd(box1,NextBarSdate,NextBarStime,LoVal[0]-0.5); Box_SetEnd(box3,NextBarSdate,NextBarStime,HiVal[0]+0.5); TL_SetSize(TL1,선두께); var : tx99(0); if T == -1 and T != T[1] Then { tx99 = text_new(sDate,sTime,L,"●"); Text_SetStyle(tx,2,0); Text_SetColor(tx,Blue); if NextBarOpen > 0 Then { PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); } } 즐거운 하루되세요 > 천년대로 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다. > 안녕하ㅔ요? 아래의 지표수식을 상승의 추세선 유지후 하락의 추세선이 발생시에 경고의음이 나오고 발생된 순간시점의 봉에 굵은 점표시 생기고 추세선은 기존의 수식대로 그려지게 해주시면 감사하겠습니다. 항상 도움에 감사드립니다. input : Period(250),선두께(3); Var:상승색(Red), 하락색(Blue); Var:j(0),T(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); var : box1(0),box2(0),box3(0),box4(0); Plot1(0); 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,하락색); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; box1 = Box_New(sdate,stime,LoVal[0]-0.25,NextBarSdate,NextBarStime,LoVal[0]-0.50); Box_SetColor(box1,Green); Box_SetFill(box1,true); box2 = box1[1]; Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box1,sDate,sTime,LoVal[0]-0.25); Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } } 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,상승색); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; box3 = Box_New(sdate,stime,HiVal[0]+0.25,NextBarSdate,NextBarStime,HiVal[0]+0.50); Box_SetColor(box3,Yellow); Box_SetFill(box3,true); box4 = box3[1]; Box_SetEnd(box3,Sdate,Stime,HiVal[1]+0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box3,sDate,sTime,HiVal[0]+0.25); Box_SetEnd(box4,Sdate,Stime,HiVal[1]+0.50); } } Box_SetEnd(box1,NextBarSdate,NextBarStime,LoVal[0]-0.5); Box_SetEnd(box3,NextBarSdate,NextBarStime,HiVal[0]+0.5); TL_SetSize(TL1,선두께);
프로필 이미지

천년대로

2024-10-22 12:50:59

천년대로 님에 의해 삭제된 답변입니다.
프로필 이미지

천년대로

2024-10-22 13:00:31

아래의 수식중 상승일때도 표시부탁합니다. 감사합니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 수식 부탁드립니다. > 안녕하세요 예스스탁입니다. 소리출력함수(playsound)는 함수내에 지정한 경로의 wav파일이 구동됩니다. 아래는 예스트레이더에 기본으로 제공되는 wav파일을 지정했습니다. 원하시는 wav파일의 경로와 이름으로 수정하시기 바랍니다. 게시판에서 식을 복사할 경우 경로명 중 ₩의 폰트가 깨질수 있으므로 ₩는 다시 타이핑하시기 바랍니다. input : Period(250),선두께(3); Var:상승색(Red), 하락색(Blue); Var:j(0),T(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); var : box1(0),box2(0),box3(0),box4(0); Plot1(0); 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,하락색); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; box1 = Box_New(sdate,stime,LoVal[0]-0.25,NextBarSdate,NextBarStime,LoVal[0]-0.50); Box_SetColor(box1,Green); Box_SetFill(box1,true); box2 = box1[1]; Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box1,sDate,sTime,LoVal[0]-0.25); Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } } 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,상승색); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; box3 = Box_New(sdate,stime,HiVal[0]+0.25,NextBarSdate,NextBarStime,HiVal[0]+0.50); Box_SetColor(box3,Yellow); Box_SetFill(box3,true); box4 = box3[1]; Box_SetEnd(box3,Sdate,Stime,HiVal[1]+0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box3,sDate,sTime,HiVal[0]+0.25); Box_SetEnd(box4,Sdate,Stime,HiVal[1]+0.50); } } Box_SetEnd(box1,NextBarSdate,NextBarStime,LoVal[0]-0.5); Box_SetEnd(box3,NextBarSdate,NextBarStime,HiVal[0]+0.5); TL_SetSize(TL1,선두께); var : tx99(0); if T == -1 and T != T[1] Then { tx99 = text_new(sDate,sTime,L,"●"); Text_SetStyle(tx,2,0); Text_SetColor(tx,Blue); if NextBarOpen > 0 Then { PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); } } 즐거운 하루되세요 > 천년대로 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다. > 안녕하ㅔ요? 아래의 지표수식을 상승의 추세선 유지후 하락의 추세선이 발생시에 경고의음이 나오고 발생된 순간시점의 봉에 굵은 점표시 생기고 추세선은 기존의 수식대로 그려지게 해주시면 감사하겠습니다. 항상 도움에 감사드립니다. input : Period(250),선두께(3); Var:상승색(Red), 하락색(Blue); Var:j(0),T(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); var : box1(0),box2(0),box3(0),box4(0); Plot1(0); 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,하락색); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; box1 = Box_New(sdate,stime,LoVal[0]-0.25,NextBarSdate,NextBarStime,LoVal[0]-0.50); Box_SetColor(box1,Green); Box_SetFill(box1,true); box2 = box1[1]; Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box1,sDate,sTime,LoVal[0]-0.25); Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } } 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,상승색); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; box3 = Box_New(sdate,stime,HiVal[0]+0.25,NextBarSdate,NextBarStime,HiVal[0]+0.50); Box_SetColor(box3,Yellow); Box_SetFill(box3,true); box4 = box3[1]; Box_SetEnd(box3,Sdate,Stime,HiVal[1]+0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box3,sDate,sTime,HiVal[0]+0.25); Box_SetEnd(box4,Sdate,Stime,HiVal[1]+0.50); } } Box_SetEnd(box1,NextBarSdate,NextBarStime,LoVal[0]-0.5); Box_SetEnd(box3,NextBarSdate,NextBarStime,HiVal[0]+0.5); TL_SetSize(TL1,선두께);
프로필 이미지

예스스탁 예스스탁 답변

2024-10-22 13:29:28

안녕하세요 예스스탁입니다. input : Period(250),선두께(3); Var:상승색(Red), 하락색(Blue); Var:j(0),T(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); var : box1(0),box2(0),box3(0),box4(0); Plot1(0); 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,하락색); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; box1 = Box_New(sdate,stime,LoVal[0]-0.25,NextBarSdate,NextBarStime,LoVal[0]-0.50); Box_SetColor(box1,Green); Box_SetFill(box1,true); box2 = box1[1]; Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box1,sDate,sTime,LoVal[0]-0.25); Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } } 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,상승색); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; box3 = Box_New(sdate,stime,HiVal[0]+0.25,NextBarSdate,NextBarStime,HiVal[0]+0.50); Box_SetColor(box3,Yellow); Box_SetFill(box3,true); box4 = box3[1]; Box_SetEnd(box3,Sdate,Stime,HiVal[1]+0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box3,sDate,sTime,HiVal[0]+0.25); Box_SetEnd(box4,Sdate,Stime,HiVal[1]+0.50); } } Box_SetEnd(box1,NextBarSdate,NextBarStime,LoVal[0]-0.5); Box_SetEnd(box3,NextBarSdate,NextBarStime,HiVal[0]+0.5); TL_SetSize(TL1,선두께); var : tx99(0); if T == -1 and T != T[1] Then { tx99 = text_new(sDate,sTime,L,"●"); Text_SetStyle(tx,2,0); Text_SetColor(tx,Blue); if NextBarOpen > 0 Then { PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); } } if T == 1 and T != T[1] Then { tx99 = text_new(sDate,sTime,L,"●"); Text_SetStyle(tx,2,0); Text_SetColor(tx,Red); if NextBarOpen > 0 Then { PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); } } 즐거운 하루되세요 > 천년대로 님이 쓴 글입니다. > 제목 : Re : Re : 수식 부탁드립니다. > 아래의 수식중 상승일때도 표시부탁합니다. 감사합니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 수식 부탁드립니다. > 안녕하세요 예스스탁입니다. 소리출력함수(playsound)는 함수내에 지정한 경로의 wav파일이 구동됩니다. 아래는 예스트레이더에 기본으로 제공되는 wav파일을 지정했습니다. 원하시는 wav파일의 경로와 이름으로 수정하시기 바랍니다. 게시판에서 식을 복사할 경우 경로명 중 ₩의 폰트가 깨질수 있으므로 ₩는 다시 타이핑하시기 바랍니다. input : Period(250),선두께(3); Var:상승색(Red), 하락색(Blue); Var:j(0),T(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); var : box1(0),box2(0),box3(0),box4(0); Plot1(0); 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,하락색); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; box1 = Box_New(sdate,stime,LoVal[0]-0.25,NextBarSdate,NextBarStime,LoVal[0]-0.50); Box_SetColor(box1,Green); Box_SetFill(box1,true); box2 = box1[1]; Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box1,sDate,sTime,LoVal[0]-0.25); Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } } 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,상승색); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; box3 = Box_New(sdate,stime,HiVal[0]+0.25,NextBarSdate,NextBarStime,HiVal[0]+0.50); Box_SetColor(box3,Yellow); Box_SetFill(box3,true); box4 = box3[1]; Box_SetEnd(box3,Sdate,Stime,HiVal[1]+0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box3,sDate,sTime,HiVal[0]+0.25); Box_SetEnd(box4,Sdate,Stime,HiVal[1]+0.50); } } Box_SetEnd(box1,NextBarSdate,NextBarStime,LoVal[0]-0.5); Box_SetEnd(box3,NextBarSdate,NextBarStime,HiVal[0]+0.5); TL_SetSize(TL1,선두께); var : tx99(0); if T == -1 and T != T[1] Then { tx99 = text_new(sDate,sTime,L,"●"); Text_SetStyle(tx,2,0); Text_SetColor(tx,Blue); if NextBarOpen > 0 Then { PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); } } 즐거운 하루되세요 > 천년대로 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다. > 안녕하ㅔ요? 아래의 지표수식을 상승의 추세선 유지후 하락의 추세선이 발생시에 경고의음이 나오고 발생된 순간시점의 봉에 굵은 점표시 생기고 추세선은 기존의 수식대로 그려지게 해주시면 감사하겠습니다. 항상 도움에 감사드립니다. input : Period(250),선두께(3); Var:상승색(Red), 하락색(Blue); Var:j(0),T(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); var : box1(0),box2(0),box3(0),box4(0); Plot1(0); 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,하락색); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; box1 = Box_New(sdate,stime,LoVal[0]-0.25,NextBarSdate,NextBarStime,LoVal[0]-0.50); Box_SetColor(box1,Green); Box_SetFill(box1,true); box2 = box1[1]; Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box1,sDate,sTime,LoVal[0]-0.25); Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } } 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,상승색); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; box3 = Box_New(sdate,stime,HiVal[0]+0.25,NextBarSdate,NextBarStime,HiVal[0]+0.50); Box_SetColor(box3,Yellow); Box_SetFill(box3,true); box4 = box3[1]; Box_SetEnd(box3,Sdate,Stime,HiVal[1]+0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box3,sDate,sTime,HiVal[0]+0.25); Box_SetEnd(box4,Sdate,Stime,HiVal[1]+0.50); } } Box_SetEnd(box1,NextBarSdate,NextBarStime,LoVal[0]-0.5); Box_SetEnd(box3,NextBarSdate,NextBarStime,HiVal[0]+0.5); TL_SetSize(TL1,선두께);
프로필 이미지

천년대로

2024-10-22 17:15:55

죄송합니다만 한번만 더부탁드립니다. 점표시의 크기와 색깔 조정도 부탁드립니다. 감사합니다. input : Period(250),선두께(3); Var:상승색(Red), 하락색(Blue); Var:j(0),T(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); var : box1(0),box2(0),box3(0),box4(0); Plot1(0); 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,하락색); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; box1 = Box_New(sdate,stime,LoVal[0]-0.25,NextBarSdate,NextBarStime,LoVal[0]-0.50); Box_SetColor(box1,Green); Box_SetFill(box1,true); box2 = box1[1]; Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box1,sDate,sTime,LoVal[0]-0.25); Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50); } } 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_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,상승색); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; box3 = Box_New(sdate,stime,HiVal[0]+0.25,NextBarSdate,NextBarStime,HiVal[0]+0.50); Box_SetColor(box3,Yellow); Box_SetFill(box3,true); box4 = box3[1]; Box_SetEnd(box3,Sdate,Stime,HiVal[1]+0.50); } 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]; TL_Delete(tl); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); Box_SetBegin(box3,sDate,sTime,HiVal[0]+0.25); Box_SetEnd(box4,Sdate,Stime,HiVal[1]+0.50); } } Box_SetEnd(box1,NextBarSdate,NextBarStime,LoVal[0]-0.5); Box_SetEnd(box3,NextBarSdate,NextBarStime,HiVal[0]+0.5); TL_SetSize(TL1,선두께); var : tx99(0); if T == -1 and T != T[1] Then { tx99 = text_new(sDate,sTime,L,"●"); Text_SetStyle(tx,2,0); Text_SetColor(tx,Blue); if NextBarOpen > 0 Then { PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); } } if T == 1 and T != T[1] Then { tx99 = text_new(sDate,sTime,L,"●"); Text_SetStyle(tx,2,0); Text_SetColor(tx,Red); if NextBarOpen > 0 Then { PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); } }