예스스탁
예스스탁 답변
2025-12-01 12:59:08
안녕하세요
예스스탁입니다.
input : 분주기(5),Sto1(10),Sto2(5),Sto3(5);
var : S1(0),D1(0),TM(0),TF(0),Bar(0);
var : cnt(0), Hv(0), LV(0), FK(0), SK(0), SD(0);
var : Ep1(0), EP2(0), JISU(0), DINDEX(0), PreSK(0), PreSD(0);
Array : HH[100](0),LL[10](0);
var : stok(0),stod(0);
Ep1 = 2/(sto2+1);
Ep2 = 2/(sto3+1);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%분주기;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 분주기 > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and 분주기 > 1 and TM >= TM[1]+분주기) or
(Bdate == Bdate[1] and 분주기 == 1 and TM > TM[1]) Then
{
bar = bar+1;
for cnt = 99 downto 1
{
HH[cnt] = HH[cnt-1];
LL[cnt] = LL[cnt-1];
}
HH[0] = H;
LL[0] = L;
PreSK = SK[1];
PreSD = SD[1];
}
if H > HH[0] Then
HH[0] = H;
if L < LL[0] Then
LL[0] = L;
if bar >= Sto1 then
{
Hv = 0;
LV = 0;
for cnt = 0 to sto1-1
{
if HV == 0 or (HV > 0 and HH[cnt] > Hv) then
Hv = HH[cnt];
if LV == 0 or (LV > 0 and LL[cnt] < LV) then
LV = LL[cnt];
}
FK = (C-LV)/(HV-LV)*100;
if bar >= Sto1 then
{
if bar == sto1 Then
{
SK = FK;
SD = SK;
}
else
{
SK = FK * EP1 + PreSK * (1-EP1);
SD = SK * EP2 + PreSD * (1-EP2);
}
plot1(SK,"타분봉stok");
plot2(SD,"타분봉stod");
}
}
}
stok = StochasticsK(sto1,sto2);
stod = StochasticsD(sto1,sto2,sto3);
plot3(stok,"stok");
plot4(stod,"stod");
PlotBaseLine1(20);
PlotBaseLine2(80);
즐거운 하루되세요