커뮤니티

다시 수식 좀 부탁드립니다???

프로필 이미지
회원
2010-02-06 11:03:35
706
글번호 27921
답변완료
번거롭게해서 미안스럽습니다 아래수식에서 옵션 만기 다음일 즉 월물첫날 기준으로 했으면 합니다 99999일로 하니 당췌... 원래의 취지에 어긋나네요 일봉상 5일이동평균선을 분봉챠트에 구현하고 싶습니다 5일이평은 월물첫날 기준이 아니었으면 합니다 항상고맙습니다. 안녕하세요 예스스탁입니다. var : daycount(0),cnt(0),count1(0),count2(0); var : tempIndex1(0),tempIndex2(0),tempIndex3(0),tempIndex4(0),tempmax(0),tempmin(0),tempminO(0),tempmaxL(0); Array : HH[99](0),OO[99](0),LL[99](0),OOO[99](0),NthlowestH[99](0),NthlowestO[99](0),NthhighestO[99](0),NthhighestL[99](0); if date != date[1] Then{ daycount = daycount+1; } for cnt = 0 to daycount-1{ HH[cnt] = dayhigh(cnt); OO[cnt] = dayOpen(cnt); LL[cnt] = DayLow(cnt); OOO[cnt] = dayOpen(cnt); } For count1 = 0 to daycount-1{ tempmax = 999999999; tempmin = 999999999; tempminO = -999999999; tempmaxL = -999999999; For count2 = 0 to daycount-1{ if tempmax > HH[count2] then { tempmax = HH[count2]; tempIndex1 = count2; } if tempmin > OO[count2] then { tempmin = OO[count2]; tempIndex2 = count2; } if tempminO < OOO[count2] then { tempminO = OOO[count2]; tempIndex3 = count2; } if tempmaxL < LL[count2] then { tempmaxL = LL[count2]; tempIndex4 = count2; } } NthlowestH[count1] = tempmax; HH[tempIndex1] = 999999999; NthlowestO[count1] = tempmin; OO[tempIndex2] = 999999999; NthhighestO[count1] = tempminO; OOO[tempIndex3] = -999999999; NthhighestL[count1] = tempmaxL; LL[tempIndex4] = -999999999; } plot1(NthlowestH[0]); plot2(NthlowestO[1]); plot3(NthhighestO[1]); plot4(NthhighestL[0]); #일봉상 두번째 높은 시가와, 일봉상 제일 높은 저가을 var : daycount(0),cnt(0),count1(0),count2(0); var : tempIndex1(0),tempIndex2(0),tempIndex3(0),tempIndex4(0),tempmax(0),tempmin(0),tempminO(0),tempmaxL(0); Array : HH[99](0),OO[99](0),LL[99](0),OOO[99](0),NthlowestH[99](0),NthlowestO[99](0),NthhighestO[99](0),NthhighestL[99](0); if date != date[1] Then{ daycount = daycount+1; } for cnt = 0 to daycount-1{ HH[cnt] = dayhigh(cnt); OO[cnt] = dayOpen(cnt); LL[cnt] = DayLow(cnt); OOO[cnt] = dayOpen(cnt); } For count1 = 0 to daycount-1{ tempmax = 999999999; tempmin = 999999999; tempminO = -999999999; tempmaxL = -999999999; For count2 = 0 to daycount-1{ if tempmax > HH[count2] then { tempmax = HH[count2]; tempIndex1 = count2; } if tempmin > OO[count2] then { tempmin = OO[count2]; tempIndex2 = count2; } if tempminO < OOO[count2] then { tempminO = OOO[count2]; tempIndex3 = count2; } if tempmaxL < LL[count2] then { tempmaxL = LL[count2]; tempIndex4 = count2; } } NthlowestH[count1] = tempmax; HH[tempIndex1] = 999999999; NthlowestO[count1] = tempmin; OO[tempIndex2] = 999999999; NthhighestO[count1] = tempminO; OOO[tempIndex3] = -999999999; NthhighestL[count1] = tempmaxL; LL[tempIndex4] = -999999999; } plot1(NthlowestH[0]); plot2(NthlowestO[1]); plot3(NthhighestO[1]);#일봉상 두번째 높은 시가 plot4(NthhighestL[0]);#일봉상 제일 높은 저가 즐거운 하루되세요 > HI_coco 님이 쓴 글입니다. > 제목 : 수식 좀 부탁드립니다... > 아래 지난번 만들어주신 것에 추가하고 싶습니다 너무 잘만들어 주셔서 일단 감사드립니다. 아래에다가 제가 더 만들려니 에러만 나고 되지 않아서 부탁드립니다. 아래 수식에다가 일봉상 두번째 높은 시가와, 일봉상 제일 높은 저가을 추가해서 분봉챠트에 구현하고 싶습니다 지난번 것처럼 해주시면 됩니다. 선이 4개가 한번에 나오게 될것 같은데요 너무 감사드립니다 수고하세요... 안녕하세요 예스스탁입니다. var : daycount(0),cnt(0),count1(0),count2(0),tempmax(0),tempIndex1(0),tempIndex2(0),tempmin(0); Array : HH[99](0),OO[99](0),NthlowestH[99](0),NthlowestO[99](0); if date != date[1] Then{ daycount = daycount+1; } for cnt = 0 to daycount-1{ HH[cnt] = dayhigh(cnt); OO[cnt] = dayOpen(cnt); } For count1 = 0 to daycount-1{ tempmax = 999999999; tempmin = 999999999; For count2 = 0 to daycount-1{ if tempmax > HH[count2] then { tempmax = HH[count2]; tempIndex1 = count2; } if tempmin > OO[count2] then { tempmin = OO[count2]; tempIndex2 = count2; } } NthlowestH[count1] = tempmax; HH[tempIndex1] = 999999999; NthlowestO[count1] = tempmin; OO[tempIndex2] = 999999999; } plot1(NthlowestH[0]); plot2(NthlowestO[1]); [0]이 가장낮은값 [1]이 두번째 낮은 값입니다. 즐거운 하루되세요 > HI_coco 님이 쓴 글입니다. > 제목 : Re : Re : 부탁드립니다? > 일봉의 기준을 분봉에 적용하는 건데요 분봉에 적용하니 분봉챠트 기준으로 나오는데요 수정 좀 부탁드립니다 일봉 기준이 그대로 분봉챠트에 나오게 해 주세요 감사합니다 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 부탁드립니다? > 안녕하세요 예스스탁입니다. var1 = Lowest(H,dayindex+1); var2 = NthLowest(2,L,dayindex+1); plot1(var1); plot2(var2); 즐거운 하루되세요 > HI_coco 님이 쓴 글입니다. > 제목 : 부탁드립니다? > 일봉상 제일 낮은 고가와 일봉상 두번째 낮은 시가을 분봉챠트에 수평라인으로 나오게 하고 싶습니다. ▲ 이전글 특정 구간의 고가 ▼ 다음글 식 문의 드립니다. 관련 글 리스트 번호 분류 제목 작성자 첨부화일 작성일 조회 13387 수식 좀 부탁드립니다... HI_coco 2010-02-05 24
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2010-02-08 14:45:39

안녕하세요 예스스탁입니다. 1. var : daycount(0),cnt(0),count1(0),count2(0); var : tempIndex1(0),tempIndex2(0),tempIndex3(0),tempIndex4(0),tempmax(0),tempmin(0),tempminO(0),tempmaxL(0); Array : HH[99](0),OO[99](0),LL[99](0),OOO[99](0),NthlowestH[99](0),NthlowestO[99](0),NthhighestO[99](0),NthhighestL[99](0); var : va1(0),va2(0),va3(0); va2 = date - int(date/100)*100; //일 va3 = DayOfWeek(date); //요일 if va2 >= 8 and va2 <= 14 and // 8일에서 14일 사이이고 va3 == 4 then // 목요일 Condition1 = True; Else Condition1 = False; if date != date[1] and Condition1[1] == true and Condition1 == false Then daycount = 0; if date != date[1] Then{ daycount = daycount+1; } for cnt = 0 to daycount-1{ HH[cnt] = dayhigh(cnt); OO[cnt] = dayOpen(cnt); LL[cnt] = DayLow(cnt); OOO[cnt] = dayOpen(cnt); } For count1 = 0 to daycount-1{ tempmax = 999999999; tempmin = 999999999; tempminO = -999999999; tempmaxL = -999999999; For count2 = 0 to daycount-1{ if tempmax > HH[count2] then { tempmax = HH[count2]; tempIndex1 = count2; } if tempmin > OO[count2] then { tempmin = OO[count2]; tempIndex2 = count2; } if tempminO < OOO[count2] then { tempminO = OOO[count2]; tempIndex3 = count2; } if tempmaxL < LL[count2] then { tempmaxL = LL[count2]; tempIndex4 = count2; } } NthlowestH[count1] = tempmax; HH[tempIndex1] = 999999999; NthlowestO[count1] = tempmin; OO[tempIndex2] = 999999999; NthhighestO[count1] = tempminO; OOO[tempIndex3] = -999999999; NthhighestL[count1] = tempmaxL; LL[tempIndex4] = -999999999; } plot1(NthlowestH[0]); plot2(NthlowestO[1]); plot3(NthhighestO[1]); plot4(NthhighestL[0]); 2. input : P1(5); var : sumV(0), maV(0), count(0); sumV = 0; for count = 0 to P1-1 { sumV = sumV+DayClose(count); } maV = sumV / P1; plot1(mav,"분봉에서일봉이평"); 즐거운 하루되세요 > HI_coco 님이 쓴 글입니다. > 제목 : 다시 수식 좀 부탁드립니다??? > 번거롭게해서 미안스럽습니다 아래수식에서 옵션 만기 다음일 즉 월물첫날 기준으로 했으면 합니다 99999일로 하니 당췌... 원래의 취지에 어긋나네요 일봉상 5일이동평균선을 분봉챠트에 구현하고 싶습니다 5일이평은 월물첫날 기준이 아니었으면 합니다 항상고맙습니다. 안녕하세요 예스스탁입니다. var : daycount(0),cnt(0),count1(0),count2(0); var : tempIndex1(0),tempIndex2(0),tempIndex3(0),tempIndex4(0),tempmax(0),tempmin(0),tempminO(0),tempmaxL(0); Array : HH[99](0),OO[99](0),LL[99](0),OOO[99](0),NthlowestH[99](0),NthlowestO[99](0),NthhighestO[99](0),NthhighestL[99](0); if date != date[1] Then{ daycount = daycount+1; } for cnt = 0 to daycount-1{ HH[cnt] = dayhigh(cnt); OO[cnt] = dayOpen(cnt); LL[cnt] = DayLow(cnt); OOO[cnt] = dayOpen(cnt); } For count1 = 0 to daycount-1{ tempmax = 999999999; tempmin = 999999999; tempminO = -999999999; tempmaxL = -999999999; For count2 = 0 to daycount-1{ if tempmax > HH[count2] then { tempmax = HH[count2]; tempIndex1 = count2; } if tempmin > OO[count2] then { tempmin = OO[count2]; tempIndex2 = count2; } if tempminO < OOO[count2] then { tempminO = OOO[count2]; tempIndex3 = count2; } if tempmaxL < LL[count2] then { tempmaxL = LL[count2]; tempIndex4 = count2; } } NthlowestH[count1] = tempmax; HH[tempIndex1] = 999999999; NthlowestO[count1] = tempmin; OO[tempIndex2] = 999999999; NthhighestO[count1] = tempminO; OOO[tempIndex3] = -999999999; NthhighestL[count1] = tempmaxL; LL[tempIndex4] = -999999999; } plot1(NthlowestH[0]); plot2(NthlowestO[1]); plot3(NthhighestO[1]); plot4(NthhighestL[0]); #일봉상 두번째 높은 시가와, 일봉상 제일 높은 저가을 var : daycount(0),cnt(0),count1(0),count2(0); var : tempIndex1(0),tempIndex2(0),tempIndex3(0),tempIndex4(0),tempmax(0),tempmin(0),tempminO(0),tempmaxL(0); Array : HH[99](0),OO[99](0),LL[99](0),OOO[99](0),NthlowestH[99](0),NthlowestO[99](0),NthhighestO[99](0),NthhighestL[99](0); if date != date[1] Then{ daycount = daycount+1; } for cnt = 0 to daycount-1{ HH[cnt] = dayhigh(cnt); OO[cnt] = dayOpen(cnt); LL[cnt] = DayLow(cnt); OOO[cnt] = dayOpen(cnt); } For count1 = 0 to daycount-1{ tempmax = 999999999; tempmin = 999999999; tempminO = -999999999; tempmaxL = -999999999; For count2 = 0 to daycount-1{ if tempmax > HH[count2] then { tempmax = HH[count2]; tempIndex1 = count2; } if tempmin > OO[count2] then { tempmin = OO[count2]; tempIndex2 = count2; } if tempminO < OOO[count2] then { tempminO = OOO[count2]; tempIndex3 = count2; } if tempmaxL < LL[count2] then { tempmaxL = LL[count2]; tempIndex4 = count2; } } NthlowestH[count1] = tempmax; HH[tempIndex1] = 999999999; NthlowestO[count1] = tempmin; OO[tempIndex2] = 999999999; NthhighestO[count1] = tempminO; OOO[tempIndex3] = -999999999; NthhighestL[count1] = tempmaxL; LL[tempIndex4] = -999999999; } plot1(NthlowestH[0]); plot2(NthlowestO[1]); plot3(NthhighestO[1]);#일봉상 두번째 높은 시가 plot4(NthhighestL[0]);#일봉상 제일 높은 저가 즐거운 하루되세요 > HI_coco 님이 쓴 글입니다. > 제목 : 수식 좀 부탁드립니다... > 아래 지난번 만들어주신 것에 추가하고 싶습니다 너무 잘만들어 주셔서 일단 감사드립니다. 아래에다가 제가 더 만들려니 에러만 나고 되지 않아서 부탁드립니다. 아래 수식에다가 일봉상 두번째 높은 시가와, 일봉상 제일 높은 저가을 추가해서 분봉챠트에 구현하고 싶습니다 지난번 것처럼 해주시면 됩니다. 선이 4개가 한번에 나오게 될것 같은데요 너무 감사드립니다 수고하세요... 안녕하세요 예스스탁입니다. var : daycount(0),cnt(0),count1(0),count2(0),tempmax(0),tempIndex1(0),tempIndex2(0),tempmin(0); Array : HH[99](0),OO[99](0),NthlowestH[99](0),NthlowestO[99](0); if date != date[1] Then{ daycount = daycount+1; } for cnt = 0 to daycount-1{ HH[cnt] = dayhigh(cnt); OO[cnt] = dayOpen(cnt); } For count1 = 0 to daycount-1{ tempmax = 999999999; tempmin = 999999999; For count2 = 0 to daycount-1{ if tempmax > HH[count2] then { tempmax = HH[count2]; tempIndex1 = count2; } if tempmin > OO[count2] then { tempmin = OO[count2]; tempIndex2 = count2; } } NthlowestH[count1] = tempmax; HH[tempIndex1] = 999999999; NthlowestO[count1] = tempmin; OO[tempIndex2] = 999999999; } plot1(NthlowestH[0]); plot2(NthlowestO[1]); [0]이 가장낮은값 [1]이 두번째 낮은 값입니다. 즐거운 하루되세요 > HI_coco 님이 쓴 글입니다. > 제목 : Re : Re : 부탁드립니다? > 일봉의 기준을 분봉에 적용하는 건데요 분봉에 적용하니 분봉챠트 기준으로 나오는데요 수정 좀 부탁드립니다 일봉 기준이 그대로 분봉챠트에 나오게 해 주세요 감사합니다 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 부탁드립니다? > 안녕하세요 예스스탁입니다. var1 = Lowest(H,dayindex+1); var2 = NthLowest(2,L,dayindex+1); plot1(var1); plot2(var2); 즐거운 하루되세요 > HI_coco 님이 쓴 글입니다. > 제목 : 부탁드립니다? > 일봉상 제일 낮은 고가와 일봉상 두번째 낮은 시가을 분봉챠트에 수평라인으로 나오게 하고 싶습니다. ▲ 이전글 특정 구간의 고가 ▼ 다음글 식 문의 드립니다. 관련 글 리스트 번호 분류 제목 작성자 첨부화일 작성일 조회 13387 수식 좀 부탁드립니다... HI_coco 2010-02-05 24