커뮤니티
문의드립니다~
2017-09-17 08:14:48
115
글번호 112833
input : 분주기(30),P(5),분주기1(15);
var : S1(0),D1(0),TM(0),TF(0);
var : cnt(0),sum(0),mav(0),tf1(0),TFF(0),entry(false);
Array : CC[100](0),OO[100](0),HH[100](0),LL[100](0),TT[100](0),ii[100](0);
Array : C1[100](0),T1[100](0);
if (sdate != sdate[1] and stime >= 100000) or
(sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) Then{
S1 = TimeToMinutes(100000);
D1 = sdate;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TFF = TM%60;
TF = TM%분주기;
if (sdate != sdate[1] and stime >= 100000) or
(sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or
(TF < TF[1]) Then{
OO[0] = o;
HH[0] = H;
LL[0] = L;
TT[0] = stime;
ii[0] = 0;
for cnt = 1 to 99{
OO[cnt] = OO[cnt-1][1];
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
CC[cnt] = CC[cnt-1][1];
TT[cnt] = TT[cnt-1][1];
ii[cnt] = ii[cnt-1][1];
}
}
if H > HH[0] Then
HH[0] = H;
if L < LL[0] Then
LL[0] = L;
CC[0] = C;
ii[0] = ii[0]+1;
TF1 = TM%분주기1;
if (sdate != sdate[1] and stime >= 100000) or
(sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or
(TF1 < TF1[1]) Then{
T1[0] = stime;
for cnt = 1 to 99{
C1[cnt] = C1[cnt-1][1];
T1[cnt] = T1[cnt-1][1];
}
}
C1[0] = C;
entry = true;
if stime >= 110000 and stime < 120000 and ii[1]+ii[2] < 55 Then
entry = false;
if stime >= 230000 and stime < 10000 and ii[1]+ii[2] < 55 Then
entry = false;
}
///////
위 식을 사용중인데요~
30분과 15분말고 60분과 30분으로 적용하고 싶은데요~
input : 분주기(30),P(5),분주기1(15);
이부분에서 30과 15를 60과30으로 변경하니깐 적용이 안되어서요~
수정 좀 부탁드립니다
좋은하루 되세요~
답변 1
예스스탁 예스스탁 답변
2017-09-18 10:46:13
안녕하세요
예스스탁입니다.
수식에 문제가 없습니다.
수식은 항생전용의 식이고 확인해 보았지만 값 정상적으로 리턴됩니다.
아래식 적용해 보시기 바랍니다.
분주기와 분주기1 값 변경시 지표가 정상적으로 그려지고 있습니다.
plot1이 분주기 plot2가 분주기1값입니다.
input : 분주기(30),P(5),분주기1(15);
var : S1(0),D1(0),TM(0),TF(0);
var : cnt(0),sum(0),mav(0),tf1(0),TFF(0),entry(false);
Array : CC[100](0),OO[100](0),HH[100](0),LL[100](0),TT[100](0),ii[100](0);
Array : C1[100](0),T1[100](0);
if (sdate != sdate[1] and stime >= 100000) or
(sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) Then{
S1 = TimeToMinutes(100000);
D1 = sdate;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TFF = TM%60;
TF = TM%분주기;
if (sdate != sdate[1] and stime >= 100000) or
(sdate == sdate[1] and stime >= 100000 and stime[1] < 100000) or
(TF < TF[1]) Then{
OO[0] = o;
HH[0] = H;
LL[0] = L;
TT[0] = stime;
ii[0] = 0;
for cnt = 1 to 99{
OO[cnt] = OO[cnt-1][1];
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
CC[cnt] = CC[cnt-1][1];
TT[cnt] = TT[cnt-1][1];
ii[cnt] = ii[cnt-1][1];
}
}
if H > HH[0] Then
HH[0] = H;
if L < LL[0] Then
LL[0] = L;
CC[0] = C;
ii[0] = ii[0]+1;
TF1 = TM%분주기1;
if (sdate != sdate[1] and stime >= 100000) or
(sdate == sdate[1] and stime >= 100000 and stime[1] < 100000) or
(TF1 < TF1[1]) Then{
T1[0] = stime;
for cnt = 1 to 99{
C1[cnt] = C1[cnt-1][1];
T1[cnt] = T1[cnt-1][1];
}
}
C1[0] = C;
entry = true;
if stime >= 110000 and stime < 120000 and ii[1]+ii[2] < 55 Then
entry = false;
if stime >= 230000 and stime < 10000 and ii[1]+ii[2] < 55 Then
entry = false;
}
plot1(CC[1]);
plot2(C1[1]);
즐거운 하루되세요
> 겐지 님이 쓴 글입니다.
> 제목 : 문의드립니다~
> input : 분주기(30),P(5),분주기1(15);
var : S1(0),D1(0),TM(0),TF(0);
var : cnt(0),sum(0),mav(0),tf1(0),TFF(0),entry(false);
Array : CC[100](0),OO[100](0),HH[100](0),LL[100](0),TT[100](0),ii[100](0);
Array : C1[100](0),T1[100](0);
if (sdate != sdate[1] and stime >= 100000) or
(sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) Then{
S1 = TimeToMinutes(100000);
D1 = sdate;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TFF = TM%60;
TF = TM%분주기;
if (sdate != sdate[1] and stime >= 100000) or
(sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or
(TF < TF[1]) Then{
OO[0] = o;
HH[0] = H;
LL[0] = L;
TT[0] = stime;
ii[0] = 0;
for cnt = 1 to 99{
OO[cnt] = OO[cnt-1][1];
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
CC[cnt] = CC[cnt-1][1];
TT[cnt] = TT[cnt-1][1];
ii[cnt] = ii[cnt-1][1];
}
}
if H > HH[0] Then
HH[0] = H;
if L < LL[0] Then
LL[0] = L;
CC[0] = C;
ii[0] = ii[0]+1;
TF1 = TM%분주기1;
if (sdate != sdate[1] and stime >= 100000) or
(sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or
(TF1 < TF1[1]) Then{
T1[0] = stime;
for cnt = 1 to 99{
C1[cnt] = C1[cnt-1][1];
T1[cnt] = T1[cnt-1][1];
}
}
C1[0] = C;
entry = true;
if stime >= 110000 and stime < 120000 and ii[1]+ii[2] < 55 Then
entry = false;
if stime >= 230000 and stime < 10000 and ii[1]+ii[2] < 55 Then
entry = false;
}
///////
위 식을 사용중인데요~
30분과 15분말고 60분과 30분으로 적용하고 싶은데요~
input : 분주기(30),P(5),분주기1(15);
이부분에서 30과 15를 60과30으로 변경하니깐 적용이 안되어서요~
수정 좀 부탁드립니다
좋은하루 되세요~