예스스탁
예스스탁 답변
2024-07-15 13:58:23
안녕하세요
예스스탁입니다.
틱봉에서 분봉의 값은 정확한 계산이 가능하지 않습니다.
수식은 봉의 시고저종가만 사용이 가능해서
봉 중간의 분봉경계의 값은 알지 못합니다.
아래식에서 4시간(240분), 1시간(60분), 3분봉 지표값은 모두 근사값입니다.
1
input : 타주기분1(3),타주기분2(60),타주기분3(240),전환선기간(9);
var : S1(0),D1(0),TM(0),cnt(0),hh(0),ll(0),전환선(0);
var : TF1(0),TF2(0),TF3(0),O2(0),O3(0),H2(0),L2(0);
Array : H1[100](0),L1[100](0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF1 = TM%타주기분1;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or
(Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or
(Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then
{
For cnt = 99 DownTo 1
{
H1[cnt] = H1[cnt-1];
L1[cnt] = L1[cnt-1];
}
H1[0] = H;
L1[0] = L;
}
TF2 = TM%타주기분2;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or
(Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or
(Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then
{
O2 = O;
H2 = H;
L2 = L;
}
if H2 > 0 and H > H2 Then
H2 = H;
if L2 > 0 and L < L2 Then
L2 = L;
TF3 = TM%타주기분3;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or
(Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or
(Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then
{
O3 = O;
}
if O2 > 0 and O3 > 0 and H2[전환선기간-1] > 0 and L2[전환선기간-1] > 0 Then
{
hh = 0;
ll = 0;
For cnt = 0 to 전환선기간-1
{
if hh == 0 or (hh > 0 and H[cnt] > hh) Then
hh = H[cnt];
if ll == 0 or (ll > 0 and L[cnt] < ll) Then
ll = L[cnt];
}
전환선 = (hh+ll)/2;
if C > O3 and
C > O2 and
C >= L2+(H2-L2)*0.25 and
C > 전환선 then
Buy();
if C < O3 and
C < O2 and
C <= H2-(H2-L2)*0.25 and
C < 전환선 then
Sell();
}
}
2
input : 타주기분1(3),타주기분2(60),타주기분3(240),전환선기간(9);
var : S1(0),D1(0),TM(0),cnt(0),hh(0),ll(0),전환선(0);
var : TF1(0),TF2(0),TF3(0),O2(0),O3(0),H2(0),L2(0),tx(0);
Array : H1[100](0),L1[100](0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF1 = TM%타주기분1;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or
(Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or
(Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then
{
For cnt = 99 DownTo 1
{
H1[cnt] = H1[cnt-1];
L1[cnt] = L1[cnt-1];
}
H1[0] = H;
L1[0] = L;
}
TF2 = TM%타주기분2;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or
(Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or
(Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then
{
O2 = O;
H2 = H;
L2 = L;
}
if H2 > 0 and H > H2 Then
H2 = H;
if L2 > 0 and L < L2 Then
L2 = L;
TF3 = TM%타주기분3;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or
(Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or
(Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then
{
O3 = O;
}
if O2 > 0 and O3 > 0 and H2[전환선기간-1] > 0 and L2[전환선기간-1] > 0 Then
{
hh = 0;
ll = 0;
For cnt = 0 to 전환선기간-1
{
if hh == 0 or (hh > 0 and H[cnt] > hh) Then
hh = H[cnt];
if ll == 0 or (ll > 0 and L[cnt] < ll) Then
ll = L[cnt];
}
전환선 = (hh+ll)/2;
if C > O3 and
C > O2 and
C >= L2+(H2-L2)*0.25 and
C > 전환선 then
{
tx = Text_New(sDate,sTime,H,"●");
Text_SetColor(tx,Red);
Text_SetStyle(tx,2,1);
Text_SetSize(tx,12);
}
if C < O3 and
C < O2 and
C <= H2-(H2-L2)*0.25 and
C < 전환선 then
{
tx = Text_New(sDate,sTime,H,"●");
Text_SetColor(tx,Blue);
Text_SetStyle(tx,2,1);
Text_SetSize(tx,12);
}
}
}
즐거운 하루되세요
> 라몬 님이 쓴 글입니다.
> 제목 : 도움 부탁드립니다
> 안녕하세요
아래와 같은 조건이 되었을경우
매수,매도 시스템 과 지표의 봉위에 원형으로 표시 부탁드립니다.
진입은 틱챠트에서 하며 캔들이 종가로 완성되었을때 입니다.
- 조 건 -
1.매수조건
- 4시간봉 시가선 위
- 1시간봉 시가선 위
- 1시간봉 25% 선 위
- 3분봉 전환선 위 (전환선 변수)
2.매도조건
- 4시간봉 시가선 아래
- 1시간봉 시가선 아래
- 1시간봉 25% 선 아래
- 3분봉 전환선 아래 (전환선 변수)
감사합니다.