예스스탁
예스스탁 답변
2025-12-18 10:27:02
안녕하세요
예스스탁입니다.
input : 분1(30),P1(20),Dv1(2);
input : 분2(60),P2(20),Dv2(2);
var : S1(0),D1(0),TM(0),TF1(0),TF2(0),cnt(0);
var : SumSqrt1(0),Std1(0),sum1(0),BBmd1(0),Bbup1(0),BBdn1(0);
var : SumSqrt2(0),Std2(0),sum2(0),BBmd2(0),Bbup2(0),BBdn2(0);
Array : C1[100](0),C2[100](0);
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;
TF1 = TM%분1;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 분1 > 1 and TF1 < TF1[1]) or
(Bdate == Bdate[1] and 분1 > 1 and TM >= TM[1]+분1) or
(Bdate == Bdate[1] and 분1 == 1 and TM > TM[1]) Then
{
for cnt = 99 downto 1
{
C1[cnt] = C1[cnt-1];
}
}
C1[0] = C;
if C1[P1] > 0 then
{
sum1 = 0;
for cnt = 0 to P1-1
{
sum1 = sum1 + C1[cnt];
}
BBmd1 = sum1/P1;
SumSqrt1 = 0;
For cnt = 0 To P1 - 1
{
SumSqrt1 = SumSqrt1 + (C1[cnt] - BBmd1)^2;
}
Std1 = SquareRoot(SumSqrt1 / P1);
BBup1 = BBmd1 + (Dv1 * Std1);
BBdn1 = BBmd1 - (Dv1 * Std1);
Plot1(BBup1,"상단1");
Plot2(BBmd1,"중단1");
Plot3(BBdn1,"하단1");
}
TF2 = TM%분2;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 분2 > 1 and TF2 < TF1[1]) or
(Bdate == Bdate[1] and 분2 > 1 and TM >= TM[1]+분2) or
(Bdate == Bdate[1] and 분2 == 1 and TM > TM[1]) Then
{
for cnt = 99 downto 1
{
C2[cnt] = C2[cnt-1];
}
}
C2[0] = C;
if C2[P2] > 0 then
{
sum2 = 0;
for cnt = 0 to P2-1
{
sum2 = sum2 + C2[cnt];
}
BBmd2 = sum2/P2;
SumSqrt2 = 0;
For cnt = 0 To P2 - 1
{
SumSqrt2 = SumSqrt2 + (C2[cnt] - BBmd2)^2;
}
Std2 = SquareRoot(SumSqrt2 / P2);
BBup2 = BBmd2 + (Dv2 * Std2);
BBdn2 = BBmd2 - (Dv2 * Std2);
Plot4(BBup2,"상단2");
Plot5(BBmd2,"중단2");
Plot6(BBdn2,"하단2");
}
}
즐거운 하루되세요