커뮤니티
재질문 드립니다
2014-09-23 13:53:39
198
글번호 78749
안녕하세요
재질문 드립니다
아래는 애써 올려주신 수식인데요
제생각과는 다르게 나와서 재질문 드립니다
만들어주신 수식으로 해보니
구현이 제대로 안됩니다
그전날과 연결이 안되는구간이 생기고
1분 분봉에서 현재가가 20선과 5분 20선 10분 10선 모두 골드일때 소리와 텍스트
1분 분봉에서 현재가가 20선과 5분 20선 10분 10선 모두 데드 날때까지 유지
유지시 10분마다 소리와 텍스트
1분 분봉에서 현재가가 20선과 5분 20선 10분 10선 모두 데드일때 소리와 텍스트
1분 분봉에서 현재가가 20선과 5분 20선 10분 10선 모두 골드 날때까지 유지
유지시 10분마다 소리와 텍스트
언제나 감사드립니다
input : P1(20);
input : T2(5),P2(20);
input : T3(10),P3(10);
var : mav1(0),TF2(0),TF3(0),cnt(0),sum2(0),sum3(0),mav2(0),mav3(0),T(0);
Array : C2[100](0),C3[100](0);
mav1 = ma(c,P1);
TF2 = TimeToMinutes(stime)%T2;
if dayindex == 0 or (TF2 < TF2[1] and stime > stime[1]) Then{
for cnt = 1 to 99{
C2[cnt] = C2[cnt-1][1];
}
}
C2[0] = c;
TF3 = TimeToMinutes(stime)%T3;
if dayindex == 0 or (TF3 < TF3[1] and stime > stime[1]) or stime == 151500 Then{
for cnt = 1 to 99{
C3[cnt] = C3[cnt-1][1];
}
}
C3[0] = c;
if C2[P2-1] > 0 and C3[P3-1] > 0 Then{
sum2 = 0;
for cnt = 0 to p2-1{
sum2 = sum2+C2[cnt];
}
mav2 = sum2/P2;
sum3 = 0;
for cnt = 0 to p3-1{
sum3 = sum3+C3[cnt];
}
mav3 = sum3/P3;
if c > mav1 and c > mav2 and C > mav3 Then
T = 1;
else if c < mav1 and c < mav2 and C < mav3 Then
T = -1;
Else
T = 0;
if T == 1 and T[1] != 1 Then{
var1 = TimeToMinutes(stime);
Text_New(sdate,stime,H,"골드발생");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if T == 1 and TimeToMinutes(stime) > var1 and (TimeToMinutes(stime)-var1)%10 < (TimeToMinutes(stime[1])-var1)%10 Then{
Text_New(sdate,stime,H,"골드유지");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if T == -1 and T[1] != -1 Then{
var2 = TimeToMinutes(stime);
Text_New(sdate,stime,L,"데드발생");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if Condition2 == true and TimeToMinutes(stime) > var2 and (TimeToMinutes(stime)-var1)%10 < (TimeToMinutes(stime[1])-var1)%10 Then{
Text_New(sdate,stime,L,"데드유지");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
}
playsound함수는 컴퓨터안에 있는 wav파일을 구동합니다.
위식에서는 기본으로 제공되는 wav파일을 지정했습니다
게시판에서 수식을 복사해 편집기에 옮길경우
파일의 경로 중 ₩의 폰트가 맞지 않아 깨질수 있습니다.
₩는 다시 타이핑 하시기 바랍니다.
즐거운 하루되세요
> starj5 님이 쓴 글입니다.
> 제목 : 부탁드립니다
> 안녕 하세요
궁금한 지표식은
1분 분봉에서 20선과 5분 20선 10분 10선 모두 골드일때 소리와 텍스트
유지시 10분마다 소리와 텍스트
1분 분봉에서 20선과 5분 20선 10분 10선 모두 데드일때 소리와 텍스트
유지시 10분마다 소리와 텍스트
언제나 감사드립니다
답변 1
예스스탁 예스스탁 답변
2014-09-24 12:50:45
안녕하세요
예스스탁입니다.
식을 수정해 봤습니다.
해당식이 1분봉에서 5분 ,10분의 이평을 계산해서
모두 골든크로스인지 데드크로스인지 판단하는데
짧은주기에서 긴주기의 이평을 계산하므로 움직임이 좀더 많습니다.
가령 10분봉의 이평값을 1분단위로 체크를 하므로
원래 10분봉에서는 중간에 골드가 발생했다가 종가에는
다시 골드가 해제되어 다시 주가가 이평보다 작아진 상태인데
1분단위로 10분봉 완성전 시간에 골드나 데드가 발생하면
발생한것으로 인지하고 가게 됩니다.
기존식에서는 모두 골드와 데드가 아닌구간은 텍스트나 소리를 출력시키지 않았습니다.
올려드리는 식에는 한번 골드가 발생하면 다음데드까지
한번 데드가 발생하면 다음 골드까지 연결되게 수정해 드립니다.
문의하신 내용 올려드린 내용외에는 따로 작성할 방법이 없습니다.
해당 모두 검색식으로 작성해 적용하시기 바랍니다.
골드와 골드유지, 데드와 데드유지별로 점이찍히도록 추가가 되어 있습니다.
input : P1(20);
input : T2(5),P2(20);
input : T3(10),P3(10);
var : mav1(0),TF2(0),TF3(0),cnt(0),sum2(0),sum3(0),mav2(0),mav3(0),T(0);
Array : C2[100](0),C3[100](0);
mav1 = ma(c,P1);
TF2 = TimeToMinutes(stime)%T2;
if dayindex == 0 or (TF2 < TF2[1] and stime > stime[1]) Then{
for cnt = 1 to 99{
C2[cnt] = C2[cnt-1][1];
}
}
C2[0] = c;
TF3 = TimeToMinutes(stime)%T3;
if dayindex == 0 or (TF3 < TF3[1] and stime > stime[1]) or stime == 151500 Then{
for cnt = 1 to 99{
C3[cnt] = C3[cnt-1][1];
}
}
C3[0] = c;
if C2[P2-1] > 0 and C3[P3-1] > 0 Then{
sum2 = 0;
for cnt = 0 to p2-1{
sum2 = sum2+C2[cnt];
}
mav2 = sum2/P2;
sum3 = 0;
for cnt = 0 to p3-1{
sum3 = sum3+C3[cnt];
}
mav3 = sum3/P3;
if c > mav1 and c > mav2 and C > mav3 Then
T = 1;
if c < mav1 and c < mav2 and C < mav3 Then
T = -1;
if T == 1 and T[1] != 1 Then{
plot1(H,"1",RED);
var1 = TimeToMinutes(stime);
Text_New(sdate,stime,H,"골드발생");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if T == 1 and TimeToMinutes(stime) > var1 and (TimeToMinutes(stime)-var1)%10 < (TimeToMinutes(stime[1])-var1)%10 Then{
plot1(H,"1",MAGENTA);
Text_New(sdate,stime,H,"골드유지");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if T == -1 and T[1] != -1 Then{
plot2(L,"2",BLUE);
var2 = TimeToMinutes(stime);
Text_New(sdate,stime,L,"데드발생");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if Condition2 == true and TimeToMinutes(stime) > var2 and (TimeToMinutes(stime)-var2)%10 < (TimeToMinutes(stime[1])-var2)%10 Then{
plot2(L,"2",cyan);
Text_New(sdate,stime,L,"데드유지");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
}
혹은 참조데이터를 이용해 보시기 바랍니다.
모든 데이터는 완성봉만 이용하므로
현재 미완성인 5분봉과 10분봉의 값은 제외하고
완성된 봉만 따져서 골드나 데드를 판단해 값들이 출력됩니다.
input : P1(20);
input : P2(20);
input : P3(10);
var : T(0,data1),TF1(0,data1),TF2(0,data1);
if data1(c > ma(C,P1)) and data2(c > ma(C,P2)) and data3(C > ma(c,P3)) Then
T = 1;
if data1(c < ma(C,P1)) and data2(c < ma(C,P2)) and data3(C < ma(c,P3)) Then
T = -1;
if T == 1 and T[1] != 1 Then{
plot1(H,"1",RED);
TF1 = TimeToMinutes(stime);
Text_New(sdate,stime,H,"골드발생");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if T == 1 and TimeToMinutes(stime) > TF1 and (TimeToMinutes(stime)-TF1)%10 < (TimeToMinutes(stime[1])-TF1)%10 Then{
plot1(H,"1",MAGENTA);
Text_New(sdate,stime,H,"골드유지");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if T == -1 and T[1] != -1 Then{
plot2(L,"2",BLUE);
TF2 = TimeToMinutes(stime);
Text_New(sdate,stime,L,"데드발생");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if Condition2 == true and TimeToMinutes(stime) > TF2 and (TimeToMinutes(stime)-TF2)%10 < (TimeToMinutes(stime[1])-TF2)%10 Then{
plot2(L,"2",cyan);
Text_New(sdate,stime,L,"데드유지");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
즐거운 하루되세요
> starj5 님이 쓴 글입니다.
> 제목 : 재질문 드립니다
> 안녕하세요
재질문 드립니다
아래는 애써 올려주신 수식인데요
제생각과는 다르게 나와서 재질문 드립니다
만들어주신 수식으로 해보니
구현이 제대로 안됩니다
그전날과 연결이 안되는구간이 생기고
1분 분봉에서 현재가가 20선과 5분 20선 10분 10선 모두 골드일때 소리와 텍스트
1분 분봉에서 현재가가 20선과 5분 20선 10분 10선 모두 데드 날때까지 유지
유지시 10분마다 소리와 텍스트
1분 분봉에서 현재가가 20선과 5분 20선 10분 10선 모두 데드일때 소리와 텍스트
1분 분봉에서 현재가가 20선과 5분 20선 10분 10선 모두 골드 날때까지 유지
유지시 10분마다 소리와 텍스트
언제나 감사드립니다
input : P1(20);
input : T2(5),P2(20);
input : T3(10),P3(10);
var : mav1(0),TF2(0),TF3(0),cnt(0),sum2(0),sum3(0),mav2(0),mav3(0),T(0);
Array : C2[100](0),C3[100](0);
mav1 = ma(c,P1);
TF2 = TimeToMinutes(stime)%T2;
if dayindex == 0 or (TF2 < TF2[1] and stime > stime[1]) Then{
for cnt = 1 to 99{
C2[cnt] = C2[cnt-1][1];
}
}
C2[0] = c;
TF3 = TimeToMinutes(stime)%T3;
if dayindex == 0 or (TF3 < TF3[1] and stime > stime[1]) or stime == 151500 Then{
for cnt = 1 to 99{
C3[cnt] = C3[cnt-1][1];
}
}
C3[0] = c;
if C2[P2-1] > 0 and C3[P3-1] > 0 Then{
sum2 = 0;
for cnt = 0 to p2-1{
sum2 = sum2+C2[cnt];
}
mav2 = sum2/P2;
sum3 = 0;
for cnt = 0 to p3-1{
sum3 = sum3+C3[cnt];
}
mav3 = sum3/P3;
if c > mav1 and c > mav2 and C > mav3 Then
T = 1;
else if c < mav1 and c < mav2 and C < mav3 Then
T = -1;
Else
T = 0;
if T == 1 and T[1] != 1 Then{
var1 = TimeToMinutes(stime);
Text_New(sdate,stime,H,"골드발생");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if T == 1 and TimeToMinutes(stime) > var1 and (TimeToMinutes(stime)-var1)%10 < (TimeToMinutes(stime[1])-var1)%10 Then{
Text_New(sdate,stime,H,"골드유지");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if T == -1 and T[1] != -1 Then{
var2 = TimeToMinutes(stime);
Text_New(sdate,stime,L,"데드발생");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
if Condition2 == true and TimeToMinutes(stime) > var2 and (TimeToMinutes(stime)-var1)%10 < (TimeToMinutes(stime[1])-var1)%10 Then{
Text_New(sdate,stime,L,"데드유지");
PlaySound("C:₩예스트레이더4₩data₩sound₩alert.wav");
}
}
playsound함수는 컴퓨터안에 있는 wav파일을 구동합니다.
위식에서는 기본으로 제공되는 wav파일을 지정했습니다
게시판에서 수식을 복사해 편집기에 옮길경우
파일의 경로 중 ₩의 폰트가 맞지 않아 깨질수 있습니다.
₩는 다시 타이핑 하시기 바랍니다.
즐거운 하루되세요
> starj5 님이 쓴 글입니다.
> 제목 : 부탁드립니다
> 안녕 하세요
궁금한 지표식은
1분 분봉에서 20선과 5분 20선 10분 10선 모두 골드일때 소리와 텍스트
유지시 10분마다 소리와 텍스트
1분 분봉에서 20선과 5분 20선 10분 10선 모두 데드일때 소리와 텍스트
유지시 10분마다 소리와 텍스트
언제나 감사드립니다
다음글
이전글