예스스탁
예스스탁 답변
2023-05-08 13:37:05
안녕하세요
예스스탁입니다.
식을 수정했습니다.
input : N(15);
var : S1(0),D1(0),TF(0),box(0),idx(0),T(0),T1(0),T2(0),tx(0);
var : oo(0),hh(0),ll(0),TL1(0),TL2(0),clr(0),ii(0),TL(0);
#Plot1(c);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
idx = 0;
}
Else
idx = idx+1;
if D1 > 0 then
{
TF = idx%N;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and TF < TF[1]) Then
{
oo = O;
hh = H;
ll = L;
box = Box_New(sDate,sTime,oo,NextBarSdate,NextBarStime,c);
ii = 1;
if C[1] > OO[1] Then
T = 1;
if C[1] < OO[1] Then
T = -1;
if T != T[1] Then
{
Text_Delete(tx);
if T == 1 Then
{
tx = Text_New(sDate[1],sTime[1],OO[1]-PriceScale*1,"●");
Text_SetStyle(tx,2,2);
Text_SetColor(tx,Red);
Text_SetSize(tx,20);
}
if T == -1 Then
{
tx = Text_New(sDate[1],sTime[1],OO[1]+PriceScale*1,"●");
Text_SetStyle(tx,2,1);
Text_SetColor(tx,Blue);
Text_SetSize(tx,20);
}
}
}
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);
}
if C > oo Then
clr = Red;
else if C < oo Then
clr = Blue;
Else
clr = Green;
Box_SetColor(box,clr);
Box_SetSize(box,1);
Box_SetFill(box,true,255);
}
즐거운 하루되세요
> 고성 님이 쓴 글입니다.
> 제목 : 타주기 전환
> input : N(15);
var : S1(0),D1(0),TF(0),box(0),idx(0),T(0),T1(0),T2(0),tx(0);
var : oo(0),hh(0),ll(0),TL1(0),TL2(0),clr(0),ii(0),TL(0);
#Plot1(c);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
idx = 0;
}
Else
idx = idx+1;
if D1 > 0 then
{
TF = idx%N;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and TF < TF[1]) Then
{
oo = O;
hh = H;
ll = L;
box = Box_New(sDate,sTime,oo,NextBarSdate,NextBarStime,c);
ii = 1;
T1 = T[1];
T2 = T1[1];
if T1 != T2 Then
{
Text_Delete(tx);
if T1 == 1 Then
{
tx = Text_New(sDate[1],sTime[1],OO[1]-PriceScale*1,"●");
Text_SetStyle(tx,2,2);
Text_SetColor(tx,Red);
Text_SetSize(tx,20);
}
if T1 == -1 Then
{
Text_Delete(tx);
tx = Text_New(sDate[1],sTime[1],OO[1]+PriceScale*1,"●");
Text_SetStyle(tx,2,1);
Text_SetColor(tx,Blue);
Text_SetSize(tx,20);
}
}
}
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);
}
if C > oo Then
{
clr = Red;
T = 1;
}
else if C < oo Then
{
clr = Blue;
T = -1;
}
Else
clr = Green;
Box_SetColor(box,clr);
Box_SetSize(box,1);
Box_SetFill(box,true,255);
}
Plot1(t);
plot2(t1);
몸통만 있고 꼬리가 삭제된 수식인데 꼬리를 인식하는 것인지, 주기간 시간차인지,
첫 양 박스나 첫 음 박스일 때만 전환되어야 하는데, 도지일 때도 전환 표시가 됩니다.
도지일 때는 전환 표시 안 뜨게 검토 부탁드립니다.