커뮤니티

부탁드립니다

프로필 이미지
와우리
2026-03-05 09:51:58
153
글번호 230907
답변완료

아래의 수식을 200틱 챠트에서 5분봉과 9분봉 기준으로 수정좀 부탁드립니다

또한, N(2) 외부함수가 선언은 되었으나 본문 적용은 안된것 같습니다.

=============================================================


- 일목의 전환선기준

- 타주기 무참조 기준


200틱 챠트에서 / 400틱과 5분봉의 전환선이 순서와 무관하게 모두 상승 전환시 매수

즉,  400틱과 5분봉이 상승중인데 200틱에서 상승이면 매수, 5분봉과 400틱이 상승중일때 200틱이 상승중이면 매수 순서와 무관하다는 말씀


200틱 챠트에서 / 400틱과 5분봉의 전환선이 순서와 무관하게 모두 하락 전환시 매도


틱봉에서 분봉지표값은 정확한 계산이 가능하지 않습니다.

틱봉에서 분봉값은 근사값이라고 보셔야 합니다.


input : Length(9),N(2),ntime(5);

var : 전환선1(0),cnt(0);

var : ii(0),TF2(0),Hv2(0),Lv2(0),전환선2(0),전환선21(0);

var : S1(0),D1(0),TM(0),TF3(0),hv3(0),lv3(0),전환선3(0),전환선31(0);

Array : H2[50](0),L2[50](0);

Array : H3[50](0),L3[50](0);


전환선1 = (Highest(High, 9) + Lowest(Low, 9)) / 2;



if Bdate != Bdate[1] Then

ii = 0;

Else

ii = ii +1;


TF2 = ii%2;


if Bdate != Bdate[1] or (Bdate == Bdate[1] and TF2 < TF2[1]) Then

{

for cnt = 49 downto 1

{

     H2[cnt] = H2[cnt-1];

     L2[cnt] = L2[cnt-1];

}

H2[0] = H;

L2[0] = L;

전환선21 = 전환선2[1];

}


if H2[0] > 0 and H > H2[0] Then

H2[0] = H;


if L2[0] > 0 and L < L2[0] Then

L2[0] = L;


if H2[Length-1] > 0 and L2[Length-1] > 0 Then

{

hv2 = 0;

Lv2 = 0;

For cnt = 0 to Length-1

{

if hv2 == 0 or (hv2 > 0 and H2[cnt] > hv2) Then

hv2 = H2[cnt];

if lv2 == 0 or (lv2 > 0 and L2[cnt] < lv2) Then

lv2 = L2[cnt];

}


전환선2 = (hv2+lv2)/2;

}


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;


TF3 = TM%ntime;


if Bdate != Bdate[1] or

(Bdate == Bdate[1] and ntime > 1 and TF3 < TF3[1]) or

(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or

(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then

{

for cnt = 49 downto 1

{

     H3[cnt] = H3[cnt-1];

     L3[cnt] = L3[cnt-1];

}

H3[0] = H;

L3[0] = L;

전환선31 = 전환선3[1];

}

if H3[0] > 0 and H > H3[0] Then

H3[0] = H;

if L3[0] > 0 and L < L3[0] Then

L3[0] = L;

}



if H3[Length-1] > 0 and L3[Length-1] > 0 Then

{

hv3 = 0;

Lv3 = 0;

For cnt = 0 to Length-1

{

if hv3 == 0 or (hv3 > 0 and H3[cnt] > hv3) Then

hv3 = H3[cnt];

if lv3 == 0 or (lv3 > 0 and L3[cnt] < lv3) Then

lv3 = L3[cnt];

}


전환선3 = (hv3+lv3)/2;

}


Condition1 = 전환선1 > 전환선1[1] and 전환선2 > 전환선21 and 전환선3 > 전환선31;


if Condition1 == true and Condition1[1] == False Then

Buy();


if Condition2 == true and Condition2[1] == False Then

Sell();



지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2026-03-05 14:36:46

안녕하세요 예스스탁입니다. 1 N이 적용되어 있지 않았습니다. 기존식 수정한 식입니다. input : Length(9),N(2),ntime(5); var : 전환선1(0),cnt(0); var : ii(0),TF2(0),Hv2(0),Lv2(0),전환선2(0),전환선21(0); var : S1(0),D1(0),TM(0),TF3(0),hv3(0),lv3(0),전환선3(0),전환선31(0); Array : H2[50](0),L2[50](0); Array : H3[50](0),L3[50](0); 전환선1 = (Highest(High, 9) + Lowest(Low, 9)) / 2; if Bdate != Bdate[1] Then ii = 0; Else ii = ii +1; TF2 = ii%N; if Bdate != Bdate[1] or (Bdate == Bdate[1] and TF2 < TF2[1]) Then { for cnt = 49 downto 1 { H2[cnt] = H2[cnt-1]; L2[cnt] = L2[cnt-1]; } H2[0] = H; L2[0] = L; 전환선21 = 전환선2[1]; } if H2[0] > 0 and H > H2[0] Then H2[0] = H; if L2[0] > 0 and L < L2[0] Then L2[0] = L; if H2[Length-1] > 0 and L2[Length-1] > 0 Then { hv2 = 0; Lv2 = 0; For cnt = 0 to Length-1 { if hv2 == 0 or (hv2 > 0 and H2[cnt] > hv2) Then hv2 = H2[cnt]; if lv2 == 0 or (lv2 > 0 and L2[cnt] < lv2) Then lv2 = L2[cnt]; } 전환선2 = (hv2+lv2)/2; } 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; TF3 = TM%ntime; if Bdate != Bdate[1] or (Bdate == Bdate[1] and ntime > 1 and TF3 < TF3[1]) or (Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or (Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then { for cnt = 49 downto 1 { H3[cnt] = H3[cnt-1]; L3[cnt] = L3[cnt-1]; } H3[0] = H; L3[0] = L; 전환선31 = 전환선3[1]; } if H3[0] > 0 and H > H3[0] Then H3[0] = H; if L3[0] > 0 and L < L3[0] Then L3[0] = L; } if H3[Length-1] > 0 and L3[Length-1] > 0 Then { hv3 = 0; Lv3 = 0; For cnt = 0 to Length-1 { if hv3 == 0 or (hv3 > 0 and H3[cnt] > hv3) Then hv3 = H3[cnt]; if lv3 == 0 or (lv3 > 0 and L3[cnt] < lv3) Then lv3 = L3[cnt]; } 전환선3 = (hv3+lv3)/2; } Condition1 = 전환선1 > 전환선1[1] and 전환선2 > 전환선21 and 전환선3 > 전환선31; Condition2 = 전환선1 < 전환선1[1] and 전환선2 < 전환선21 and 전환선3 > 전환선31; if Condition1 == true and Condition1[1] == False Then Buy(); if Condition2 == true and Condition2[1] == False Then Sell(); 2 input : Length(9),ntime2(5),ntime3(9); var : 전환선1(0),cnt(0); var : TF2(0),Hv2(0),Lv2(0),전환선2(0),전환선21(0); var : S1(0),D1(0),TM(0),TF3(0),hv3(0),lv3(0),전환선3(0),전환선31(0); Array : H2[50](0),L2[50](0); Array : H3[50](0),L3[50](0); 전환선1 = (Highest(High, 9) + Lowest(Low, 9)) / 2; 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; TF2 = TM%ntime2; if Bdate != Bdate[1] or (Bdate == Bdate[1] and ntime2 > 1 and TF2 < TF2[1]) or (Bdate == Bdate[1] and ntime2 > 1 and TM >= TM[1]+ntime2) or (Bdate == Bdate[1] and ntime2 == 1 and TM > TM[1]) Then { for cnt = 49 downto 1 { H2[cnt] = H2[cnt-1]; L2[cnt] = L2[cnt-1]; } H2[0] = H; L2[0] = L; 전환선21 = 전환선2[1]; } if H2[0] > 0 and H > H2[0] Then H2[0] = H; if L2[0] > 0 and L < L2[0] Then L2[0] = L; TF3 = TM%ntime3; if Bdate != Bdate[1] or (Bdate == Bdate[1] and ntime3 > 1 and TF3 < TF3[1]) or (Bdate == Bdate[1] and ntime3 > 1 and TM >= TM[1]+ntime3) or (Bdate == Bdate[1] and ntime3 == 1 and TM > TM[1]) Then { for cnt = 49 downto 1 { H3[cnt] = H3[cnt-1]; L3[cnt] = L3[cnt-1]; } H3[0] = H; L3[0] = L; 전환선31 = 전환선3[1]; } if H3[0] > 0 and H > H3[0] Then H3[0] = H; if L3[0] > 0 and L < L3[0] Then L3[0] = L; } if H2[Length-1] > 0 and L2[Length-1] > 0 Then { hv2 = 0; Lv2 = 0; For cnt = 0 to Length-1 { if hv2 == 0 or (hv2 > 0 and H2[cnt] > hv2) Then hv2 = H2[cnt]; if lv2 == 0 or (lv2 > 0 and L2[cnt] < lv2) Then lv2 = L2[cnt]; } 전환선2 = (hv2+lv2)/2; } if H3[Length-1] > 0 and L3[Length-1] > 0 Then { hv3 = 0; Lv3 = 0; For cnt = 0 to Length-1 { if hv3 == 0 or (hv3 > 0 and H3[cnt] > hv3) Then hv3 = H3[cnt]; if lv3 == 0 or (lv3 > 0 and L3[cnt] < lv3) Then lv3 = L3[cnt]; } 전환선3 = (hv3+lv3)/2; } Condition1 = 전환선1 > 전환선1[1] and 전환선2 > 전환선21 and 전환선3 > 전환선31; Condition2 = 전환선1 < 전환선1[1] and 전환선2 < 전환선21 and 전환선3 > 전환선31; if Condition1 == true and Condition1[1] == False Then Buy(); if Condition2 == true and Condition2[1] == False Then Sell(); 즐거운 하루되세요