커뮤니티

지표 문의

프로필 이미지
유로만
2021-05-11 05:38:29
1052
글번호 148896
답변완료
Input : Period(20), Period1(10), Period2(10),TargetUpLevel(80),TargetDnLevel(20); var:LowValue(0),HighValue(0),fstK(0),stoK(0),stoD(0),EP1(0),EP2(0); EP1 = 2/(Period1 + 1); EP2 = 2/(Period2 + 1); LowValue = lowest(L,Period); HighValue = highest(H,Period); fstK = (C - LowValue)/(HighValue - LowValue) * 100; stoK = Ema(fstK,Period1); stoD = Ema(stoK,Period2); plot1(stok); plot2(stod); 일봉/ 주봉 데이타를 분봉에 적용하고 싶습니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-05-11 14:23:39

안녕하세요 예스스탁입니다. 1 일봉 input : Period(20), Period1(10), Period2(10),TargetUpLevel(80),TargetDnLevel(20); var : cnt(0), highVal(0), lowVal(0), FK(0), SK(0), SD(0); var : Ep1(0), Ep2(0), PreSK(0), PreSD(0); #N일간 최고가 및 최저가 highVal = dayhigh(0); lowVal = daylow(0); for cnt = 0 to Period-1 { if dayHigh(cnt) > highVal then highVal = dayhigh(cnt); if dayLow(cnt) < lowVal then lowVal = dayLow(cnt); } #Fast StochasticsK fK = (C-lowVal)/(highVal-lowVal)*100; #Slow StochasticsK / Slow StochasticsD Ep1 = 2/(Period1+1); Ep2 = 2/(Period2+1); if bdate != bdate[1] then { PreSK = SK[1]; PreSD = SD[1]; } SK = FK * EP1 + PreSK * (1-EP1); SD = SK * EP2 + PreSD * (1-EP2); plot1(SK,"일봉 SlowK"); plot2(SD,"일봉 SlowD"); PlotBaseLine1(TargetDnLevel); PlotBaseLine2(TargetUpLevel); 2 주봉 Input : Period(20), Period1(10), Period2(10),TargetUpLevel(80),TargetDnLevel(20); var : TF1(0),TF2(0),Ep1(0), EP2(0),cnt(0); var : hVal1(0), lVal1(0), StoFastK(0), StoK(0), StoD(0); var : JISU(0), DINDEX(0), PreStoK(0), PreStoD(0); Array : H1[50](0),L1[50](0); Ep1 = 2/(Period1+1); Ep2 = 2/(Period2+1); if DayOfWeek(bdate) < DayOfWeek(bdate[1]) Then { H1[0] = H; L1[0] = L; for cnt = 1 to 49{ H1[cnt] = H1[cnt-1][1]; L1[cnt] = L1[cnt-1][1]; } DINDEX = DINDEX + 1; PreStoK = StoK[1]; PreStoD = StoD[1]; } if H > H1[0] Then H1[0] = H; if L < L1[0] Then L1[0] = L; hVal1 = H1[0]; lVal1 = L1[0]; for cnt = 0 to Period-1 { if H1[cnt] > hVal1 then hVal1 = H1[cnt]; if L1[cnt] < lval1 then LVal1 = L1[cnt]; } StoFastK = (C-lVal1)/(hVal1-lVal1)*100; if DINDEX <= 1 then { StoK = StoFastK ; StoD = StoK ; } else{ StoK = StoFastK * EP1 + PreStoK * (1-EP1); StoD = StoK * EP2 + PreStoD * (1-EP2); } plot1(StoK); plot2(StoD); PlotBaseLine1(TargetDnLevel); PlotBaseLine2(TargetUpLevel); 즐거운 하루되세요 > 유로만 님이 쓴 글입니다. > 제목 : 지표 문의 > Input : Period(20), Period1(10), Period2(10),TargetUpLevel(80),TargetDnLevel(20); var:LowValue(0),HighValue(0),fstK(0),stoK(0),stoD(0),EP1(0),EP2(0); EP1 = 2/(Period1 + 1); EP2 = 2/(Period2 + 1); LowValue = lowest(L,Period); HighValue = highest(H,Period); fstK = (C - LowValue)/(HighValue - LowValue) * 100; stoK = Ema(fstK,Period1); stoD = Ema(stoK,Period2); plot1(stok); plot2(stod); 일봉/ 주봉 데이타를 분봉에 적용하고 싶습니다.