커뮤니티
wave box
wt1 이 -50 이하로 내려가거나 +50 이상으로 올라가면 박스 시작. (wt2는 무관)
wt1 이 -50 아래에서 양전환되거나, +50 이상에서 음전환되면 박스 끝. (전환 직전봉까지만 박스)
wt1 이 -50 아래에서 양전환후 -50 이상으로 못 올라오고 음전환하면 다시 박스.
wt1 이 +50 이상에서 음전환후 +50 아래로 안 내려오고 양전환하면 다시 박스. 감사합니다.
input : n1(16);
input : n2(32);
input : obLevel2(50);
input : osLevel2(-50);
var : ap(0),esa(0),d(0),ci(0),tci(0),wt1(0),wt2(0);
var : isConfluenceTop(False),isConfluenceBottom(False),tx(0),box1(0),box2(0);
ap = (h+l+c)/3;
esa = ema(ap, n1);
d = ema(abs(ap - esa), n1);
ci = (ap - esa) / (0.015 * d);
tci = ema(ci, n2);
wt1 = tci;
wt2 = ma(wt1, 4);
isConfluenceTop = wt1 > obLevel2 and wt1 > wt2;
isConfluenceBottom = wt1 < osLevel2 and wt1 < wt2;
if isConfluenceTop Then
{
if isConfluenceTop[1] == False Then
{
box1 = Box_New(sDate,sTime,L-1,NextBarSdate,NextBarStime,-1999);
Box_SetColor(box1,Blue);
Box_SetFill(box1,true,70);
}
Else
{
Box_SetEnd(box1,NextBarSdate,NextBarStime,-1999);
}
}
if isConfluenceBottom Then
{
if isConfluenceBottom[1] == False Then
{
box2 = Box_New(sDate,sTime,H+1,NextBarSdate,NextBarStime,1999);
Box_SetColor(box2,Red);
Box_SetFill(box2,true,70);
}
Else
{
Box_SetEnd(box2,NextBarSdate,NextBarStime,1999);
}
}
plot1(wt1, "wt1",IFf(wt1>wt1[1],Red,Blue));
plot2(obLevel2,"과매수",Gray);
plot3(osLevel2,"과매도",Gray);
if CrossUp(wt1,wt1[1]) and wt1[1] < -50 Then
{
tx = Text_New_Self(sDate,sTime,wt1-5,"●");
Text_SetColor(tx,Red);
Text_SetStyle(tx,2,2);
Text_SetSize(tx,15);
}
if CrossDown(wt1,wt1[1]) and wt1[1] > 50 Then
{
tx = Text_New_Self(sDate,sTime,wt1+5,"●");
Text_SetColor(tx,Blue);
Text_SetStyle(tx,2,2);
Text_SetSize(tx,15);
}
답변 1
예스스탁 예스스탁 답변
2026-10-14 15:31:05