커뮤니티

수식 부탁드립니다.

프로필 이미지
플레인
2022-11-30 19:50:59
712
글번호 164270
답변완료
타주기에 관한 질문인데요. 5분 차트에서 30분(60분...)의 swinghigh, swinglow를 표시하였으면 합니다. swinghigh함수의 내용도 알수있을까 부탁드립니다. 감사합니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-12-01 13:28:16

안녕하세요 예스스탁입니다. input : 타주기분(30),Left(3),right(3); var : S1(0),D1(0),TM(0),TF(0),cnt(0); var : Rightcond(False),LeftCond(False),SH(-1),SL(-1),preSH(-1),preSL(-1); Array : HH[50](0),LL[50](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 = 49 downto 1 { HH[cnt] = HH[cnt-1]; LL[cnt] = LL[cnt-1]; } HH[0] = H; LL[0] = L; PreSH = SH[1]; PreSL = SL[1]; } 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 HH[Left+Right+1] > 0 Then { Rightcond = true; Leftcond = true; For cnt = 0 to Left+Right+1 { if cnt < right and HH[cnt] >= HH[right] Then RightCond = False; if cnt > right and HH[cnt] > HH[right] Then LeftCond = False; } if RightCond == true and LeftCond == true Then SH = HH[right]; Else SH = PreSH; } if LL[Left+Right+1] > 0 Then { Rightcond = true; Leftcond = true; For cnt = 0 to Left+Right+1 { if cnt < right and LL[cnt] < LL[right] Then RightCond = False; if cnt > right and LL[cnt] <= LL[right] Then LeftCond = False; } if RightCond == true and LeftCond == true Then SL = LL[right]; Else SL = PreSL; } } if SH > 0 Then Plot1(SH); Else NoPlot(1); if SL > 0 Then Plot2(SL); Else NoPlot(2); 즐거운 하루되세요 > 플레인 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다. > 타주기에 관한 질문인데요. 5분 차트에서 30분(60분...)의 swinghigh, swinglow를 표시하였으면 합니다. swinghigh함수의 내용도 알수있을까 부탁드립니다. 감사합니다.