예스스탁
예스스탁 답변
2025-06-18 10:58:16
안녕하세요
예스스탁입니다.
input : starttime1(223000),Endtime1(50000);
input : starttime2(163000),Endtime2(3000);
input : starttime3(090000),Endtime3(153000);
var : Tcond1(False),D1(0),T1(0),H1(0),L1(0),box1(0);
var : Tcond2(False),D2(0),T2(0),H2(0),L2(0),box2(0);
var : Tcond3(False),D3(0),T3(0),H3(0),L3(0),box3(0);
if (sdate != sDate[1] and sTime >= Endtime1) or
(sdate == sDate[1] and sTime >= Endtime1 and sTime[1] < Endtime1) Then
{
Tcond1 = False;
}
if (sdate != sDate[1] and sTime >= starttime1) or
(sdate == sDate[1] and sTime >= starttime1 and sTime[1] < starttime1) Then
{
Tcond1 = true;
H1 = H;
L1 = L;
D1 = sDate;
T1 = sTime;
box1 = Box_New(sDate,sTime,H1,NextBarSdate,NextBarStime,L1);
Box_SetColor(box1,Red);
Box_SetFill(box1,true);
}
if Tcond1 == true Then
{
if H > H1 Then
H1 = H;
if L < L1 Then
L1 = L;
Box_SetBegin(box1,D1,T1,H1);
Box_SetEnd(box1,NextBarSdate,NextBarStime,L1);
}
if (sdate != sDate[1] and sTime >= Endtime2) or
(sdate == sDate[1] and sTime >= Endtime2 and sTime[1] < Endtime2) Then
{
Tcond2 = False;
}
if (sdate != sDate[1] and sTime >= starttime2) or
(sdate == sDate[1] and sTime >= starttime2 and sTime[1] < starttime2) Then
{
Tcond2 = true;
H2 = H;
L2 = L;
D2 = sDate;
T2 = sTime;
box2 = Box_New(sDate,sTime,H2,NextBarSdate,NextBarStime,L2);
Box_SetColor(box2,Blue);
Box_SetFill(box2,true);
}
if Tcond2 == true Then
{
if H > H2 Then
H2 = H;
if L < L2 Then
L2 = L;
Box_SetBegin(box2,D2,T2,H2);
Box_SetEnd(box2,NextBarSdate,NextBarStime,L2);
}
if (sdate != sDate[1] and sTime >= Endtime3) or
(sdate == sDate[1] and sTime >= Endtime3 and sTime[1] < Endtime3) Then
{
Tcond3 = False;
}
if (sdate != sDate[1] and sTime >= starttime3) or
(sdate == sDate[1] and sTime >= starttime3 and sTime[1] < starttime3) Then
{
Tcond3 = true;
H3 = H;
L3 = L;
D3 = sDate;
T3 = sTime;
box3 = Box_New(sDate,sTime,H3,NextBarSdate,NextBarStime,L3);
Box_SetColor(box3,Green);
Box_SetFill(box3,true);
}
if Tcond3 == true Then
{
if H > H3 Then
H3 = H;
if L < L3 Then
L3 = L;
Box_SetBegin(box3,D3,T3,H3);
Box_SetEnd(box3,NextBarSdate,NextBarStime,L3);
}
즐거운 하루되세요
> oni 님이 쓴 글입니다.
> 제목 : 대륙별 시간대 박스 생성
> 안녕하세요.
북미 : 22:30 ~ 익일 05:00
유럽 : 16:30 ~ 익일 00:30
아시아 : 09:00 ~ 당일 15:30
위 시간대로 해당시간에 박스를 생성하고 박스 생성 시 각 타임존 별 최고 최저로
박스가 생성될 수 있도록 지표 부탁드립니다.
해당타임존에 속해 있을때도 박스가 생성되도록 해주세요.(지난후에 생성x)
(box_new)함수를 사용하여 부탁드립니다. 대륙별 색상 별도 지정
감사합니다.