커뮤니티
부탁 드립니다.
2018-07-12 10:48:34
139
글번호 120504
도움주심에 감사 드립니다.
data2를 이용한 타주기용 수식 부탁 드립니다.
input :p100(100),적청3병갯수(3), n(4),사각형그리기1삭제0(0);
var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0);
var : cnt2(0),d2(0),t2(0),h2(0),l2(0);
var : tl11(0),tl12(0),tl13(0),tl14(0);
var : tl21(0),tl22(0),tl23(0),tl24(0);
var : v1(0),v2(0),v3(0),v4(0);
v1 = iff(C>O,abs(C-O),0);
v2 = AccumN(v1,p100);
v3 = countif(C>O,p100);
v4 = v2/v3;
if C > O Then
T = 1;
if C < O Then
T = -1;
if T == 1 and T[1] != 1 Then
{
cnt1 = 0;
d1 = sdate;
t1 = stime;
h1 = H;
l1 = L;
}
if T == 1 Then
{
cnt1 = cnt1+1;
if h > h1 Then
h1 = h;
if l < l1 Then
l1 = l;
}
if T == -1 and T[1] != -1 Then
{
cnt2 = 0;
d2 = sdate;
t2 = stime;
h2 = H;
l2 = L;
}
if T == -1 Then
{
cnt2 = cnt2+1;
if h > h2 Then
h2 = h;
if l < l2 Then
l2 = l;
}
if T != 1 and T[1] == 1 and cnt1[1] >= 적청3병갯수 and C[1] > O[1] Then
{
var1 = h1;
var2 = L1;
if Condition1[1] == true then
TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]);
tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1);
if 사각형그리기1삭제0==1 then
{
tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1);
tl13 = TL_New(d1,t1,h1,d1,t1,l1);
tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1);}
TL_SetColor(Tl11,RED);
TL_SetColor(Tl12,RED);
TL_SetColor(Tl13,RED);
TL_SetColor(Tl14,RED);
Condition1 = false;
if h1-l1 >= v4*n Then
Condition1 = true;
if Condition1 == false Then
TL_Delete(TL11);
}
Else
{
if Condition1 == true then
{
TL_SetExtRight(TL11,true);
TL_Setsize(TL11,2);
}
}
if T != -1 and T[1] == -1 and cnt2[1] >= 적청3병갯수 and C[1] < O[1] then
{
var3 = H2;
var4 = L2;
if Condition2[1] == true then
TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var4[1]);
tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2);
if 사각형그리기1삭제0==1 then
{
tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2);
tl23 = TL_New(d2,t2,h2,d2,t2,l2);
tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2);}
TL_SetColor(Tl21,BLUE);
TL_SetColor(Tl22,BLUE);
TL_SetColor(Tl23,BLUE);
TL_SetColor(Tl24,BLUE);
Condition2 = false;
if h2-l2 >= v4*N Then
Condition2 = true;
if Condition2 == false Then
TL_Delete(TL22);
}
Else
{
if Condition2 == true then
{
TL_SetExtRight(TL22,true);
TL_Setsize(TL22,2);
}
}
답변 1
예스스탁 예스스탁 답변
2018-07-12 16:40:23
안녕하세요
예스스탁입니다.
data2로 변경해 드립니다.
적용후에 마우스로 끌어서 data2봉위에 올리셔야 합니다.
이평을 plot으로 추가해 드립니다. 이평을 끌어서 올리시면 됩니다.
input :p100(100),적청3병갯수(3), n(4),사각형그리기1삭제0(0);
var : T(0,data2),cnt1(0,data2),d1(0,data2),t1(0,data2),h1(0,data2),l1(0,data2);
var : cnt2(0,data2),d2(0,data2),t2(0,data2),h2(0,data2),l2(0,data2);
var : tl11(0,data2),tl12(0,data2),tl13(0,data2),tl14(0,data2);
var : tl21(0,data2),tl22(0,data2),tl23(0,data2),tl24(0,data2);
var : v1(0,data2),v2(0,data2),v3(0,data2),v4(0,data2);
var : va1(0,data2),va2(0,data2),va3(0,data2),va4(0,data2);
var : Cond1(false,data2),Cond2(false,data2);
v1 = data2(iff(C>O,abs(C-O),0));
v2 = data2(AccumN(v1,p100));
v3 = data2(countif(C>O,p100));
v4 = data2(v2/v3);
if data2(C > O) Then
T = 1;
if data2(C < O) Then
T = -1;
if T == 1 and T[1] != 1 Then
{
cnt1 = 0;
d1 = data2(sdate);
t1 = data2(stime);
h1 = data2(H);
l1 = data2(L);
}
if T == 1 Then
{
cnt1 = cnt1+1;
if data2(h) > h1 Then
h1 = data2(h);
if data2(l) < l1 Then
l1 = data2(l);
}
if T == -1 and T[1] != -1 Then
{
cnt2 = 0;
d2 = data2(sdate);
t2 = data2(stime);
h2 = data2(H);
l2 = data2(L);
}
if T == -1 Then
{
cnt2 = cnt2+1;
if data2(h) > h2 Then
h2 = data2(h);
if data2(l) < l2 Then
l2 = data2(l);
}
if data2(T != 1 and T[1] == 1 and cnt1[1] >= 적청3병갯수 and C[1] > O[1]) Then
{
va1 = h1;
va2 = L1;
if Cond1[1] == true then
TL_SetEnd(tl11[1],data2(sdate[cnt1+1]),data2(stime[cnt1+1]),va1[1]);
tl11 = TL_New_Self(d1,t1,h1,data2(sdate[1]),data2(stime[1]),h1);
if 사각형그리기1삭제0==1 then
{
tl12 = TL_New_Self(d1,t1,l1,data2(sdate[1]),data2(stime[1]),l1);
tl13 = TL_New_Self(d1,t1,h1,d1,t1,l1);
tl14 = TL_New_Self(data2(sdate[1]),data2(stime[1]),h1,data2(sdate[1]),data2(stime[1]),l1);
}
TL_SetColor(Tl11,RED);
TL_SetColor(Tl12,RED);
TL_SetColor(Tl13,RED);
TL_SetColor(Tl14,RED);
Cond1 = false;
if h1-l1 >= v4*n Then
Cond1 = true;
if Cond1 == false Then
TL_Delete(TL11);
}
Else
{
if Cond1 == true then
{
TL_SetExtRight(TL11,true);
TL_Setsize(TL11,2);
}
}
if data2(T != -1 and T[1] == -1 and cnt2[1] >= 적청3병갯수 and C[1] < O[1]) then
{
va3 = H2;
va4 = L2;
if Cond2[1] == true then
TL_SetEnd(tl22[1],data2(sdate[cnt2+1]),data2(stime[cnt2+1]),va4[1]);
tl22 = TL_New_Self(d2,t2,l2,data2(sdate[1]),data2(stime[1]),l2);
if 사각형그리기1삭제0==1 then
{
tl21 = TL_New_Self(d2,t2,h2,data2(sdate[1]),data2(stime[1]),h2);
tl23 = TL_New_Self(d2,t2,h2,d2,t2,l2);
tl24 = TL_New_Self(data2(sdate[1]),data2(stime[1]),h2,data2(sdate[1]),data2(stime[1]),l2);
}
TL_SetColor(Tl21,BLUE);
TL_SetColor(Tl22,BLUE);
TL_SetColor(Tl23,BLUE);
TL_SetColor(Tl24,BLUE);
Cond2 = false;
if h2-l2 >= v4*N Then
Cond2 = true;
if Cond2 == false Then
TL_Delete(TL22);
}
Else
{
if Cond2 == true then
{
TL_SetExtRight(TL22,true);
TL_Setsize(TL22,2);
}
}
plot1(data2(ma(C,5)));
즐거운 하루되세요
> yes 님이 쓴 글입니다.
> 제목 : 부탁 드립니다.
> 도움주심에 감사 드립니다.
data2를 이용한 타주기용 수식 부탁 드립니다.
input :p100(100),적청3병갯수(3), n(4),사각형그리기1삭제0(0);
var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0);
var : cnt2(0),d2(0),t2(0),h2(0),l2(0);
var : tl11(0),tl12(0),tl13(0),tl14(0);
var : tl21(0),tl22(0),tl23(0),tl24(0);
var : v1(0),v2(0),v3(0),v4(0);
v1 = iff(C>O,abs(C-O),0);
v2 = AccumN(v1,p100);
v3 = countif(C>O,p100);
v4 = v2/v3;
if C > O Then
T = 1;
if C < O Then
T = -1;
if T == 1 and T[1] != 1 Then
{
cnt1 = 0;
d1 = sdate;
t1 = stime;
h1 = H;
l1 = L;
}
if T == 1 Then
{
cnt1 = cnt1+1;
if h > h1 Then
h1 = h;
if l < l1 Then
l1 = l;
}
if T == -1 and T[1] != -1 Then
{
cnt2 = 0;
d2 = sdate;
t2 = stime;
h2 = H;
l2 = L;
}
if T == -1 Then
{
cnt2 = cnt2+1;
if h > h2 Then
h2 = h;
if l < l2 Then
l2 = l;
}
if T != 1 and T[1] == 1 and cnt1[1] >= 적청3병갯수 and C[1] > O[1] Then
{
var1 = h1;
var2 = L1;
if Condition1[1] == true then
TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]);
tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1);
if 사각형그리기1삭제0==1 then
{
tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1);
tl13 = TL_New(d1,t1,h1,d1,t1,l1);
tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1);}
TL_SetColor(Tl11,RED);
TL_SetColor(Tl12,RED);
TL_SetColor(Tl13,RED);
TL_SetColor(Tl14,RED);
Condition1 = false;
if h1-l1 >= v4*n Then
Condition1 = true;
if Condition1 == false Then
TL_Delete(TL11);
}
Else
{
if Condition1 == true then
{
TL_SetExtRight(TL11,true);
TL_Setsize(TL11,2);
}
}
if T != -1 and T[1] == -1 and cnt2[1] >= 적청3병갯수 and C[1] < O[1] then
{
var3 = H2;
var4 = L2;
if Condition2[1] == true then
TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var4[1]);
tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2);
if 사각형그리기1삭제0==1 then
{
tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2);
tl23 = TL_New(d2,t2,h2,d2,t2,l2);
tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2);}
TL_SetColor(Tl21,BLUE);
TL_SetColor(Tl22,BLUE);
TL_SetColor(Tl23,BLUE);
TL_SetColor(Tl24,BLUE);
Condition2 = false;
if h2-l2 >= v4*N Then
Condition2 = true;
if Condition2 == false Then
TL_Delete(TL22);
}
Else
{
if Condition2 == true then
{
TL_SetExtRight(TL22,true);
TL_Setsize(TL22,2);
}
}
다음글
이전글