커뮤니티

부탁 드립니다.

프로필 이미지
yes
2021-10-14 22:12:31
1199
글번호 152884
답변완료
도움에 감사 드립니다. 수식1)은 정주기형이며 수식2)은 타주기(분봉용)으로 작성 해주신것이며 이것을 타주기(일봉)과 타주기(주봉)으로 부탁 드립니다. 미리 감사 드립니다. 수식1)정주기형 input : P(100); var : cnt(0),LL(0),HH(0),a(0),ai(0),b(0),bi(0); LL = Lowest(L,P); HH = highest(H,P); ai = 0; bi = 0; Condition1 = False; Condition2 = False; For cnt = 0 to P-1 { if Condition1 == False and L[cnt] == LL Then { Condition1 = true; ai = L-LL[cnt]; } if Condition2 == False and H[cnt] == HH Then { Condition2 = true; bi = H-HH[cnt]; } } a = 100*((P-1)-((ai)))/(P-1); b = 100*((P-1)-((bi)))/(P-1); 수식2) 타주기 (분봉용) input : Ntime1(60),P(100); var : TF(0),S1(0),D1(0),TM(0),cnt(0); var : ai(0),bi(0),a(0),b(0); Array : HV[101](0),LV[101](0); Array : HH[101](0),LL[101](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%ntime1; if Bdate != Bdate[1] or (Bdate == Bdate[1] and Ntime1 > 1 and TF < TF[1]) or (Bdate == Bdate[1] and Ntime1> 1 and TM >= TM[1]+Ntime1) or (Bdate == Bdate[1] and Ntime1 == 1 and TM > TM[1]) Then { HV[0] = H; LV[0] = L; for cnt = 1 to 100 { HV[cnt] = HV[cnt-1][1]; LV[cnt] = LV[cnt-1][1]; HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } } if HV[0] > 0 and H > HV[0] Then HV[0] = H; if LV[0] > 0 and L < LV[0] Then LV[0] = L; if HV[P-1] > 0 and LV[P-1] > 0 Then { HH[0] = HV[0]; LL[0] = LV[0]; For cnt = 0 to P-1 { if HV[cnt] > HH[0] Then HH[0] = HV[cnt]; if LV[cnt] < LL[0] Then LL[0] = LV[cnt]; } } ai = 0; bi = 0; Condition1 = False; Condition2 = False; For cnt = 0 to P-1 { if Condition1 == False and LV[cnt] == LL[0] Then { Condition1 = true; ai = LV[0]-LL[cnt]; } if Condition2 == False and HV[cnt] == HH[0] Then { Condition2 = true; bi = HV[0]-HH[cnt]; } } a = 100*((P-1)-((ai)))/(P-1); b = 100*((P-1)-((bi)))/(P-1); Plot1(a); plot2(b); }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-10-15 09:20:05

안녕하세요 예스스탁입니다. 1 주 input : P(100); var : cnt(0); var : ai(0),bi(0),a(0),b(0); Array : HV[101](0),LV[101](0); Array : HH[101](0),LL[101](0); if DayOfWeek(Bdate) < DayOfWeek(bdate[1]) Then { HV[0] = H; LV[0] = L; for cnt = 1 to 100 { HV[cnt] = HV[cnt-1][1]; LV[cnt] = LV[cnt-1][1]; HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } } if HV[0] > 0 and H > HV[0] Then HV[0] = H; if LV[0] > 0 and L < LV[0] Then LV[0] = L; if HV[P-1] > 0 and LV[P-1] > 0 Then { HH[0] = HV[0]; LL[0] = LV[0]; For cnt = 0 to P-1 { if HV[cnt] > HH[0] Then HH[0] = HV[cnt]; if LV[cnt] < LL[0] Then LL[0] = LV[cnt]; } } ai = 0; bi = 0; Condition1 = False; Condition2 = False; For cnt = 0 to P-1 { if Condition1 == False and LV[cnt] == LL[0] Then { Condition1 = true; ai = LV[0]-LL[cnt]; } if Condition2 == False and HV[cnt] == HH[0] Then { Condition2 = true; bi = HV[0]-HH[cnt]; } } a = 100*((P-1)-((ai)))/(P-1); b = 100*((P-1)-((bi)))/(P-1); Plot1(a); plot2(b); 2 월 input : P(100); var : cnt(0); var : ai(0),bi(0),a(0),b(0); Array : HV[101](0),LV[101](0); Array : HH[101](0),LL[101](0); if Bdate > bdate[1]+30 Then { HV[0] = H; LV[0] = L; for cnt = 1 to 100 { HV[cnt] = HV[cnt-1][1]; LV[cnt] = LV[cnt-1][1]; HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } } if HV[0] > 0 and H > HV[0] Then HV[0] = H; if LV[0] > 0 and L < LV[0] Then LV[0] = L; if HV[P-1] > 0 and LV[P-1] > 0 Then { HH[0] = HV[0]; LL[0] = LV[0]; For cnt = 0 to P-1 { if HV[cnt] > HH[0] Then HH[0] = HV[cnt]; if LV[cnt] < LL[0] Then LL[0] = LV[cnt]; } } ai = 0; bi = 0; Condition1 = False; Condition2 = False; For cnt = 0 to P-1 { if Condition1 == False and LV[cnt] == LL[0] Then { Condition1 = true; ai = LV[0]-LL[cnt]; } if Condition2 == False and HV[cnt] == HH[0] Then { Condition2 = true; bi = HV[0]-HH[cnt]; } } a = 100*((P-1)-((ai)))/(P-1); b = 100*((P-1)-((bi)))/(P-1); Plot1(a); plot2(b); 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : 부탁 드립니다. > 도움에 감사 드립니다. 수식1)은 정주기형이며 수식2)은 타주기(분봉용)으로 작성 해주신것이며 이것을 타주기(일봉)과 타주기(주봉)으로 부탁 드립니다. 미리 감사 드립니다. 수식1)정주기형 input : P(100); var : cnt(0),LL(0),HH(0),a(0),ai(0),b(0),bi(0); LL = Lowest(L,P); HH = highest(H,P); ai = 0; bi = 0; Condition1 = False; Condition2 = False; For cnt = 0 to P-1 { if Condition1 == False and L[cnt] == LL Then { Condition1 = true; ai = L-LL[cnt]; } if Condition2 == False and H[cnt] == HH Then { Condition2 = true; bi = H-HH[cnt]; } } a = 100*((P-1)-((ai)))/(P-1); b = 100*((P-1)-((bi)))/(P-1); 수식2) 타주기 (분봉용) input : Ntime1(60),P(100); var : TF(0),S1(0),D1(0),TM(0),cnt(0); var : ai(0),bi(0),a(0),b(0); Array : HV[101](0),LV[101](0); Array : HH[101](0),LL[101](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%ntime1; if Bdate != Bdate[1] or (Bdate == Bdate[1] and Ntime1 > 1 and TF < TF[1]) or (Bdate == Bdate[1] and Ntime1> 1 and TM >= TM[1]+Ntime1) or (Bdate == Bdate[1] and Ntime1 == 1 and TM > TM[1]) Then { HV[0] = H; LV[0] = L; for cnt = 1 to 100 { HV[cnt] = HV[cnt-1][1]; LV[cnt] = LV[cnt-1][1]; HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } } if HV[0] > 0 and H > HV[0] Then HV[0] = H; if LV[0] > 0 and L < LV[0] Then LV[0] = L; if HV[P-1] > 0 and LV[P-1] > 0 Then { HH[0] = HV[0]; LL[0] = LV[0]; For cnt = 0 to P-1 { if HV[cnt] > HH[0] Then HH[0] = HV[cnt]; if LV[cnt] < LL[0] Then LL[0] = LV[cnt]; } } ai = 0; bi = 0; Condition1 = False; Condition2 = False; For cnt = 0 to P-1 { if Condition1 == False and LV[cnt] == LL[0] Then { Condition1 = true; ai = LV[0]-LL[cnt]; } if Condition2 == False and HV[cnt] == HH[0] Then { Condition2 = true; bi = HV[0]-HH[cnt]; } } a = 100*((P-1)-((ai)))/(P-1); b = 100*((P-1)-((bi)))/(P-1); Plot1(a); plot2(b); }