커뮤니티

등가 수식 추가

프로필 이미지
상암동
2023-03-04 12:15:31
868
글번호 166920
답변완료
늘 감사합니다. 수식은 유익하게 잘 쓰고 있습니다. 아래의 수식에 다음 사항을 추가해 주세요. -------------- Plot6(Var4,"첫날시가");와 같은 방식으로 첫날 시가의 ATM 등가를 추가해 주세요 --------------- var : month(0),nday(0),week(0); var :EX(false),HH(0),LL(0),DD(0),HH1(0),LL1(0); var : t1(0),t2(0),t3(0),t4(0),t5(0),t6(0),t7(0),t8(0),t9(0),t10(0); month = int(date/100)-int(date/10000)*100; nday = date - int(date/100)*100; week = DayOfWeek(date); #선물만기 #if Month%3 == 0 and nday >= 8 and nday <= 14 and week == 4 then if nday >= 8 and nday <= 14 and week == 4 then#옵션만기 EX = true; Else EX = false; if EX == false and EX[1] == true Then{ Condition1 = true; DD = sDate; HH = H; LL = L; HH1 = HH[1]; LL1 = LL[1]; } if Condition1 == true then { if H > HH Then HH = H; if L < LL Then LL = L; var1 = HH; var2 = LL; var3 = var1-var2; plot1(var1,"Maxi"); plot2(var2+var3*0.618,"되돌림"); plot3(var2+var3*0.500,"중심"); plot4(var2+var3*0.382,"축소"); plot5(var2,"Mini"); if sDate == DD Then { Var4 = DayOpen; Var5 = DayHigh; Var6 = DayLow; } Plot6(Var4,"첫날시가"); Plot7(Var5,"첫날고가"); Plot8(Var6,"첫날저가"); if HH1 > 0 and LL1 > 0 Then { Plot9(HH1,"전월물최고"); Plot10(LL1,"전월물최저"); Plot11((HH1+LL1)/2,"전월물중간"); } }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-03-06 08:51:13

안녕하세요 예스스탁입니다. var : month(0),nday(0),week(0); var :EX(false),HH(0),LL(0),DD(0),HH1(0),LL1(0); var : t1(0),t2(0),t3(0),t4(0),t5(0),t6(0),t7(0),t8(0),t9(0),t10(0); var : v1(0),v2(0),atm(0); month = int(date/100)-int(date/10000)*100; nday = date - int(date/100)*100; week = DayOfWeek(date); #선물만기 #if Month%3 == 0 and nday >= 8 and nday <= 14 and week == 4 then if nday >= 8 and nday <= 14 and week == 4 then#옵션만기 EX = true; Else EX = false; if EX == false and EX[1] == true Then{ Condition1 = true; DD = sDate; HH = H; LL = L; HH1 = HH[1]; LL1 = LL[1]; } if Condition1 == true then { if H > HH Then HH = H; if L < LL Then LL = L; var1 = HH; var2 = LL; var3 = var1-var2; plot1(var1,"Maxi"); plot2(var2+var3*0.618,"되돌림"); plot3(var2+var3*0.500,"중심"); plot4(var2+var3*0.382,"축소"); plot5(var2,"Mini"); if sDate == DD Then { Var4 = DayOpen; Var5 = DayHigh; Var6 = DayLow; v1 = Floor(DayOpen/2.5)*2.5; v2 = DayOpen-v1; if v2 > 2.5/2 Then atm = v1+2.5; Else atm = v1; } Plot6(Var4,"첫날시가"); Plot7(Var5,"첫날고가"); Plot8(Var6,"첫날저가"); if HH1 > 0 and LL1 > 0 Then { Plot9(HH1,"전월물최고"); Plot10(LL1,"전월물최저"); Plot11((HH1+LL1)/2,"전월물중간"); } Plot12(atm,"첫날시가atm"); } 즐거운 하루되세요 > 상암동 님이 쓴 글입니다. > 제목 : 등가 수식 추가 > 늘 감사합니다. 수식은 유익하게 잘 쓰고 있습니다. 아래의 수식에 다음 사항을 추가해 주세요. -------------- Plot6(Var4,"첫날시가");와 같은 방식으로 첫날 시가의 ATM 등가를 추가해 주세요 --------------- var : month(0),nday(0),week(0); var :EX(false),HH(0),LL(0),DD(0),HH1(0),LL1(0); var : t1(0),t2(0),t3(0),t4(0),t5(0),t6(0),t7(0),t8(0),t9(0),t10(0); month = int(date/100)-int(date/10000)*100; nday = date - int(date/100)*100; week = DayOfWeek(date); #선물만기 #if Month%3 == 0 and nday >= 8 and nday <= 14 and week == 4 then if nday >= 8 and nday <= 14 and week == 4 then#옵션만기 EX = true; Else EX = false; if EX == false and EX[1] == true Then{ Condition1 = true; DD = sDate; HH = H; LL = L; HH1 = HH[1]; LL1 = LL[1]; } if Condition1 == true then { if H > HH Then HH = H; if L < LL Then LL = L; var1 = HH; var2 = LL; var3 = var1-var2; plot1(var1,"Maxi"); plot2(var2+var3*0.618,"되돌림"); plot3(var2+var3*0.500,"중심"); plot4(var2+var3*0.382,"축소"); plot5(var2,"Mini"); if sDate == DD Then { Var4 = DayOpen; Var5 = DayHigh; Var6 = DayLow; } Plot6(Var4,"첫날시가"); Plot7(Var5,"첫날고가"); Plot8(Var6,"첫날저가"); if HH1 > 0 and LL1 > 0 Then { Plot9(HH1,"전월물최고"); Plot10(LL1,"전월물최저"); Plot11((HH1+LL1)/2,"전월물중간"); } }