StochasticsSlow 일봉을
10분봉에 지표에 표시 하고 싶읍니다
답변 1
예스스탁
예스스탁 답변
2019-11-04 15:31:30
안녕하세요
예스스탁입니다.
input : Period(10), Period1(5), Period2(5);
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(20);
PlotBaseLine2(80);
즐거운 하루되세요
> 크레신 님이 쓴 글입니다.
> 제목 : 질문 입니다
> StochasticsSlow 일봉을
10분봉에 지표에 표시 하고 싶읍니다