예스스탁
예스스탁 답변
2025-04-14 14:06:32
안녕하세요
예스스탁입니다.
타주기 봉을 최근 4개만 그리는 내용같습니다.
해당 내용으로 수정해 드립니다.
input : 타주기분(5);
var : S1(0),D1(0),TM(0),TF(0),dd(0),tt(0);
var : oo(0),hh(0),ll(0),cc(0),clr(0),ii(0);
var : cnt(0);
Array : box[10](0),Htl[10](0),Ltl[10](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;
ii = 1;
for cnt = 9 DownTo 1
{
box[cnt] = box[cnt-1];
htl[cnt] = htl[cnt-1];
ltl[cnt] = ltl[cnt-1];
}
box[0] = Box_New(sDate,sTime,oo,NextBarSdate,NextBarStime,c);
Box_Delete(Box[4]);
htl[0] = TL_New(sDate,sTime,max(C,oo),sDate,sTime,hh);
ltl[0] = TL_New(sDate,sTime,min(C,oo),sDate,sTime,ll);
TL_SetSize(htl[0],2);
TL_SetSize(ltl[0],2);
TL_Delete(htl[4]);
TL_Delete(ltl[4]);
}
Else
{
ii = ii +1;
if h > hh Then
hh = h;
if l < ll Then
ll = l;
var1 = Round(ii/2,1);
Box_SetEnd(box[0],sDate,sTime,C);
TL_SetBegin(htl[0],sDate[var1],sTime[var1],max(c,oo));
TL_SetEnd(htl[0],sDate[var1],sTime[var1],hh);
TL_SetBegin(ltl[0],sDate[var1],sTime[var1],min(c,oo));
TL_SetEnd(ltl[0],sDate[var1],sTime[var1],ll);
}
if C > oo Then
clr = Red;
else if C < oo Then
clr = Blue;
Else
clr = Green;
Box_SetColor(box[0],clr);
Box_SetSize(box[0],5);
Box_SetFill(box[0],True,100);//내부채움
TL_SetColor(htl[0],clr);
TL_SetColor(ltl[0],clr);
}
즐거운 하루되세요
> 파생돌이 님이 쓴 글입니다.
> 제목 : 부틱드립니다
> 수고하십니다
아래수식은 제가 이것저것 갖다 붙인수식인데요 이상한선들이 나타나내요 수식수정 부탁드립니다
input : 타주기분(5);
var : S1(0),D1(0),TM(0),TF(0),box(0),dd(0),tt(0);
var : oo(0),hh(0),ll(0),cc(0),TL1(0),TL2(0),TL3(0),clr(0),ii(0),TL(0),TL4(0);
var : box1(0),box2(0),box3(0),box4(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;
//cc = C;
box = Box_New(sDate,sTime,oo,NextBarSdate,NextBarStime,c);
//------------------------------------------------------------------
TL1 = TL_New(sDate,sTime,max(C,oo),sDate,sTime,hh);
TL2 = TL_New(sDate,sTime,min(C,oo),sDate,sTime,ll);
box1 = box[1];
box2 = box1[1];
box3 = box2[1];
box4 = box3[1];
Box_Delete(Box4);
ii = 1;
}
Else
{
ii = ii +1;
if h > hh Then
hh = h;
if l < ll Then
ll = l;
var1 = Round(ii/2,1);
Box_SetEnd(box,sDate,sTime,C);
//-------------------------------------------------------
TL_SetBegin(TL1,sDate[var1],sTime[var1],max(c,oo));
TL_SetEnd(TL1,sDate[var1],sTime[var1],hh);
TL_SetBegin(TL2,sDate[var1],sTime[var1],min(c,oo));
TL_SetEnd(TL2,sDate[var1],sTime[var1],ll);
TL = TL_New(dd,tt,c,sDate,sTime,c);
TL_SetExtRight(TL,true);
TL_SetColor(TL,Green);
TL_SetSize(TL,1);
TL1 = TL[1];
TL2 = TL1[1];
TL3 = TL2[1];
TL4 = TL3[1];
TL_Delete(TL4);
TL_SetBegin(TL,dd,tt,c);
TL_SetEnd(TL,sDate,sTime,c);
}
if C > oo Then
clr = DarkRed;
else if C < oo Then
clr = Green;
Else
clr = White;
Box_SetColor(box,clr);
Box_SetSize(box,5);
Box_SetFill(box,True,60);//내부채움
TL_SetColor(tl1,Yellow);
TL_SetColor(tl2,Yellow);
TL_SetColor(tl3,clr);
TL_SetColor(tl,clr);
TL_SetSize(TL1,5);
TL_SetSize(TL2,5);
}