답변완료
타주기 쌍바닥
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(0);
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,2);
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);
}
몸통만 있고 꼬리가 없는 수식입니다. 종가 기준 박스 하단이 쌍바닥일 때 동그라미 표시.
직전 박스 하단에서 -1틱부터 +1틱 사이이고, 상하 폭은 각각 설정.
박스 하단이 당일 고점으로부터 -1p 아래일 때만 표시. 감사합니다.
2023-05-09
1378
글번호 168804
지표