커뮤니티

문의드립니다.

프로필 이미지
해암
2026-03-10 10:06:23
71
글번호 231016
답변완료

아래의 30분봉 밴드를 예를들어 1분봉이나 3분봉 또는 60분봉 등 다른 분봉에 나타날 수 있게 수식을 부탁드립니다. 분봉의 조건값은 변경가능하게 부탁드립니다.

항상 감사드립니다. (만약 화살표를 표시하기 어렵다면 밴드라인만 나오게 해도 됩니다.)

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

Input : N(20), K(2);


Vars : UpArrow(0), DownArrow(0);


plot1(Average(O,N),"Mid");

plot2(Average(O,N) + K * Std(O,N),"Upper");

plot3(Average(O,N) - K * Std(O,N),"Lower");


UpArrow = Iff(L <= (Average(O,N) - K * Std(O,N)), L, 0);

DownArrow = Iff(H >= (Average(O,N) + K * Std(O,N)), H, 0);


plot4(UpArrow,"UpArrow");

plot5(DownArrow,"DownArrow");

지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2026-03-10 11:23:44

안녕하세요 예스스탁입니다. input : 타주기분(3),N(20),K(2); var : S1(0),D1(0),TM(0),TF(0); var : cnt(0),sum(0),Mid(0); var : SumSqrt(0),Stdv(0),upper(0),lower(0); var : UpArrow(0),DownArrow(0); Array : OO[100](0),HH[100](0),LL[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; TF = TM%타주기분; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분 > 1 and TF < TF[1]) or (Bdate == Bdate[1] and 타주기분 > 1 and TM >= TM[1]+타주기분) or (Bdate == Bdate[1] and 타주기분 == 1 and TM > TM[1]) Then { for cnt = 99 downto 1 { OO[cnt] = OO[cnt-1]; } OO[0] = O; HH[0] = H; LL[0] = L; } if HH[0] > 0 and H > HH[0] Then HH[0] = H; if LL[0] > 0 and L < LL[0] Then LL[0] = L; if OO[N] > 0 then { sum = 0; for cnt = 0 to N-1 { sum = sum + OO[cnt]; } Mid = sum/N; SumSqrt = 0; For cnt = 0 To N - 1 { SumSqrt = SumSqrt + (OO[cnt] - mid)^2; } Stdv = SquareRoot(SumSqrt / N); upper = mid + (K * Stdv); lower = mid - (K * Stdv); Plot1(mid,"중단"); Plot2(upper,"상단"); Plot3(lower,"하단"); UpArrow = Iff(LL[0] <= Lower, LL[0], 0); DownArrow = Iff(HH[0] >= Upper, HH[0], 0); plot4(UpArrow,"UpArrow"); plot5(DownArrow,"DownArrow"); } } 즐거운 하루되세요