커뮤니티

시스템 문의드립니다

프로필 이미지
후니러비
2021-02-16 08:43:31
462
글번호 146350
답변완료
아래 지표를 시스템으로 변환부탁드립니다. Momentum > 0 이고, pci가 20선 하향돌파 일때 매수 Momentum < 0 이고, pci가 80선 상향돌파 일때 매도 오늘 가입한 생초보입니다.감사합니다. input : Period(20); var : mo(0),cnt(0),P(0),UPsum(0),Dnsum(0),PCI(0); Array : Gredient[100](0),Updev[100](0),Dndev[100](0); P = Period-1; Mo = C-C[Period]; for cnt = 0 to P{ Gredient[cnt] = C[P]+Mo*(P-cnt)/P; } for cnt = 0 to P{ Updev[cnt] = 0; Dndev[cnt] = 0; if C[cnt] > Gredient[cnt] Then Updev[cnt] = C[cnt]-Gredient[cnt]; if C[cnt] < Gredient[cnt] Then Dndev[cnt] = Gredient[cnt]-C[cnt]; } upsum = 0; Dnsum = 0; for cnt = 0 to P{ upsum = upsum +Updev[cnt]; Dnsum = dnsum +dndev[cnt]; } PCI = upsum/(upsum+Dnsum)*100; plot1(PCI,"Phase change index"); plot2(20,"20선",WHITe); plot3(80,"80선",WHITe);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-02-16 14:40:24

안녕하세요 예스스탁입니다. input : Period(20); var : mo(0),cnt(0),P(0),UPsum(0),Dnsum(0),PCI(0); Array : Gredient[100](0),Updev[100](0),Dndev[100](0); P = Period-1; Mo = C-C[Period]; for cnt = 0 to P{ Gredient[cnt] = C[P]+Mo*(P-cnt)/P; } for cnt = 0 to P{ Updev[cnt] = 0; Dndev[cnt] = 0; if C[cnt] > Gredient[cnt] Then Updev[cnt] = C[cnt]-Gredient[cnt]; if C[cnt] < Gredient[cnt] Then Dndev[cnt] = Gredient[cnt]-C[cnt]; } upsum = 0; Dnsum = 0; for cnt = 0 to P{ upsum = upsum +Updev[cnt]; Dnsum = dnsum +dndev[cnt]; } PCI = upsum/(upsum+Dnsum)*100; if mo > 0 and CrossDown(pci,20) Then Buy(); if mo < 0 and CrossUp(pci,80) Then Sell(); 즐거운 하루되세요 > 후니러비 님이 쓴 글입니다. > 제목 : 시스템 문의드립니다 > 아래 지표를 시스템으로 변환부탁드립니다. Momentum > 0 이고, pci가 20선 하향돌파 일때 매수 Momentum < 0 이고, pci가 80선 상향돌파 일때 매도 오늘 가입한 생초보입니다.감사합니다. input : Period(20); var : mo(0),cnt(0),P(0),UPsum(0),Dnsum(0),PCI(0); Array : Gredient[100](0),Updev[100](0),Dndev[100](0); P = Period-1; Mo = C-C[Period]; for cnt = 0 to P{ Gredient[cnt] = C[P]+Mo*(P-cnt)/P; } for cnt = 0 to P{ Updev[cnt] = 0; Dndev[cnt] = 0; if C[cnt] > Gredient[cnt] Then Updev[cnt] = C[cnt]-Gredient[cnt]; if C[cnt] < Gredient[cnt] Then Dndev[cnt] = Gredient[cnt]-C[cnt]; } upsum = 0; Dnsum = 0; for cnt = 0 to P{ upsum = upsum +Updev[cnt]; Dnsum = dnsum +dndev[cnt]; } PCI = upsum/(upsum+Dnsum)*100; plot1(PCI,"Phase change index"); plot2(20,"20선",WHITe); plot3(80,"80선",WHITe);