커뮤니티

수식 문의 드립니다.

프로필 이미지
부활
2025-03-13 00:22:41
344
글번호 189101
답변완료
안녕하세요. 첨부파일의 수식을 수정 부탁드립니다. 첨부파일 중 '지표'의 수식은 (시트 1)의 지표 중 PLOT1과 PLOT2 그리고 (시트 2)의 ' 이평선과 피보나치 수식을 만들어 주세요. ex) 1. plot1과 5일 최고의 피보나치 수식 2. 만약 plot1과 plot2 사이의 위치가 변할시(상승, 하락) 둘 중 아래의 지표로 자동변환가능하다면 그 수식도 부탁드립니다. 3. '지표1'의 수식 중 (시트 1)의 plot10~plot14번과 (시트 2)의 plot34~plot38번의 중간값(1/2)를 구하는 수식을 부탁드립니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-03-13 16:26:23

안녕하세요 예스스탁입니다. 1 input : P(5); var : cnt(0); var : sumV1(0),sumV2(0), mav1(0),mav2(0),diff(0),value(0); Array : WC[500](0),WH[500](0),WO[500](0),WL[500](0); if bdate != Bdate[1] and DayOfWeek(Bdate) <= DayOfWeek(Bdate[1]) Then { For cnt = 299 DownTo 1 { WC[cnt] = WC[cnt-1]; WH[cnt] = WH[cnt-1]; WO[cnt] = WO[cnt-1]; WL[cnt] = WL[cnt-1]; } WH[0] = H; WL[0] = L; WO[0] = O; } WC[0] = C; if WH[0] > 0 and H > WH[0] Then WH[0] = H; if WC[P] > 0 Then { sumV1 = WO[0]; sumV2 = WO[0]; for cnt = 1 to P-1 { sumV1 = sumV1+WC[cnt]; sumV2 = sumV2+WC[cnt+1]; } maV1 = sumV1 / P; maV2 = sumV2 / P; diff = mav2-mav1; } input : P1(10); var : sumV3(0),sumV4(0), mav3(0),mav4(0),diff1(0),value1(0); if WC[P1] > 0 Then { sumV3 = WO[0]; sumV4 = WO[0]; for cnt = 1 to P1-1 { sumV3 = sumV3+WC[cnt]; sumV4 = sumV4+WC[cnt+1]; } maV3 = sumV3 / P1; maV4 = sumV4 / P1; diff1 = mav4-mav3; } input : P2(20); var : sumV5(0),sumV6(0), mav5(0),mav6(0),diff2(0),value2(0); if WC[P2] > 0 Then { sumV5 = WO[0]; sumV6 = WO[0]; for cnt = 1 to P2-1 { sumV5 = sumV5+WC[cnt]; sumV6 = sumV6+WC[cnt+1]; } maV5 = sumV5 / P2; maV6 = sumV6 / P2; diff2 = mav6-mav5; } input : P3(40); var : sumV7(0),sumV8(0), mav7(0),mav8(0),diff3(0),value3(0); if WC[P3] > 0 Then { sumV7 = WO[0]; sumV8 = WO[0]; for cnt = 1 to P3-1 { sumV7 = sumV7+WC[cnt]; sumV8 = sumV8+WC[cnt+1]; } maV7 = sumV7 / P3; maV8 = sumV8 / P3; diff3 = mav8-mav7; } input : P4(60); var : sumV9(0),sumV10(0), mav9(0),mav10(0),diff4(0),value4(0); if WC[P] > 0 Then { sumV9 = WO[0]; sumV10 = WO[0]; for cnt = 1 to P4-1 { sumV9 = sumV9+WC[cnt]; sumV10 = sumV10+WC[cnt+1]; } maV9 = sumV9 / P4; maV10 = sumV10/ P4; diff4 = mav10-mav9; } input : P5(120); var : sumV11(0),sumV12(0), mav11(0),mav12(0),diff5(0),value5(0); if WC[P] > 0 Then { sumV11 = WO[0]; sumV12 = WO[0]; for cnt = 1 to P5-1 { sumV11 = sumV11+WC[cnt]; sumV12 = sumV12+WC[cnt+1]; } maV11 = sumV11 / P5; maV12 = sumV12/ P5; diff5 = mav12-mav11; } var : v1(0); VAR1 = DIFF+DIFF1+DIFF2+DIFF3; Var2 = DIFF1+DIFF2+DIFF3+DIFF4; Var3 = DIFF2+DIFF3+DIFF4+DIFF5; VAR4 = DIFF-DIFF1-DIFF2-DIFF3; Var5 = DIFF1-DIFF2-DIFF3-DIFF4; Var6 = DIFF2-DIFF3-DIFF4-DIFF5; v1 = -VAR1 + DAYHIGH[1]; input : dayP1(5); var : daysumV1(0),daymav1(0),HH1(0); daysumV1 = 0; for cnt = 0 to dayP1 { if cnt < dayP1 Then sumV1 = sumV1+DayClose(cnt); } daymaV1 = daysumV1 / dayP1; HH1 = mav1; input :Per1(76.4),Per2(61.8),Per3(50.0),Per4(38.2),Per5(23.6); var : hv(0),R1(0),R2(0),R3(0),R4(0),R5(0),lv(0); Hv = max(v1,hh1); R1 = Lv+(Hv-Lv)*(Per1/100); R2 = Lv+(Hv-Lv)*(Per2/100); R3 = Lv+(Hv-Lv)*(Per3/100); R4 = Lv+(Hv-Lv)*(Per4/100); R5 = Lv+(Hv-Lv)*(Per5/100); Lv = min(v1,hh1); Plot1(hv); Plot2(R1); Plot3(R2); Plot4(R3); Plot5(R4); Plot6(R5); Plot7(lv); 2 input : P(5); var : cnt(0); var : sumV1(0),sumV2(0), mav1(0),mav2(0),diff(0),value(0); Array : WC[500](0),WH[500](0),WO[500](0),WL[500](0); if bdate != Bdate[1] and DayOfWeek(Bdate) <= DayOfWeek(Bdate[1]) Then { For cnt = 299 DownTo 1 { WC[cnt] = WC[cnt-1]; WH[cnt] = WH[cnt-1]; WO[cnt] = WO[cnt-1]; WL[cnt] = WL[cnt-1]; } WH[0] = H; WL[0] = L; WO[0] = O; } WC[0] = C; if WH[0] > 0 and H > WH[0] Then WH[0] = H; if WC[P] > 0 Then { sumV1 = WO[0]; sumV2 = WO[0]; for cnt = 1 to P-1 { sumV1 = sumV1+WC[cnt]; sumV2 = sumV2+WC[cnt+1]; } maV1 = sumV1 / P; maV2 = sumV2 / P; diff = mav2-mav1; } input : P1(10); var : sumV3(0),sumV4(0), mav3(0),mav4(0),diff1(0),value1(0); if WC[P1] > 0 Then { sumV3 = WO[0]; sumV4 = WO[0]; for cnt = 1 to P1-1 { sumV3 = sumV3+WC[cnt]; sumV4 = sumV4+WC[cnt+1]; } maV3 = sumV3 / P1; maV4 = sumV4 / P1; diff1 = mav4-mav3; } input : P2(20); var : sumV5(0),sumV6(0), mav5(0),mav6(0),diff2(0),value2(0); if WC[P2] > 0 Then { sumV5 = WO[0]; sumV6 = WO[0]; for cnt = 1 to P2-1 { sumV5 = sumV5+WC[cnt]; sumV6 = sumV6+WC[cnt+1]; } maV5 = sumV5 / P2; maV6 = sumV6 / P2; diff2 = mav6-mav5; } input : P3(40); var : sumV7(0),sumV8(0), mav7(0),mav8(0),diff3(0),value3(0); if WC[P3] > 0 Then { sumV7 = WO[0]; sumV8 = WO[0]; for cnt = 1 to P3-1 { sumV7 = sumV7+WC[cnt]; sumV8 = sumV8+WC[cnt+1]; } maV7 = sumV7 / P3; maV8 = sumV8 / P3; diff3 = mav8-mav7; } input : P4(60); var : sumV9(0),sumV10(0), mav9(0),mav10(0),diff4(0),value4(0); if WC[P] > 0 Then { sumV9 = WO[0]; sumV10 = WO[0]; for cnt = 1 to P4-1 { sumV9 = sumV9+WC[cnt]; sumV10 = sumV10+WC[cnt+1]; } maV9 = sumV9 / P4; maV10 = sumV10/ P4; diff4 = mav10-mav9; } input : P5(120); var : sumV11(0),sumV12(0), mav11(0),mav12(0),diff5(0),value5(0); if WC[P] > 0 Then { sumV11 = WO[0]; sumV12 = WO[0]; for cnt = 1 to P5-1 { sumV11 = sumV11+WC[cnt]; sumV12 = sumV12+WC[cnt+1]; } maV11 = sumV11 / P5; maV12 = sumV12/ P5; diff5 = mav12-mav11; } var : v1(0),v4(0); VAR1 = DIFF+DIFF1+DIFF2+DIFF3; Var2 = DIFF1+DIFF2+DIFF3+DIFF4; Var3 = DIFF2+DIFF3+DIFF4+DIFF5; VAR4 = DIFF-DIFF1-DIFF2-DIFF3; Var5 = DIFF1-DIFF2-DIFF3-DIFF4; Var6 = DIFF2-DIFF3-DIFF4-DIFF5; v1 = -VAR1 + DAYHIGH[1]; v4 = VAR4 + DayLoW[1]; input : dayP1(5); var : daysumV1(0),daymav1(0),HH1(0); daysumV1 = 0; for cnt = 0 to dayP1 { if cnt < dayP1 Then sumV1 = sumV1+DayClose(cnt); } daymaV1 = daysumV1 / dayP1; HH1 = mav1; input :Per1(76.4),Per2(61.8),Per3(50.0),Per4(38.2),Per5(23.6); var : hv(0),R1(0),R2(0),R3(0),R4(0),R5(0),lv(0); Hv = max(min(v1,v4),hh1); R1 = Lv+(Hv-Lv)*(Per1/100); R2 = Lv+(Hv-Lv)*(Per2/100); R3 = Lv+(Hv-Lv)*(Per3/100); R4 = Lv+(Hv-Lv)*(Per4/100); R5 = Lv+(Hv-Lv)*(Per5/100); Lv = min(min(v1,v4),hh1); Plot1(hv); Plot2(R1); Plot3(R2); Plot4(R3); Plot5(R4); Plot6(R5); Plot7(lv); 3 input : 타주기분1(240),타주기분3(480),타주기분5(720); var : S1(0),D1(0),TM(0),TF1(0),TF2(0),TF3(0),TF4(0),TF5(0),TF6(0),cnt(0); Array : OO[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; TF1 = TM%타주기분1; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { var1 = o; } TF3 = TM%타주기분3; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분3 > 1 and TF3 < TF3[1]) or (Bdate == Bdate[1] and 타주기분3 > 1 and TM >= TM[1]+타주기분3) or (Bdate == Bdate[1] and 타주기분3 == 1 and TM > TM[1]) Then { var3 = o; } TF5 = TM%타주기분5; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분5 > 1 and TF5 < TF5[1]) or (Bdate == Bdate[1] and 타주기분5 > 1 and TM >= TM[1]+타주기분5) or (Bdate == Bdate[1] and 타주기분5 == 1 and TM > TM[1]) Then { var5 = o; } { for cnt = 49 downto 1 { OO[cnt] = OO[cnt-1]; } OO[0] = O; } } input : P(5); var : sumV1(0),sumV2(0), mav1(0),mav2(0),diff(0),value(0); if DayClose(P) > 0 Then { sumV1 = DayOpen; sumV2 = DayOpen; for cnt = 1 to P-1 { sumV1 = sumV1+DayClose(cnt); sumV2 = sumV2+DayClose(cnt+1); } maV1 = sumV1 / P;#당일기준 일봉이평 maV2 = sumV2 / P;#전일기준 일봉이평 diff = mav2-mav1;#전일-당일 } input : P1(10); var : sumV3(0),sumV4(0), mav3(0),mav4(0),diff1(0),value1(0); if DayClose(P1) > 0 Then { sumV3 = DayOpen; sumV4 = DayOpen; for cnt = 1 to P1-1 { sumV3 = sumV3+DayClose(cnt); sumV4 = sumV4+DayClose(cnt+1); } maV3 = sumV3 / P1;#당일기준 일봉이평 maV4 = sumV4 / P1;#전일기준 일봉이평 diff1 = mav4-mav3;#전일-당일 } input : P2(20); var : sumV5(0),sumV6(0), mav5(0),mav6(0),diff2(0),value2(0); if DayClose(P2) > 0 Then { sumV5 = DayOpen; sumV6 = DayOpen; for cnt = 1 to P2-1 { sumV5 = sumV5+DayClose(cnt); sumV6 = sumV6+DayClose(cnt+1); } maV5 = sumV5 / P2;#당일기준 일봉이평 maV6 = sumV6 / P2;#전일기준 일봉이평 diff2 = mav6-mav5;#전일-당일 } input : P3(40); var : sumV7(0),sumV8(0), mav7(0),mav8(0),diff3(0),value3(0); if DayClose(P3) > 0 Then { sumV7 = DayOpen; sumV8 = DayOpen; for cnt = 1 to P3-1 { sumV7 = sumV7+DayClose(cnt); sumV8 = sumV8+DayClose(cnt+1); } maV7 = sumV7 / P3;#당일기준 일봉이평 maV8 = sumV8 / P3;#전일기준 일봉이평 diff3 = mav8-mav7;#전일-당일 } input : P4(60); var : sumV9(0),sumV10(0), mav9(0),mav10(0),diff4(0),value4(0); if DayClose(P4) > 0 Then { sumV9 = DayOpen; sumV10 = DayOpen; for cnt = 1 to P4-1 { sumV9 = sumV9+DayClose(cnt); sumV10 = sumV10+DayClose(cnt+1); } maV9 = sumV9 / P4;#당일기준 일봉이평 maV10 = sumV10 / P4;#전일기준 일봉이평 diff4 = mav10-mav9;#전일-당일 } input : P5(120); var : sumV11(0),sumV12(0), mav11(0),mav12(0),diff5(0),value5(0); if DayClose(P5) > 0 Then { sumV11 = DayOpen; sumV12 = DayOpen; for cnt = 1 to P5-1 { sumV11 = sumV11+DayClose(cnt); sumV12 = sumV12+DayClose(cnt+1); } maV11 = sumV11 / P5;#당일기준 일봉이평 maV12 = sumV12 / P5;#전일기준 일봉이평 diff5 = mav12-mav11;#전일-당일 } input :Per1(76.4),Per2(61.8),Per3(50.0),Per4(38.2),Per5(23.6); var : v10(0),v11(0),v12(0),v13(0),v14(0); var6 = var12+(var11-var12)*(Per1/100); var7 = var12+(var11-var12)*(Per2/100); var8 = var12+(var11-var12)*(Per3/100); var9 = var12+(var11-var12)*(Per4/100); var10 =var12+(var11-var12)*(Per5/100); var11 = var1+diff1; var12 = var1-diff1; v10 = Var6; v11 = Var7; v12 = Var8; v13 = Var9; v14 = Var10; input : wP(5); var : wsumV1(0),wsumV2(0), wmav1(0),wmav2(0),wdiff(0),wvalue(0); Array : WC[500](0),WH[500](0),WO[500](0),WL[500](0); if bdate != Bdate[1] and DayOfWeek(Bdate) <= DayOfWeek(Bdate[1]) Then { For cnt = 299 DownTo 1 { WC[cnt] = WC[cnt-1]; WH[cnt] = WH[cnt-1]; WO[cnt] = WO[cnt-1]; WL[cnt] = WL[cnt-1]; } WH[0] = H; WL[0] = L; WO[0] = O; } WC[0] = C; if WH[0] > 0 and H > WH[0] Then WH[0] = H; if WC[WP] > 0 Then { wsumV1 = WO[0]; wsumV2 = WO[0]; for cnt = 1 to WP-1 { wsumV1 = wsumV1+WC[cnt]; wsumV2 = wsumV2+WC[cnt+1]; } wmav1 = wsumV1 / WP; wmav2 = wsumV2 / WP; wdiff = wmav2-wmav1; } input : WP1(10); var : wsumV3(0),wsumV4(0), wmav3(0),wmav4(0),wdiff1(0),wvalue1(0); if WC[WP1] > 0 Then { wsumV3 = WO[0]; wsumV4 = WO[0]; for cnt = 1 to WP1-1 { wsumV3 = wsumV3+WC[cnt]; wsumV4 = wsumV4+WC[cnt+1]; } wmav3 = wsumV3 / WP1; wmav4 = wsumV4 / WP1; wdiff1 = wmav4-wmav3; } input : WP2(20); var : wsumV5(0),wsumV6(0), wmav5(0),wmav6(0),wdiff2(0),wvalue2(0); if WC[WP2] > 0 Then { wsumV5 = WO[0]; wsumV6 = WO[0]; for cnt = 1 to WP2-1 { wsumV5 = wsumV5+WC[cnt]; wsumV6 = wsumV6+WC[cnt+1]; } wmav5 = wsumV5 / WP2; wmav6 = wsumV6 / WP2; wdiff2 = wmav6-wmav5; } input : WP3(40); var : wsumV7(0),wsumV8(0), wmav7(0),wmav8(0),wdiff3(0),wvalue3(0); if WC[WP3] > 0 Then { wsumV7 = WO[0]; wsumV8 = WO[0]; for cnt = 1 to WP3-1 { wsumV7 = wsumV7+WC[cnt]; wsumV8 = wsumV8+WC[cnt+1]; } wmav7 = wsumV7 / WP3; wmav8 = wsumV8 / WP3; wdiff3 = wmav8-wmav7; } input : WP4(60); var : wsumV9(0),wsumV10(0), wmav9(0),wmav10(0),wdiff4(0),wvalue4(0); if WC[WP4] > 0 Then { wsumV9 = WO[0]; wsumV10 = WO[0]; for cnt = 1 to WP4-1 { wsumV9 = wsumV9+WC[cnt]; wsumV10 = wsumV10+WC[cnt+1]; } wmav9 = wsumV9 / WP4; wmav10 = wsumV10/ WP4; wdiff4 = wmav10-wmav9; } input : WP5(120); var : wsumV11(0),wsumV12(0), wmav11(0),wmav12(0),wdiff5(0),wvalue5(0); if WC[WP5] > 0 Then { wsumV11 = WO[0]; wsumV12 = WO[0]; for cnt = 1 to WP5-1 { wsumV11 = wsumV11+WC[cnt]; wsumV12 = wsumV12+WC[cnt+1]; } wmav11 = wsumV11 /WP5; wmav12 = wsumV12/WP5; wdiff5 = wmav12-wmav11; } var : wVAR1(0), wVAR2(0), wVAR3(0), wVAR4(0), wVAR5(0), wVAR6(0); var : wplot1(0), wplot4(0), wVAR18(0), wVAR19(0), wVAR20(0); var : wplot34(0),wplot35(0),wplot36(0),wplot37(0),wplot38(0); wVAR1 = wdiff+wdiff1+wdiff2+wdiff3; wVAR2 = wdiff1+wdiff2+wdiff3+wdiff4; wVAR3 = wdiff2+wdiff3+wdiff4+wdiff5; wVAR4 = wdiff-wdiff1-wdiff2-wdiff3; wVAR5 = wdiff1-wdiff2-wdiff3-wdiff4; wVAR6 = wdiff2-wdiff3-wdiff4-wdiff5; wplot1 = -wVAR1 + DAYHIGH[1]; wplot4 = wVAR4 + DayLoW[1]; wplot34 = wplot4+(wPlot1-wplot4)*(Per1/100); wplot35 = wplot4+(wPlot1-wplot4)*(Per2/100); wplot36 = wplot4+(wPlot1-wplot4)*(Per3/100); wplot37 = wplot4+(wPlot1-wplot4)*(Per4/100); wplot38 = wplot4+(wPlot1-wplot4)*(Per5/100); Plot1((v10+wplot34)/2); Plot2((v11+wplot35)/2); Plot3((v12+wplot36)/2); Plot4((v13+wplot37)/2); Plot5((v14+wplot38)/2); 즐거운 하루되세요 > 부활 님이 쓴 글입니다. > 제목 : 수식 문의 드립니다. > 안녕하세요. 첨부파일의 수식을 수정 부탁드립니다. 첨부파일 중 '지표'의 수식은 (시트 1)의 지표 중 PLOT1과 PLOT2 그리고 (시트 2)의 ' 이평선과 피보나치 수식을 만들어 주세요. ex) 1. plot1과 5일 최고의 피보나치 수식 2. 만약 plot1과 plot2 사이의 위치가 변할시(상승, 하락) 둘 중 아래의 지표로 자동변환가능하다면 그 수식도 부탁드립니다. 3. '지표1'의 수식 중 (시트 1)의 plot10~plot14번과 (시트 2)의 plot34~plot38번의 중간값(1/2)를 구하는 수식을 부탁드립니다.