커뮤니티
부탁드립니다
2026-04-25 12:17:16
116
글번호 231772
1. 지표식
1) 큰박스 : 60 이평이 상승전환 빨강박스, 하락전환 파랑박스
2)작은박스 : 10 이평이 상승전환 빨강박스, 하락전환 파랑박스
위의 1)과 2)를 한챠트에 나타내고 싶습니다 수고하십시요.
2) 시스템식도 함께 부탁드립니다
답변 1
예스스탁 예스스탁 답변
2026-04-27 12:34:24
안녕하세요
예스스탁입니다.
1
input : P1(10),P2(60);
var : mav1(0),s1(0),d1(0),t1(0),h1(0),l1(0),box1(0);
var : mav2(0),s2(0),d2(0),t2(0),h2(0),l2(0),box2(0);
var : count1(0),count2(0);
mav1 = ma(C,P1);
mav2 = ma(C,P2);
if mav1 > mav1[1] Then
s1 = 1;
if mav1 < mav1[1] Then
s1 = -1;
if mav2 > mav2[1] Then
s2 = 1;
if mav2 < mav2[1] Then
s2 = -1;
if s2 == 1 Then
{
if s2 != s2[1] Then
{
d2 = sDate;
t2 = sTime;
h2 = h;
l2 = l;
box2 = Box_New(sDate,sTime,h2,NextBarSdate,NextBarStime,l2);
Box_SetColor(box2,Red);
count1 = 0;
}
Else
{
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 s2 == -1 Then
{
if s2 != s2[1] Then
{
d2 = sDate;
t2 = sTime;
h2 = h;
l2 = l;
box2 = Box_New(sDate,sTime,h2,NextBarSdate,NextBarStime,l2);
Box_SetColor(box2,Blue);
count2 = 0;
}
Else
{
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 s1 == 1 Then
{
if s1 != s1[1] Then
{
d1 = sDate;
t1 = sTime;
h1 = h;
l1 = l;
box1 = Box_New(sDate,sTime,h1,NextBarSdate,NextBarStime,l1);
Box_SetColor(box1,Magenta);
count1 = count1+1;
if S2 == 1 and count1 == 1 Then
{
Box_SetFill(box1,true);
}
}
Else
{
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 s1 == -1 Then
{
if s1 != s1[1] Then
{
d1 = sDate;
t1 = sTime;
h1 = h;
l1 = l;
box1 = Box_New(sDate,sTime,h1,NextBarSdate,NextBarStime,l1);
Box_SetColor(box1,Cyan);
count2 = count2+1;
if S2 == -1 and count2 == 1 Then
{
Box_SetFill(box1,true);
}
}
Else
{
if h > h1 Then
h1 = h;
if l < l1 Then
l1 = l;
Box_SetBegin(box1,d1,t1,h1);
Box_SetEnd(box1,NextBarSdate,NextBarStime,l1);
}
}
2
input : P1(10),P2(60);
var : mav1(0),s1(0),d1(0),t1(0),h1(0),l1(0),box1(0);
var : mav2(0),s2(0),d2(0),t2(0),h2(0),l2(0),box2(0);
var : count1(0),count2(0);
mav1 = ma(C,P1);
mav2 = ma(C,P2);
if mav1 > mav1[1] Then
s1 = 1;
if mav1 < mav1[1] Then
s1 = -1;
if mav2 > mav2[1] Then
s2 = 1;
if mav2 < mav2[1] Then
s2 = -1;
if s2 == 1 Then
{
if s2 != s2[1] Then
{
d2 = sDate;
t2 = sTime;
h2 = h;
l2 = l;
box2 = Box_New(sDate,sTime,h2,NextBarSdate,NextBarStime,l2);
Box_SetColor(box2,Red);
count1 = 0;
}
Else
{
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 s2 == -1 Then
{
if s2 != s2[1] Then
{
d2 = sDate;
t2 = sTime;
h2 = h;
l2 = l;
box2 = Box_New(sDate,sTime,h2,NextBarSdate,NextBarStime,l2);
Box_SetColor(box2,Blue);
count2 = 0;
}
Else
{
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 s1 == 1 Then
{
if s1 != s1[1] Then
{
d1 = sDate;
t1 = sTime;
h1 = h;
l1 = l;
box1 = Box_New(sDate,sTime,h1,NextBarSdate,NextBarStime,l1);
Box_SetColor(box1,Magenta);
count1 = count1+1;
if S2 == 1 and count1 == 1 Then
{
Buy("B");
Box_SetFill(box1,true);
}
}
Else
{
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 s1 == -1 Then
{
if s1 != s1[1] Then
{
d1 = sDate;
t1 = sTime;
h1 = h;
l1 = l;
box1 = Box_New(sDate,sTime,h1,NextBarSdate,NextBarStime,l1);
Box_SetColor(box1,Cyan);
count2 = count2+1;
if S2 == -1 and count2 == 1 Then
{
Sell("S");
Box_SetFill(box1,true);
}
}
Else
{
if h > h1 Then
h1 = h;
if l < l1 Then
l1 = l;
Box_SetBegin(box1,d1,t1,h1);
Box_SetEnd(box1,NextBarSdate,NextBarStime,l1);
}
}
즐거운 하루되세요
다음글
이전글