예스스탁
예스스탁 답변
2024-10-07 14:30:19
안녕하세요
예스스탁입니다.
input : 타주기분(30);
var : S1(0),D1(0),TM(0),TF(0);
var : DD(0),TT(0),OO(0),HH(0),LL(0),CC(0),CC1(0),clr(0);
var : box(0),box1(0),box2(0),TL(0),TL1(0),TL2(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;
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
{
DD = sDate;
TT = sTime;
OO = O;
HH = H;
LL = L;
CC1 = CC[1];
box = Box_New(DD,TT,HH,NextBarSdate,NextBarStime,LL);
box1 = box[1];
box2 = box1[1];
Box_Delete(Box2);
if CC > OO Then
clr = LightPink;
Else
clr = Lime;
Box_SetColor(Box,clr);
Box_SetStyle(box,3);
Box_SetFill(Box,true);
TL = TL_New(DD,TT,(HH+LL)/2,NextBarSdate,NextBarStime,(HH+LL)/2);
TL_SetExtRight(TL,true);
TL_SetColor(TL,clr);
TL_SetSize(TL,1);
TL1 = TL[1];
TL2 = TL1[1];
TL_Delete(TL2);
}
Else
{
if HH > 0 and H > HH Then
HH = H;
if LL > 0 and L < LL Then
LL = L;
CC = C;
if CC > OO Then
clr = Pink;
Else
clr = Green;
Box_SetBegin(Box,DD,TT,HH);
Box_SetEnd(Box,sDate,sTime,LL);
Box_SetColor(Box,clr);
TL_SetBegin(TL,DD,TT,(HH+LL)/2);
TL_SetEnd(TL,sDate,sTime,(HH+LL)/2);
#중심선색
TL_SetColor(TL,clr);
}
}
즐거운 하루되세요
> 어떤하루 님이 쓴 글입니다.
> 제목 : 수식 조금 수정부탁드립니다.
> 박스의 시작이 정각 9시가 아니라
개장시간을 시작으로 8시 45분 / 9시 15분..... 30분봉 박스가 만들어지게 부탁드립니다.
input : 타주기분(30);
var : S1(0),D1(0),TM(0),TF(0);
var : DD(0),TT(0),OO(0),HH(0),LL(0),CC(0),CC1(0),clr(0);
var : box(0),box1(0),box2(0),TL(0),TL1(0),TL2(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(80000);
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
{
DD = sDate;
TT = sTime;
OO = O;
HH = H;
LL = L;
CC1 = CC[1];
box = Box_New(DD,TT,HH,NextBarSdate,NextBarStime,LL);
box1 = box[1];
box2 = box1[1];
Box_Delete(Box2);
if CC > OO Then
clr = LightPink;
Else
clr = Lime;
Box_SetColor(Box,clr);
Box_SetStyle(box,3);
Box_SetFill(Box,true);
TL = TL_New(DD,TT,(HH+LL)/2,NextBarSdate,NextBarStime,(HH+LL)/2);
TL_SetExtRight(TL,true);
TL_SetColor(TL,clr);
TL_SetSize(TL,1);
TL1 = TL[1];
TL2 = TL1[1];
TL_Delete(TL2);
}
Else
{
if HH > 0 and H > HH Then
HH = H;
if LL > 0 and L < LL Then
LL = L;
CC = C;
if CC > OO Then
clr = Pink;
Else
clr = Green;
Box_SetBegin(Box,DD,TT,HH);
Box_SetEnd(Box,sDate,sTime,LL);
Box_SetColor(Box,clr);
TL_SetBegin(TL,DD,TT,(HH+LL)/2);
TL_SetEnd(TL,sDate,sTime,(HH+LL)/2);
#중심선색
TL_SetColor(TL,clr);
}
}