커뮤니티

부탁드립니다.

프로필 이미지
물고기
2020-05-11 08:29:08
1782
글번호 138732
답변완료
//---settings //Viscosity=7 //Sedimentation=50 //Thresholdlevel=1.1 //lagsupressor=1 //boolean value (default=true) //MAtype=2 //MA type variable (2=Weighted average) //---end of settings if barindex>Sedimentation then lagsK=0.5 sa = averagetruerange[Viscosity] s1 = indc[1] s3 = indc[3] if lagsupressor then vol=sa/averagetruerange[Sedimentation]+lagsK*(s1-s3) else vol=sa/averagetruerange[Sedimentation] endif MA1=average[Viscosity,MAtype](typicalprice) D1=0 Sum1=0 for x1=0 to Viscosity-1 do D1=square(typicalprice[x1]-MA1) Sum1=Sum1+D1 anti=sqrt(Sum1/(x1+1)) next MA2=average[Sedimentation,MAtype](typicalprice) D2=0 Sum2=0 for x2=0 to Sedimentation-1 do D2=square(typicalprice[x2]-MA2) Sum2=Sum2+D2 Sedi=sqrt(Sum2/(x2+1)) next antithres=anti/Sedi t = Thresholdlevel t=t-antithres if(vol>t) then volt=vol else volt=vol endif indc=vol endif return volt coloured(0,200,0) style(line,2) as "vmeter",t style(dottedline) as "threshold level" 변환 문의드립니다. 감사합니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-05-11 14:28:27

안녕하세요 예스스탁입니다. //---settings input : Viscosity(7),Sedimentation(50),Thresholdlevel(1.1),lagsupressor(true); var : lagsK(0),s1(0),s3(0),TYPICALPRICE(0); var : sa(0),vol(0),indc(0),MA1(0),d1(0),sum1(0),anti(0),ma2(0),d2(0),sum2(0),Sedi(0); var : x1(0),x2(0),antithres(0),t(0),volt(0); TYPICALPRICE = (H+l+c)/3; if barindex > Sedimentation then { lagsK=0.5; sa = ATR(Viscosity); s1 = indc[1]; s3 = indc[3]; if lagsupressor then vol=sa/atr(Sedimentation)+lagsK*(s1-s3); else vol=sa/atr(Sedimentation); MA1=wma(typicalprice,Viscosity); D1=0; Sum1=0; for x1=0 to Viscosity-1 { D1=square(typicalprice[x1]-MA1); Sum1=Sum1+D1; anti=sqrt(Sum1/(x1+1)); } MA2=wma(typicalprice,Sedimentation); D2=0; Sum2=0; for x2=0 to Sedimentation-1 { D2=square(typicalprice[x2]-MA2); Sum2=Sum2+D2; Sedi=sqrt(Sum2/(x2+1)); } antithres=anti/Sedi; t = Thresholdlevel; t = t-antithres; if(vol>t) then volt=vol; else volt=vol; indc=vol; plot1(volt,"threshold level",rgb(0,200,0)); } 즐거운 하루되세요 > 물고기 님이 쓴 글입니다. > 제목 : 부탁드립니다. > //---settings //Viscosity=7 //Sedimentation=50 //Thresholdlevel=1.1 //lagsupressor=1 //boolean value (default=true) //MAtype=2 //MA type variable (2=Weighted average) //---end of settings if barindex>Sedimentation then lagsK=0.5 sa = averagetruerange[Viscosity] s1 = indc[1] s3 = indc[3] if lagsupressor then vol=sa/averagetruerange[Sedimentation]+lagsK*(s1-s3) else vol=sa/averagetruerange[Sedimentation] endif MA1=average[Viscosity,MAtype](typicalprice) D1=0 Sum1=0 for x1=0 to Viscosity-1 do D1=square(typicalprice[x1]-MA1) Sum1=Sum1+D1 anti=sqrt(Sum1/(x1+1)) next MA2=average[Sedimentation,MAtype](typicalprice) D2=0 Sum2=0 for x2=0 to Sedimentation-1 do D2=square(typicalprice[x2]-MA2) Sum2=Sum2+D2 Sedi=sqrt(Sum2/(x2+1)) next antithres=anti/Sedi t = Thresholdlevel t=t-antithres if(vol>t) then volt=vol else volt=vol endif indc=vol endif return volt coloured(0,200,0) style(line,2) as "vmeter",t style(dottedline) as "threshold level" 변환 문의드립니다. 감사합니다.