커뮤니티

부탁 드립니다.

프로필 이미지
yes
2026-03-19 21:12:56
64
글번호 231171
답변완료

도움에 감사 드립니다.


수식을 30분봉에서 단위30으로 실행하면 정상적으로 지표가 실행되지 않습니다.

단위29나 단위31을 입력하면 정상적 입니다.


또 29분봉에서  단위30으로 실행하면 정상입니다.


이런 이유가 무엇인지 와 조치 방법을 간단하게  설명 부탁 드립니다.


미리 감사 드립니다.




input:단위(30);


var : S1(0),D1(0),TM(0),TF(0);

var : hh(0),ll(0),mm(0),month(0),Tcond(false);


if Tcond == false and sdate >= 20251221 and stime >= 120000 Then

       Tcond = true;


if tcond == true and  Tcond != Tcond[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;


          TF = TM%단위;


   if (Tcond == true and tcond != tcond[1]) or (tcond == true and tcond == tcond[1] and TF < TF[1])Then

   {

         hh = highest(h,100);

        

   }


   if hh > 0  then

   {

         if h > hh Then

               hh = h;

          mm = hh;

       

         var1=mm;

         

   }}


Plot1(var1);

지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2026-03-23 10:12:48

안녕하세요 예스스탁입니다. if (Tcond == true and tcond != tcond[1]) or (tcond == true and tcond == tcond[1] and TF < TF[1])Then { 올리신 수식은 타분봉주기로 값을 계산하는 내용입니다. 단위가 30이면 30분인데 30분봉에서는 30분이면 TF가 매봉 같은 값이므로 TF가 전봉과 같은 값일때도 포함되게 해주시면 됩니다. input:단위(30); var : S1(0),D1(0),TM(0),TF(0); var : hh(0),ll(0),mm(0),month(0),Tcond(false); if Tcond == false and sdate >= 20251221 and stime >= 120000 Then Tcond = true; if tcond == true and Tcond != Tcond[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; TF = TM%단위; if (Tcond == true and tcond != tcond[1]) or (tcond == true and tcond == tcond[1] and TF <= TF[1])Then { hh = highest(h,100); } if hh > 0 then { if h > hh Then hh = h; mm = hh; var1=mm; } } Plot1(TF); 즐거운 하루되세요