안녕하세요
예스스탁입니다.
var : cnt(0);
Array : DH[100](0),DL[100](0),DC[100](0),DO[100](0);
if (sdate != sdate[1] and stime >= 091500) or
(sdate == sdate[1] and stime >= 091500 and stime[1] < 091500) then
{
DO[0] = O;
DH[0] = H;
DL[0] = L;
for cnt = 1 to 99
{
DO[cnt] = DO[cnt-1][1];
DH[cnt] = DH[cnt-1][1];
DL[cnt] = DL[cnt-1][1];
DC[cnt] = DC[cnt-1][1];
}
}
if H > DH[0] Then
DH[0] = H;
if L < DL[0] Then
DL[0] = L;
DC[0] = C;
input : ntime1(30);
var : S1(0),D1(0),TM1(0),TF1(0);
if (sdate != sdate[1] and stime >= 091500) or
(sdate == sdate[1] and stime >= 091500 and stime[1] < 091500) then
{
S1 = TimeToMinutes(091500);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM1 = TimeToMinutes(stime)-S1;
Else
TM1 = TimeToMinutes(stime)+1440-S1;
TF1 = TM1%ntime1;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime1 > 1 and TF1 < TF1[1]) or
(Bdate == Bdate[1] and ntime1 > 1 and TM1 >= TM1[1]+ntime1) or
(Bdate == Bdate[1] and ntime1 == 1 and TM1 > TM1[1]) Then
{
var1 = O;
}
}
input : ntime2(60);
var : S2(0),D2(0),TM2(0),TF2(0);
if (sdate != sdate[1] and stime >= 091500) or
(sdate == sdate[1] and stime >= 091500 and stime[1] < 091500) then
{
S2 = TimeToMinutes(091500);
D2 = sdate;
}
if D2 > 0 then
{
if sdate == D2 Then
TM2 = TimeToMinutes(stime)-S2;
Else
TM2 = TimeToMinutes(stime)+1440-S2;
TF2 = TM2%ntime2;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime2 > 1 and TF2 < TF2[1]) or
(Bdate == Bdate[1] and ntime2 > 1 and TM2 >= TM2[1]+ntime2) or
(Bdate == Bdate[1] and ntime2 == 1 and TM2 > TM2[1]) Then
{
var2 = O;
}
}
plot1(DH[0],"당일고가");
plot2(DL[0],"당일저가");
plot3(var1,"30분시가");
plot4(var2,"60분시가");
즐거운 하루되세요