커뮤니티

지표식 부탁드려요.

프로필 이미지
빛고을
2004-10-31 23:34:04
1453
글번호 5574
답변완료
안녕하세요. 수식작성 예제에 보면 일봉 스톡을 분봉으로 사용하는 수식이 나와 있는데 그냥 스톡말고 아래와 같이 ema 된 슬로우스톡케스틱을 사용하려고 합니다. ema(StochasticsK_C(5,3),3); ema(StochasticsD_C(5,3,3),2); 이렇게 ema 된 일봉 슬로우 스톡을 분봉에서 사용하려면 어떻게 바꾸어야 되는지 궁금합니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2004-11-01 16:19:45

안녕하세요 예스스탁입니다. 아래의 식은 그 자체가 ema를 사용한 식입니다. input : Period(5), Period1(3), Period2(3); 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); #### 특정 구간의 고가 [highest(H,Period)] #### highVal = dayhigh(0); for count = 0 to Period-1 { if dayHigh(count) > highVal then highVal = dayhigh(count); } #### 특정 구간의 저가 [lowest(L,Period)] #### lowVal = daylow(0); for count = 0 to Period-1 { if dayLow(count) < lowVal then lowVal = dayLow(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 date != date[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] 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); plot3(ema(stoK,3)); plot4(ema(stod,2)); 참고하시기 바랍니다. > 빛고을 님이 쓴 글입니다. > 제목 : 지표식 부탁드려요. > 안녕하세요. 수식작성 예제에 보면 일봉 스톡을 분봉으로 사용하는 수식이 나와 있는데 그냥 스톡말고 아래와 같이 ema 된 슬로우스톡케스틱을 사용하려고 합니다. ema(StochasticsK_C(5,3),3); ema(StochasticsD_C(5,3,3),2); 이렇게 ema 된 일봉 슬로우 스톡을 분봉에서 사용하려면 어떻게 바꾸어야 되는지 궁금합니다.