예스스탁
예스스탁 답변
2020-04-28 16:42:20
안녕하세요
예스스탁입니다.
죄송하지만 수식내용이 파악되지 않아 어느부분을 수정해 드려야 할지 모르겠습니다.
도움을 드리지 못해 죄송합니다.
즐거운 하루되세요
> 수색대대 님이 쓴 글입니다.
> 제목 : 번호67240 재질문입니다.
> input :N1(1),카운팅시작일자(20200428), 카운팅시작시간(070000);
input : n(13),x(8);
var : Tcond(false),T(0),상승량(0), 하락량(0), 이평선(0), 상승(0), 하락(0),cnt(0);
Array : V1[10](0),V2[10](0);
var : idx(0),hh(0),ll(0),dd(0),tt(0);
var : tl1(0),tl2(0),tl3(0),tl4(0);
if sdate >= 카운팅시작일자 and stime >= 카운팅시작시간 Then
Tcond = true;
if Tcond == true Then
{
if (sdate != sdate[1] and stime >= 카운팅시작시간) or
(sdate == sdate[1] and stime >= 카운팅시작시간 and stime[1] < 카운팅시작시간) Then
{
var1 = 0;
var2 = 0;
상승량 = 0;
하락량 = 0;
}
Condition1 = var1+V >var2+V[1] ;
for cnt = 0 to N1-1{
IF O[cnt] < C[cnt] Then {
IF H[cnt]-C[cnt] >=0.15 AND
H[cnt]-C[cnt] > Abs(O[cnt]-C[cnt]) AND
H[cnt]-C[cnt] >= O[cnt]-L[cnt]
Then
하락량 = V[cnt];
ELse
상승량 = V[cnt];
}
ELse IF O[cnt] > C[cnt] Then {
IF C[cnt]-L[cnt] >=0.15 AND
C[cnt]-L[cnt] > Abs(O[cnt]-C[cnt]) AND
C[cnt]-L[cnt] >= H[cnt]-O[cnt]
Then
상승량 = V[cnt];
ELse
하락량 = V[cnt];
}
ELse {
IF H[cnt]-C[cnt] < C[cnt]-L[cnt] Then
상승량 = V[cnt];
ELse IF H[cnt]-C[cnt] > C[cnt]-L[cnt] Then
하락량 = V[cnt];
ELse{
하락량 = V[cnt];
상승량 = V[cnt];
}
}
if dayindex >= 0 Then{
if C > O or (C == O and C >= C[1]) Then
상승량 =상승량+v;
Else
하락량 = 하락량+v;
value13=상승량-하락량;
if value13 > value13[1] Then
T = 1;
if value13 < value13[1] Then
T = -1;
var21 = highest(H,n);
var22 = lowest(L,n);
Condition21 = C <= var21[1] and C >= var22[1];
if Condition21 == true and Condition21[1] == false Then
{
idx = 0;
hh = c;
ll = c;
dd = sdate;
tt = stime;
}
if Condition21 == 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);
value21 = HH;
value22 = LL;
}
}
If hh <= C Then
{
TL_SetColor(TL1,WHITE);
TL_SetColor(TL2,WHITE);
TL_SetColor(TL3,WHITE);
TL_SetColor(TL4,WHITE);
}
Else
{
TL_SetColor(TL1,WHITE);
TL_SetColor(TL2,WHITE);
TL_SetColor(TL3,WHITE);
TL_SetColor(TL4,WHITE);
}
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 Condition1[1]==true and T == 1 and Condition1[1]==True and crossup(value13,0) or crossup(C,value21) Then
buy();
if Condition1[1]==true and T == -1 and Condition1[1]==True and crossdown(value13,0) or CrossDown(C,value22) Then
sell();
}}}
1.상기그림에서 번호①②③은 수식조건에 충족함
2.번호④에서 수식조건에 매수 신호가 표현되어야함
수식및 시스템조건을 한번더 검토해주시면 대단히 감사하겠습니다
수고하세요