커뮤니티

부탁드립니다

프로필 이미지
채존비록
2026-04-22 10:57:10
94
글번호 231714
답변완료

input : shortP(5), midP(20);

var : 단기이평(0), 중기이평(0), 장기이평(0);

var : HighV(0), LowV(0), HighI(0), LowI(0), GoldI(0), DeadI(0), deadindex(0), GoldValue(0), DeadValue(0);


shortP = ma(C, shortP);

midP = ma(C, midP);


if date != date[1] then {

HighV = H;

HighI = i;

LowV = L;

LowI = i;

}


if crossup(shortP, midP) and stime < 150000 then {

      HighV = H;

      GoldI = i;

      GoldValue = C;

}

if crossdown(shortP, midP) and stime < 150000 then {

      LowV = L;

      DeadI= i;

      DeadValue = C;

}


if accumN(iff(crossup(shortP, midP),1,0),dayindex()+1) >= 1 and

   shortP > midP and H > HighV and stime < 150000 then {

      HighV = H;

      HighI = i;

}

else {

      HighV = HighV;

      HighI = HighI;

}


if accumN(iff(crossdown(shortP, midP),1,0),dayindex()+1) >= 1 and

   shortP < midP and L < LowV and stime < 150000 then {

      LowV = L;

      LowI = i;

}

else {

      LowV = LowV;

      LowI = LowI;

}

plot1(HighV);

plot2(LowV);

plot3(GoldValue);

plot4(DeadValue);


여기서  150000 시간을 제거해 주시고, 수식이 자꾸 버벅되는데 함 봐주세요 불필요 하거나 다듬을 부분이 없는지 함 봐주세요


지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2026-04-23 10:13:10

안녕하세요 예스스탁입니다. input : shortP(5), midP(20); var : 단기이평(0), 중기이평(0), 장기이평(0); var : HighV(0), LowV(0), HighI(0), LowI(0), GoldI(0), DeadI(0), deadindex(0), GoldValue(0), DeadValue(0); var : short(0),mid(0),upcount(0),dncount(0); short = ma(C, shortP); mid = ma(C, midP); if date != date[1] then { HighV = H; HighI = Index; LowV = L; LowI = Index; upcount = 0; dncount = 0; } if crossup(short, mid) then { HighV = H; GoldI = Index; GoldValue = C; upcount = upcount+1; } if crossdown(short, mid) then { LowV = L; DeadI= Index; DeadValue = C; dncount = dncount+1; } if upcount >= 1 and short > mid and H > HighV then { HighV = H; HighI = Index; } else { HighV = HighV; HighI = HighI; } if dncount >= 1 and short < mid and L < LowV then { LowV = L; LowI = Index; } else { LowV = LowV; LowI = LowI; } plot1(HighV); plot2(LowV); plot3(GoldValue); plot4(DeadValue); 즐거운 하루되세요