커뮤니티

문의드립니다

프로필 이미지
cjfdk
2011-12-13 22:52:21
414
글번호 45745
답변완료
input : 분(30),Period(10), Period1(6), Period2(6); var : count(0), highVal(0), lowVal(0), StoFastK(0), StoK(0), StoD(0); var : Ep(0), EP1(0), JISU(0), DINDEX(0), PreStoK(0), PreStoD(0),cnt(0); Array : HH[20](0),LL[20](0); var1 = TimeToMinutes(stime)%분; if dayindex == 0 or var1 < var1[1] Then{ HH[0] = H; LL[0] = L; for cnt = 1 to 19{ HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; #### 특정 구간의 고가 [highest(H,Period)] #### highVal = HH[0]; for count = 0 to Period-1 { if HH[count] > highVal then highVal = HH[count]; } #### 특정 구간의 저가 [lowest(L,Period)] #### lowVal = LL[0]; for count = 0 to Period-1 { if LL[count] < lowVal then lowVal = LL[count]; } #### Fast StochasticsK #### StoFastK = (C-lowVal)/(highVal-lowVal)*100; //Fast StochasticsK ==> (C-lowest(L,Period))/(highest(H,Period)-lowest(L,Period))*100 #### Slow StochasticsK #### Ep = 2/(Period1+1); if DINDEX >= Period and (date != date[1] or var1 < var1[1]) then { DINDEX = DINDEX + 1; PreStoK = StoK[1]; } if DINDEX <= 1 then StoK = StoFastK ; else StoK = StoFastK * EP + PreStoK * (1-EP); //Slow StochasticsK ==> ema(Fast StochasticsK, Period1) #### Slow StochasticsD #### Ep1 = 2/(Period2+1); if date != date[1] or var1 < var1[1] then { DINDEX = DINDEX + 1; PreStoD = StoD[1]; } if DINDEX <= 1 then StoD = StoK ; else StoD = StoK * EP1 + PreStoD * (1-EP1); //Slow StochasticsD ==> ema(Slow StochasticsK, Period2) plot1(StoK); plot2(StoD); 수고 많으십니다 위 수식은 분봉에서 30분 스톡을 표현한 수식으로 여기 게시판에서 얻어 참고 하고 있습니다 질문은 plot1과 plot2의 값이 서로 만날때 쯤엔 두 선의 값의 차이를 눈으로 확인하기 어려워서 이런 수식을 부탁드립니다 plot1이 plot2의 값보다 위에 있고 두 선의 값이 10이상 차이 날때는 무슨색 10~5까지는 무슨색 5이하일때는 무슨색... 반대로 plot1이 plot2의 값보다 아래에 있고 두 선의 값의 차이가 10이상 일때는 무슨색 10~5까지는 무슨색 5이하일때는 무슨색... 그리고 위 수식 갭보증 &#46080; 수식도 부탁드립니다 감사합니다
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-12-14 11:37:47

안녕하세요 예스스탁입니다. 1. Stok가 Stod보다 큰상태에서 10이상차이나면 초록색 10~5 차이나면 자주색 5이하로 차이나면 붉은색으로 표시됩니다 Stok가 Stod보다 작은상태에서 10이상차이나면 회색 10~5 차이나면 하늘색 5이하로 차이나면 파란색으로 표시됩니다 input : 분(30),Period(10), Period1(6), Period2(6); var : count(0), highVal(0), lowVal(0), StoFastK(0), StoK(0), StoD(0); var : Ep(0), EP1(0), JISU(0), DINDEX(0), PreStoK(0), PreStoD(0),cnt(0); Array : HH[20](0),LL[20](0); var1 = TimeToMinutes(stime)%분; if dayindex == 0 or var1 < var1[1] Then{ HH[0] = H; LL[0] = L; for cnt = 1 to 19{ HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; #### 특정 구간의 고가 [highest(H,Period)] #### highVal = HH[0]; for count = 0 to Period-1 { if HH[count] > highVal then highVal = HH[count]; } #### 특정 구간의 저가 [lowest(L,Period)] #### lowVal = LL[0]; for count = 0 to Period-1 { if LL[count] < lowVal then lowVal = LL[count]; } #### Fast StochasticsK #### StoFastK = (C-lowVal)/(highVal-lowVal)*100; //Fast StochasticsK ==> (C-lowest(L,Period))/(highest(H,Period)-lowest(L,Period))*100 #### Slow StochasticsK #### Ep = 2/(Period1+1); if DINDEX >= Period and (date != date[1] or var1 < var1[1]) then { DINDEX = DINDEX + 1; PreStoK = StoK[1]; } if DINDEX <= 1 then StoK = StoFastK ; else StoK = StoFastK * EP + PreStoK * (1-EP); //Slow StochasticsK ==> ema(Fast StochasticsK, Period1) #### Slow StochasticsD #### Ep1 = 2/(Period2+1); if date != date[1] or var1 < var1[1] then { DINDEX = DINDEX + 1; PreStoD = StoD[1]; } if DINDEX <= 1 then StoD = StoK ; else StoD = StoK * EP1 + PreStoD * (1-EP1); //Slow StochasticsD ==> ema(Slow StochasticsK, Period2) if StoK > StoD Then{ if StoK-StoD > 10 Then{ plot1(StoK,"StoK",GREEN); plot2(StoD,"StoD",GREEN); } if StoK-StoD <= 10 and StoK-StoD > 5 Then{ plot1(StoK,"StoK",MAGENTA); plot2(StoD,"StoD",MAGENTA); } if StoK-StoD <= 5 Then{ plot1(StoK,"StoK",RED); plot2(StoD,"StoD",RED); } } if StoK <= StoD Then{ if StoD-StoK > 10 Then{ plot1(StoK,"StoK",Gray); plot2(StoD,"StoD",Gray); } if StoD-StoK <= 10 and StoK-StoD > 5 Then{ plot1(StoK,"StoK",CYAN); plot2(StoD,"StoD",CYAN); } if StoD-StoK <= 5 Then{ plot1(StoK,"StoK",Blue); plot2(StoD,"StoD",Blue); } } 2.위식을 갭보정한 식입니다. input : 분(30),Period(10), Period1(6), Period2(6); var : count(0), highVal(0), lowVal(0), StoFastK(0), StoK(0), StoD(0); var : Ep(0), EP1(0), JISU(0), DINDEX(0), PreStoK(0), PreStoD(0),cnt(0); var : sumGap(0), gap(0), GO(0), GH(0), GL(0), GC(0); Array : HH[20](0),LL[20](0); if date!=date[1] then { // 날짜가 변경되는 봉에서(분봉에서 첫번째 봉) gap = Open-Close[1]; // 일간갭 sumGap = sumGap+gap; // 일간갭 누적 } GO = O - sumGap;// 갭보정 시가 GH = H - sumGap;// 갭보정 고가 GL = L - sumGap;// 갭보정 저가 GC = C - sumGap; // 갭보정 종가 var1 = TimeToMinutes(stime)%분; if dayindex == 0 or var1 < var1[1] Then{ HH[0] = GH; LL[0] = GL; for cnt = 1 to 19{ HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } } if GH > HH[0] Then HH[0] = GH; if GL < LL[0] Then LL[0] = GL; #### 특정 구간의 고가 [highest(H,Period)] #### highVal = HH[0]; for count = 0 to Period-1 { if HH[count] > highVal then highVal = HH[count]; } #### 특정 구간의 저가 [lowest(L,Period)] #### lowVal = LL[0]; for count = 0 to Period-1 { if LL[count] < lowVal then lowVal = LL[count]; } #### Fast StochasticsK #### StoFastK = (GC-lowVal)/(highVal-lowVal)*100; //Fast StochasticsK ==> (C-lowest(L,Period))/(highest(H,Period)-lowest(L,Period))*100 #### Slow StochasticsK #### Ep = 2/(Period1+1); if DINDEX >= Period and (date != date[1] or var1 < var1[1]) then { DINDEX = DINDEX + 1; PreStoK = StoK[1]; } if DINDEX <= 1 then StoK = StoFastK ; else StoK = StoFastK * EP + PreStoK * (1-EP); //Slow StochasticsK ==> ema(Fast StochasticsK, Period1) #### Slow StochasticsD #### Ep1 = 2/(Period2+1); if date != date[1] or var1 < var1[1] then { DINDEX = DINDEX + 1; PreStoD = StoD[1]; } if DINDEX <= 1 then StoD = StoK ; else StoD = StoK * EP1 + PreStoD * (1-EP1); //Slow StochasticsD ==> ema(Slow StochasticsK, Period2) if StoK > StoD Then{ if StoK-StoD > 10 Then{ plot1(StoK,"StoK",GREEN); plot2(StoD,"StoD",GREEN); } if StoK-StoD <= 10 and StoK-StoD > 5 Then{ plot1(StoK,"StoK",MAGENTA); plot2(StoD,"StoD",MAGENTA); } if StoK-StoD <= 5 Then{ plot1(StoK,"StoK",RED); plot2(StoD,"StoD",RED); } } if StoK <= StoD Then{ if StoD-StoK > 10 Then{ plot1(StoK,"StoK",Gray); plot2(StoD,"StoD",Gray); } if StoD-StoK <= 10 and StoK-StoD > 5 Then{ plot1(StoK,"StoK",CYAN); plot2(StoD,"StoD",CYAN); } if StoD-StoK <= 5 Then{ plot1(StoK,"StoK",Blue); plot2(StoD,"StoD",Blue); } } 즐거운 하루되세요 > cjfdk 님이 쓴 글입니다. > 제목 : 문의드립니다 > input : 분(30),Period(10), Period1(6), Period2(6); var : count(0), highVal(0), lowVal(0), StoFastK(0), StoK(0), StoD(0); var : Ep(0), EP1(0), JISU(0), DINDEX(0), PreStoK(0), PreStoD(0),cnt(0); Array : HH[20](0),LL[20](0); var1 = TimeToMinutes(stime)%분; if dayindex == 0 or var1 < var1[1] Then{ HH[0] = H; LL[0] = L; for cnt = 1 to 19{ HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; #### 특정 구간의 고가 [highest(H,Period)] #### highVal = HH[0]; for count = 0 to Period-1 { if HH[count] > highVal then highVal = HH[count]; } #### 특정 구간의 저가 [lowest(L,Period)] #### lowVal = LL[0]; for count = 0 to Period-1 { if LL[count] < lowVal then lowVal = LL[count]; } #### Fast StochasticsK #### StoFastK = (C-lowVal)/(highVal-lowVal)*100; //Fast StochasticsK ==> (C-lowest(L,Period))/(highest(H,Period)-lowest(L,Period))*100 #### Slow StochasticsK #### Ep = 2/(Period1+1); if DINDEX >= Period and (date != date[1] or var1 < var1[1]) then { DINDEX = DINDEX + 1; PreStoK = StoK[1]; } if DINDEX <= 1 then StoK = StoFastK ; else StoK = StoFastK * EP + PreStoK * (1-EP); //Slow StochasticsK ==> ema(Fast StochasticsK, Period1) #### Slow StochasticsD #### Ep1 = 2/(Period2+1); if date != date[1] or var1 < var1[1] then { DINDEX = DINDEX + 1; PreStoD = StoD[1]; } if DINDEX <= 1 then StoD = StoK ; else StoD = StoK * EP1 + PreStoD * (1-EP1); //Slow StochasticsD ==> ema(Slow StochasticsK, Period2) plot1(StoK); plot2(StoD); 수고 많으십니다 위 수식은 분봉에서 30분 스톡을 표현한 수식으로 여기 게시판에서 얻어 참고 하고 있습니다 질문은 plot1과 plot2의 값이 서로 만날때 쯤엔 두 선의 값의 차이를 눈으로 확인하기 어려워서 이런 수식을 부탁드립니다 plot1이 plot2의 값보다 위에 있고 두 선의 값이 10이상 차이 날때는 무슨색 10~5까지는 무슨색 5이하일때는 무슨색... 반대로 plot1이 plot2의 값보다 아래에 있고 두 선의 값의 차이가 10이상 일때는 무슨색 10~5까지는 무슨색 5이하일때는 무슨색... 그리고 위 수식 갭보증 &#46080; 수식도 부탁드립니다 감사합니다