커뮤니티

수식문의

프로필 이미지
백진강
2012-11-07 12:17:53
355
글번호 56305
답변완료
100 input : Left(3),Right(3); var : Sline(0); Sline = C;#시가기준이면 O로 변경 if value1 <= 0 and SwingHigh(1,Sline,Left,Right,Left+right+1) != -1 Then{ value1 = 1; var1 = Sline[Right]; plot1(var1,"Line1",RED); } if value1 >= 0 and SwingLow(1,Sline,Left,Right,Left+right+1) != -1 Then{ value1 = -1; var2 = Sline[Right]; plot1(var2,"line1",blue); } plot2(var1,"dot2",RED); plot3(var2,"dot3",BLUE); 200 #=========================================================# # 주처리 (Main Routine) 파동계산 #=========================================================# # 전고점(peak) 계산 #---------------------------------------------------------# //Highest(H,2)[3] <= H[2] and H[2] > Highest(H,2) if Highest(H,n)[n+1] <= H[n] and H[n] > Highest(H,n) then { if 미완성사용 == 1 then { for j = 18 downto 1 { 고[j+1] = 고[j]; 고Bar[j+1] = 고Bar[j]; } 고[1] = H[n]; 고Bar[1] = n; if 저Bar[1] > 고Bar[2] then { for j = 18 downto 1 { 저[j+1] = 저[j]; 저Bar[j+1] = 저Bar[j]; } k = n + 1; for j = n + 2 to 고Bar[2]-1 { if L[k] > L[j] then k = j; } 저[1] = L[k]; 저Bar[1] = k; } } if 미완성사용 == 0 then { if 고Bar[1] > 저Bar[1] then { for j = 18 downto 1 { 고[j+1] = 고[j]; 고Bar[j+1] = 고Bar[j]; } } if 고Bar[1] > 저Bar[1] or 고[1] <= h[n] then { 고[1] = h[n]; 고Bar[1] = n; } } } #---------------------------------------------------------# # 전저점(Trough) 계산 #---------------------------------------------------------# //Lowest(L,2)[3] >= L[2] and L[2] < Lowest(L,2) if Lowest(L,n)[n+1] >= L[n] and L[n] < Lowest(L,n) then { if 미완성사용 == 1 then { for j = 18 downto 1 { 저[j+1] = 저[j]; 저Bar[j+1] = 저Bar[j]; } 저[1] = L[n]; 저Bar[1] = n; if 고Bar[1] > 저Bar[2] then { for j = 18 downto 1 { 고[j+1] = 고[j]; 고Bar[j+1] = 고Bar[j]; } k = n + 1; for j = n + 2 to 저Bar[2]-1 { if H[k] < H[j] then k = j; } 고[1] = H[k]; 고Bar[1] = k; } } if 미완성사용 == 0 then { if 저Bar[1] > 고Bar[1] then { for j = 18 downto 1 { 저[j+1] = 저[j]; 저Bar[j+1] = 저Bar[j]; } } if 저Bar[1] > 고Bar[1] or 저[1] >= L[n] then { 저[1] = L[n]; 저Bar[1] = n; } } } 위의수식들을 시스템식으로 바꾸어주세요
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-11-07 17:04:53

안녕하세요 예스스탁입니다. 지표식만으로는 시스템식을 어떻게 작성해 드려야 할지 모르겠습니다. 각 지표식의 어떤 값으로 어떤 조건을 만들어야하는지 글로 자세히 올려주셔야 시스템으로 작성가능합니다. 즐거운 하루되세요 > 백진강 님이 쓴 글입니다. > 제목 : 수식문의 > 100 input : Left(3),Right(3); var : Sline(0); Sline = C;#시가기준이면 O로 변경 if value1 <= 0 and SwingHigh(1,Sline,Left,Right,Left+right+1) != -1 Then{ value1 = 1; var1 = Sline[Right]; plot1(var1,"Line1",RED); } if value1 >= 0 and SwingLow(1,Sline,Left,Right,Left+right+1) != -1 Then{ value1 = -1; var2 = Sline[Right]; plot1(var2,"line1",blue); } plot2(var1,"dot2",RED); plot3(var2,"dot3",BLUE); 200 #=========================================================# # 주처리 (Main Routine) 파동계산 #=========================================================# # 전고점(peak) 계산 #---------------------------------------------------------# //Highest(H,2)[3] <= H[2] and H[2] > Highest(H,2) if Highest(H,n)[n+1] <= H[n] and H[n] > Highest(H,n) then { if 미완성사용 == 1 then { for j = 18 downto 1 { 고[j+1] = 고[j]; 고Bar[j+1] = 고Bar[j]; } 고[1] = H[n]; 고Bar[1] = n; if 저Bar[1] > 고Bar[2] then { for j = 18 downto 1 { 저[j+1] = 저[j]; 저Bar[j+1] = 저Bar[j]; } k = n + 1; for j = n + 2 to 고Bar[2]-1 { if L[k] > L[j] then k = j; } 저[1] = L[k]; 저Bar[1] = k; } } if 미완성사용 == 0 then { if 고Bar[1] > 저Bar[1] then { for j = 18 downto 1 { 고[j+1] = 고[j]; 고Bar[j+1] = 고Bar[j]; } } if 고Bar[1] > 저Bar[1] or 고[1] <= h[n] then { 고[1] = h[n]; 고Bar[1] = n; } } } #---------------------------------------------------------# # 전저점(Trough) 계산 #---------------------------------------------------------# //Lowest(L,2)[3] >= L[2] and L[2] < Lowest(L,2) if Lowest(L,n)[n+1] >= L[n] and L[n] < Lowest(L,n) then { if 미완성사용 == 1 then { for j = 18 downto 1 { 저[j+1] = 저[j]; 저Bar[j+1] = 저Bar[j]; } 저[1] = L[n]; 저Bar[1] = n; if 고Bar[1] > 저Bar[2] then { for j = 18 downto 1 { 고[j+1] = 고[j]; 고Bar[j+1] = 고Bar[j]; } k = n + 1; for j = n + 2 to 저Bar[2]-1 { if H[k] < H[j] then k = j; } 고[1] = H[k]; 고Bar[1] = k; } } if 미완성사용 == 0 then { if 저Bar[1] > 고Bar[1] then { for j = 18 downto 1 { 저[j+1] = 저[j]; 저Bar[j+1] = 저Bar[j]; } } if 저Bar[1] > 고Bar[1] or 저[1] >= L[n] then { 저[1] = L[n]; 저Bar[1] = n; } } } 위의수식들을 시스템식으로 바꾸어주세요