예스스탁
예스스탁 답변
2020-04-13 11:09:14
안녕하세요
예스스탁입니다.
input : 시작일(20200302);
input : n(12),x(10);
var : idx(0),hh(0),ll(0),dd(0),tt(0);
var : tl1(0),tl2(0),tl3(0),tl4(0);
var1 = highest(H,n);
var2 = lowest(L,n);
Condition1 = C <= var1[1] and C >= var2[1];
if Condition1 == true and Condition1[1] == false Then
{
idx = 0;
hh = c;
ll = c;
dd = sdate;
tt = stime;
}
if Condition1 == true Then
{
idx = idx+1;
if c > hh Then
hh = c;
if c < ll Then
ll = c;
if idx == x Then
{
tl1 = TL_New(dd,tt,hh,dd,tt,ll);
tl2 = TL_New(dd,tt,hh,sdate,stime,hh);
tl3 = TL_New(dd,tt,ll,sdate,stime,ll);
tl4 = TL_New(sdate,stime,hh,sdate,stime,ll);
}
if idx > x Then
{
TL_SetBegin(tl1,dd,tt,hh);
TL_SetEnd(tl1,dd,tt,ll);
TL_SetBegin(tl2,dd,tt,hh);
TL_SetEnd(tl2,sdate,stime,hh);
TL_SetBegin(tl3,dd,tt,ll);
TL_SetEnd(tl3,sdate,stime,ll);
TL_SetBegin(tl4,sdate,stime,hh);
TL_SetEnd(tl4,sdate,stime,ll);
value1 = HH;
value2 = LL;
}
}
If hh <= C Then
{
TL_SetColor(TL1,YELLOW);
TL_SetColor(TL2,YELLOW);
TL_SetColor(TL3,YELLOW);
TL_SetColor(TL4,YELLOW);
}
Else
{
TL_SetColor(TL1,YELLOW);
TL_SetColor(TL2,YELLOW);
TL_SetColor(TL3,YELLOW);
TL_SetColor(TL4,YELLOW);
}
TL_SetSize(TL1,0); //좌측세로선 굵기
TL_SetSize(TL2,1); //상단가로선 굵기
TL_SetSize(TL3,1); //하측가로선 굵기
TL_SetSize(TL4,0); //우측세로선 굵기
TL_SetStyle(TL1,3); //좌측세로선 점선
TL_SetStyle(TL4,3); //우측세로선 점선
if sdate >= 시작일 then
{
if MarketPosition <= 0 and crossup(C,value1) Then
buy();
if MarketPosition >= 0 and CrossDown(C,value2) Then
sell();
}
즐거운 하루되세요
> 수색대대 님이 쓴 글입니다.
> 제목 : 수식부탁드립니다
> input : n(12),x(10);
var : idx(0),hh(0),ll(0),dd(0),tt(0);
var : tl1(0),tl2(0),tl3(0),tl4(0);
var1 = highest(H,n);
var2 = lowest(L,n);
Condition1 = C <= var1[1] and C >= var2[1];
if Condition1 == true and Condition1[1] == false Then
{
idx = 0;
hh = c;
ll = c;
dd = sdate;
tt = stime;
}
if Condition1 == true Then
{
idx = idx+1;
if c > hh Then
hh = c;
if c < ll Then
ll = c;
if idx == x Then
{
tl1 = TL_New(dd,tt,hh,dd,tt,ll);
tl2 = TL_New(dd,tt,hh,sdate,stime,hh);
tl3 = TL_New(dd,tt,ll,sdate,stime,ll);
tl4 = TL_New(sdate,stime,hh,sdate,stime,ll);
}
if idx > x Then
{
TL_SetBegin(tl1,dd,tt,hh);
TL_SetEnd(tl1,dd,tt,ll);
TL_SetBegin(tl2,dd,tt,hh);
TL_SetEnd(tl2,sdate,stime,hh);
TL_SetBegin(tl3,dd,tt,ll);
TL_SetEnd(tl3,sdate,stime,ll);
TL_SetBegin(tl4,sdate,stime,hh);
TL_SetEnd(tl4,sdate,stime,ll);
}
}
If hh <= C Then
{
TL_SetColor(TL1,YELLOW);
TL_SetColor(TL2,YELLOW);
TL_SetColor(TL3,YELLOW);
TL_SetColor(TL4,YELLOW);
}
Else
{
TL_SetColor(TL1,YELLOW);
TL_SetColor(TL2,YELLOW);
TL_SetColor(TL3,YELLOW);
TL_SetColor(TL4,YELLOW);
}
TL_SetSize(TL1,0); //좌측세로선 굵기
TL_SetSize(TL2,1); //상단가로선 굵기
TL_SetSize(TL3,1); //하측가로선 굵기
TL_SetSize(TL4,0); //우측세로선 굵기
TL_SetStyle(TL1,3); //좌측세로선 점선
TL_SetStyle(TL4,3); //우측세로선 점선
상기그림과같이
1. 박스 고점과 저점을 기준으로 상향 돌파시 매수 신호, 하향 돌파시 매도 신호
2. 신호가 나왔을 시 반대 신호가 나올때까지 같은방향은 안나옴
3. 시작일자를 넣은 시스템수식 부탁드립니다
감사합니다