커뮤니티

시스템 식 문의

프로필 이미지
pinetree
2004-09-07 11:53:36
1215
글번호 5054
독자 능력이 안되니 질문이 많군요, 죄송합니다. 시스템식 부탁 드립니다. 내용은 첨부 파일로 드릴께요. 답변은 이메일로 부탁 ....(song613@chollian.net)
시스템
답변 1
프로필 이미지

수식지왕

2004-09-07 17:21:18

전고점과 전저점의 정의가 이거다하고 명확하게 되어 있는 것이 아니고 개인이 정의하는 것이므로 아래의 식을 참조해서 변수값을 조정해 보시기 바랍니다. 제가 사용하는 방법은 두가지가 있는데 입력변수에 따라 모양이 다르게 나오므로 두가지 모두 올립니다. 시스템식 1은 swing함수와 마찬가지 개념입니다만 활용도를 높이기 위해 제가 재해석해서 만든 식입니다. 지표식과 함께 띄워 놓고 보면서 수정하면 빠르겠네요. 지표식은 제 홈피에서 다운 받으시기 바랍니다. < 시스템식1 > input:좌(6),우(5); var:j(0),예비고(0),예비저(0),예비고bar(0),예비저bar(0),고돌파cnt(0),저돌파cnt(0); array:고[10](0),저[10](0),고bar[10](0),저bar[10](0); #==============================================================================# # 전고전저점 계산 #==============================================================================# if highest(h,좌)==h and iff(예비고bar<우,예비고<h,1) then { 예비고=h; 예비고bar=0; } else { 예비고bar=예비고bar+1; } if lowest(l,좌)==l and iff(예비저bar<우,예비저>l,1) then { 예비저=l; 예비저bar=0; } else { 예비저bar=예비저bar+1; } for j=0 to 9 begin 고bar[j]=고bar[j]+1; 저bar[j]=저bar[j]+1; end; if 예비고bar==우 then { if 저bar[0]>고bar[0] then { if 고[0]<예비고 then { 고[0]=예비고; 고bar[0]=예비고bar; 고돌파cnt=0; } } else { for j=9 downto 1 begin 고[j]=고[j-1]; 고bar[j]=고bar[j-1]; end; 고[0]=예비고; 고bar[0]=예비고bar; 고돌파cnt=0; } } if 예비저bar==우 then { if 고bar[0]>저bar[0] then { if 저[0]>예비저 then { 저[0]=예비저; 저bar[0]=예비저bar; 저돌파cnt=0; } } else { for j=9 downto 1 begin 저[j]=저[j-1]; 저bar[j]=저bar[j-1]; end; 저[0]=예비저; 저bar[0]=예비저bar; 저돌파cnt=0; } } #==============================================================================# # 시스템식 #==============================================================================# if crossup(c,고[0]) then { 고돌파cnt=고돌파cnt+1; //돌파시 1회만 진입하기 위함 } if crossdown(c,저[0]) then { 저돌파cnt=저돌파cnt+1; } if 고돌파cnt[1]==0 and 고돌파cnt==1 and 고bar[0]<=40 and iff(ma(c,10)[고bar[0]]>ma(c,10)[고bar[0]+1],1,0) + iff(ma(c,20)[고bar[0]]>ma(c,20)[고bar[0]+1],1,0) + iff(ma(c,30)[고bar[0]]>ma(c,30)[고bar[0]+1],1,0)>=2 then buy(); if 저돌파cnt[1]==0 and 저돌파cnt==1 and 저bar[0]<=40 and iff(ma(c,10)[저bar[0]]<ma(c,10)[저bar[0]+1],1,0) + iff(ma(c,20)[저bar[0]]<ma(c,20)[저bar[0]+1],1,0) + iff(ma(c,30)[저bar[0]]<ma(c,30)[저bar[0]+1],1,0)>=2 then sell(); if C< ma(c,5) then exitlong(); if C> ma(c,5) then exitshort(); < 시스템식2 > input:전환율(0.5); var:j(0),idc(0),zigzag(0),기준고(0),기준저(0),기준고bar(0),기준저bar(0), 고돌파cnt(0),저돌파cnt(0); array:고[10](0),저[10](0),고bar[10](0),저bar[10](0); #==============================================================================# # 전고전저점 계산 #==============================================================================# if 기준고 < h or 기준고 == 0 then { 기준고 = h; 기준고bar=0; } else 기준고bar=기준고bar+1; if 기준저 > l or 기준저 == 0 then { 기준저 = l; 기준저bar=0; } else 기준저bar=기준저bar+1; if 기준저[1]*(1+(전환율/100))>=l[1] and 기준저[1]*(1+(전환율/100))<l and 기준고[1]*(1-(전환율/100))<=h[1] and 기준고[1]*(1-(전환율/100))>h then { if !(zigzag>l and zigzag<h) then { if zigzag>l then idc = 1; if zigzag<h then idc = -1; } } else { if 기준저[1]*(1+(전환율/100))>=l[1] and 기준저[1]*(1+(전환율/100))<l then idc = 1; else if 기준고[1]*(1-(전환율/100))<=h[1] and 기준고[1]*(1-(전환율/100))>h then idc = -1; } for j=0 to 9 begin 저bar[j]=저bar[j]+1; 고bar[j]=고bar[j]+1; end; if idc[1] == -1 and idc == 1 then { for j=9 downto 1 begin 저[j]=저[j-1]; 저bar[j]=저bar[j-1]; end; 저[0]=기준저; 저bar[0]=기준저bar; zigzag = 기준저; 기준저 = l; 기준저bar=0; 기준고 = h; 기준고bar=0; 저돌파cnt=0; } else { if idc[1] == 1 and idc == 1 and 기준저[1]*(1+(전환율/100))>=l[1] and 기준저[1]*(1+(전환율/100))<l and 저[0]>기준저 then { 저[0]=기준저; 저bar[0]=기준저bar; zigzag = 기준저; 기준저 = l; 기준저bar = 0; 저돌파cnt=0; } } if idc[1] == 1 and idc == -1 then { for j=9 downto 1 begin 고[j]=고[j-1]; 고bar[j]=고bar[j-1]; end; 고[0]=기준고; 고bar[0]=기준고bar; zigzag = 기준고; 기준고 = h; 기준고bar=0; 기준저 = l; 기준저bar=0; 고돌파cnt=0; } else { if idc[1] == -1 and idc == -1 and 기준고[1]*(1-(전환율/100))<=h[1] and 기준고[1]*(1-(전환율/100))>h and 고[0]<기준고 then { 고[0]=기준고; 고bar[0]=기준고bar; zigzag = 기준고; 기준고 = h; 기준고bar=0; 고돌파cnt=0; } } #==============================================================================# # 시스템식 #==============================================================================# if crossup(c,고[0]) then { 고돌파cnt=고돌파cnt+1; } if crossdown(c,저[0]) then { 저돌파cnt=저돌파cnt+1; } if 고돌파cnt[1]==0 and 고돌파cnt==1 and 고bar[0]<=40 and iff(ma(c,10)[고bar[0]]>ma(c,10)[고bar[0]+1],1,0) + iff(ma(c,20)[고bar[0]]>ma(c,20)[고bar[0]+1],1,0) + iff(ma(c,30)[고bar[0]]>ma(c,30)[고bar[0]+1],1,0)>=2 then buy(); if 저돌파cnt[1]==0 and 저돌파cnt==1 and 저bar[0]<=40 and iff(ma(c,10)[저bar[0]]<ma(c,10)[저bar[0]+1],1,0) + iff(ma(c,20)[저bar[0]]<ma(c,20)[저bar[0]+1],1,0) + iff(ma(c,30)[저bar[0]]<ma(c,30)[저bar[0]+1],1,0)>=2 then sell(); if C< ma(c,5) then exitlong(); if C> ma(c,5) then exitshort(); > pinetree 님이 쓴 글입니다. > 제목 : 시스템 식 문의 > 독자 능력이 안되니 질문이 많군요, 죄송합니다. 시스템식 부탁 드립니다. 내용은 첨부 파일로 드릴께요. 답변은 이메일로 부탁 ....(song613@chollian.net)