커뮤니티

부탁 드립니다.

프로필 이미지
뮬리
2020-06-02 09:24:42
1483
글번호 139464
답변완료
도움 주심에 항상 감사 드립니다. 1)일봉용을 분봉에서 2)주봉용을 분봉에서 3)월봉용을 분봉에서 사용 토록 부탁 드립니다. Input : Period(20), D(1.5), sig(5); var1 = ma(H, Period) + (D * std(H, Period)); var2=(H-var1)/H; var3=ma(var2,sig); var11 = ma(L,period) - (D * std(L, Period)); var12=(L-var11)/L; var13=ma(var12,sig);
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-06-02 13:53:14

안녕하세요 예스스탁입니다. 1 일 input : Period(20),Dv(1.5),sig(5); var : cnt(0),SumSqrt1(0),Stdv1(0),SumSqrt2(0),Stdv2(0); var : sum1(0),sum2(0),BBmd1(0),bbmd2(0),hv1(0),hv3(0),lv1(0),lv3(0); var : cum1(0),cum2(0),avg1(0),avg2(0); Array : hh[100](0),ll[100](0),hv2[100](0),lv2[100](0); if Bdate != Bdate[1] Then { hh[0] = h; ll[0] = l; for cnt = 1 to 99 { hh[cnt] = hh[cnt-1][1]; ll[cnt] = ll[cnt-1][1]; hv2[cnt] = hv2[cnt-1][1]; lv2[cnt] = lv2[cnt-1][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[Period-1] > 0 and ll[Period-1] > 0 then { sum1 = 0; sum2 = 0; for cnt = 0 to Period-1 { sum1 = sum1 + hh[cnt]; sum2 = sum2 + ll[cnt]; } BBmd1 = sum1/Period; BBmd2 = sum2/Period; SumSqrt1 = 0; SumSqrt2 = 0; For cnt = 0 To Period - 1 { SumSqrt1 = SumSqrt1 + (hh[cnt] - BBmd1)^2; SumSqrt2 = SumSqrt2 + (ll[cnt] - BBmd2)^2; } Stdv1 = SquareRoot(SumSqrt1 / Period); Stdv2 = SquareRoot(SumSqrt2 / Period); hv1 = bbmd1 + stdv1*Dv; hv2[0] = (hh[0]-hv1)/hh[0]; lv1 = bbmd2 - stdv2*Dv; lv2[0] = (ll[0]-lv1)/ll[0]; } if hh[Period+sig-1] > 0 and ll[Period+sig-1] > 0 Then { cum1 = 0; cum2 = 0; for cnt = 0 to sig-1 { cum1 = cum1 + hv2[cnt]; cum2 = cum2 + lv2[cnt]; } hv3 = cum1/sig; lv3 = cum2/sig; plot1(hv3); plot2(lv3); } 2 input : Period(20),Dv(1.5),sig(5); var : cnt(0),SumSqrt1(0),Stdv1(0),SumSqrt2(0),Stdv2(0); var : sum1(0),sum2(0),BBmd1(0),bbmd2(0),hv1(0),hv3(0),lv1(0),lv3(0); var : cum1(0),cum2(0),avg1(0),avg2(0); Array : hh[100](0),ll[100](0),hv2[100](0),lv2[100](0); if DayOfWeek(Bdate) < DayOfWeek(Bdate[1]) Then { hh[0] = h; ll[0] = l; for cnt = 1 to 99 { hh[cnt] = hh[cnt-1][1]; ll[cnt] = ll[cnt-1][1]; hv2[cnt] = hv2[cnt-1][1]; lv2[cnt] = lv2[cnt-1][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[Period-1] > 0 and ll[Period-1] > 0 then { sum1 = 0; sum2 = 0; for cnt = 0 to Period-1 { sum1 = sum1 + hh[cnt]; sum2 = sum2 + ll[cnt]; } BBmd1 = sum1/Period; BBmd2 = sum2/Period; SumSqrt1 = 0; SumSqrt2 = 0; For cnt = 0 To Period - 1 { SumSqrt1 = SumSqrt1 + (hh[cnt] - BBmd1)^2; SumSqrt2 = SumSqrt2 + (ll[cnt] - BBmd2)^2; } Stdv1 = SquareRoot(SumSqrt1 / Period); Stdv2 = SquareRoot(SumSqrt2 / Period); hv1 = bbmd1 + stdv1*Dv; hv2[0] = (hh[0]-hv1)/hh[0]; lv1 = bbmd2 - stdv2*Dv; lv2[0] = (ll[0]-lv1)/ll[0]; } if hh[Period+sig-1] > 0 and ll[Period+sig-1] > 0 Then { cum1 = 0; cum2 = 0; for cnt = 0 to sig-1 { cum1 = cum1 + hv2[cnt]; cum2 = cum2 + lv2[cnt]; } hv3 = cum1/sig; lv3 = cum2/sig; plot1(hv3); plot2(lv3); } 3 input : Period(20),Dv(1.5),sig(5); var : cnt(0),SumSqrt1(0),Stdv1(0),SumSqrt2(0),Stdv2(0); var : sum1(0),sum2(0),BBmd1(0),bbmd2(0),hv1(0),hv3(0),lv1(0),lv3(0); var : cum1(0),cum2(0),avg1(0),avg2(0); Array : hh[100](0),ll[100](0),hv2[100](0),lv2[100](0); if Bdate >= Bdate[1]+30 Then { hh[0] = h; ll[0] = l; for cnt = 1 to 99 { hh[cnt] = hh[cnt-1][1]; ll[cnt] = ll[cnt-1][1]; hv2[cnt] = hv2[cnt-1][1]; lv2[cnt] = lv2[cnt-1][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[Period-1] > 0 and ll[Period-1] > 0 then { sum1 = 0; sum2 = 0; for cnt = 0 to Period-1 { sum1 = sum1 + hh[cnt]; sum2 = sum2 + ll[cnt]; } BBmd1 = sum1/Period; BBmd2 = sum2/Period; SumSqrt1 = 0; SumSqrt2 = 0; For cnt = 0 To Period - 1 { SumSqrt1 = SumSqrt1 + (hh[cnt] - BBmd1)^2; SumSqrt2 = SumSqrt2 + (ll[cnt] - BBmd2)^2; } Stdv1 = SquareRoot(SumSqrt1 / Period); Stdv2 = SquareRoot(SumSqrt2 / Period); hv1 = bbmd1 + stdv1*Dv; hv2[0] = (hh[0]-hv1)/hh[0]; lv1 = bbmd2 - stdv2*Dv; lv2[0] = (ll[0]-lv1)/ll[0]; } if hh[Period+sig-1] > 0 and ll[Period+sig-1] > 0 Then { cum1 = 0; cum2 = 0; for cnt = 0 to sig-1 { cum1 = cum1 + hv2[cnt]; cum2 = cum2 + lv2[cnt]; } hv3 = cum1/sig; lv3 = cum2/sig; plot1(hv3); plot2(lv3); } 즐거운 하루되세요 > 뮬리 님이 쓴 글입니다. > 제목 : 부탁 드립니다. > 도움 주심에 항상 감사 드립니다. 1)일봉용을 분봉에서 2)주봉용을 분봉에서 3)월봉용을 분봉에서 사용 토록 부탁 드립니다. Input : Period(20), D(1.5), sig(5); var1 = ma(H, Period) + (D * std(H, Period)); var2=(H-var1)/H; var3=ma(var2,sig); var11 = ma(L,period) - (D * std(L, Period)); var12=(L-var11)/L; var13=ma(var12,sig);