커뮤니티

타주기 참조

프로필 이미지
느림보
2007-03-22 22:14:46
1098
글번호 12176
답변완료
30분봉에서 일봉의 지표를 참조하고 싶습니다. 즉, 일봉에서 스톡캐스틱이 전일보다 상승하고 있으며 30분봉에서 스톡캐스틱이 하락에서 상승으로 전환하고 있는경우 매수하고자하는 시스템 식을 부탁합니다. 감사합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2007-03-26 10:45:38

안녕하세요 예스스탁입니다. input : Period(20), Period1(12), Period2(12); 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); value1 = StochasticsK(period,period1); value2 = StochasticsD(period,period1,period2); #### 특정 구간의 고가 [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]; var1 = stok[1]; var2 = stod[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) if Stod > var2 and value2 > value2[1] and value2[1] < value[2] then buy(); 즐거운 하루되세요 > 느림보 님이 쓴 글입니다. > 제목 : 타주기 참조 > 30분봉에서 일봉의 지표를 참조하고 싶습니다. 즉, 일봉에서 스톡캐스틱이 전일보다 상승하고 있으며 30분봉에서 스톡캐스틱이 하락에서 상승으로 전환하고 있는경우 매수하고자하는 시스템 식을 부탁합니다. 감사합니다