커뮤니티

수식 확인 부탁드리겠습니다.

프로필 이미지
아일랜드전설
2014-02-17 14:00:16
167
글번호 72616
답변완료
안녕하세요. 항상 도움에 감사드립니다. 하기와 같은 시스템 수식 확인 부탁드리겠습니다. - 전제 조건 - #1. 일봉 기준: 1봉전 상한가 or #2. 일봉 기준: 2봉전 상한가 or #3. 일봉 기준: 3봉전 상한가 or #4. 일봉 기준: 4봉전 상한가 or #5. 일봉 기준: 5봉전 상한가 or #6. 일봉 기준: 6봉전 상한가가 한 번은 나와야 함.(즉 1봉전부터 6봉전까지 상한가가 한번 나와야 함) 그리고 일봉 기준 1봉전 일목균형표 기준선 가격이 20일 이동 평균 가격 보다 반드시 커야 함. #매수조건: 60분봉에서 0봉과 181전봉사이의 가격중 가장 높은 가격과 가장 낮은 가격의 평균 가격에 0봉의 저가 OR 종가가 2%내로 근접했을 경우 다음 봉 시초가에 매수 #매도조건: 매수가격에 5% 이익이 났을 경우 매도 위와 조건에 부합하는 수식 확인 부탁드리겠습니다. 고맙습니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-02-17 17:07:09

안녕하세요 예스스탁입니다. var : 상한가(0), UpLimit(0),maP(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); var : upcond(0),upcond1(0),upcond2(0),upcond3(0),upcond4(0),upcond5(0),upcond6(0); var : 기준선(0),dayma(0),HH(0),LL(0),cnt(0),sum(0); if date >= 19981207 then { if date < 20050328 && CodeCategory() == 2 then UpLimit = (BP[0] * 1.12); Else UpLimit = (BP[0] * 1.15); if CodeCategory() == 2 then { if date >= 20030721 then { up1 = int(UpLimit/100+0.00001)*100; up2 = int(UpLimit/100+0.00001)*100; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/10+0.00001)*10; up7 = int(UpLimit/1+0.00001)*1; } } Else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } if CodeCategory() == 1 || CodeCategory() == 2 then { if sdate < 20101004 Then{ If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up6); } Else{ If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up7); } } else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF 상한가 = up6; } } if date != date[1] Then{ UPcond = 0; UPcond1 = UPcond[1]; UPcond2 = UPcond1[1]; UPcond3 = UPcond2[1]; UPcond4 = UPcond3[1]; UPcond5 = UPcond4[1]; UPcond6 = UPcond5[1]; } if H >= 상한가 Then UPcond = 1; #일봉 전일 기준선 계산 HH = dayhigh(1); LL = daylow(1); for cnt = 1 to 26{ if DayHigh(cnt) > HH Then HH = DayHigh(cnt); if DayLow(cnt) < LL Then LL = DayLow(cnt); } 기준선 = (HH+LL)/2; #일봉 전일 이평계산 sum = 0; for cnt = 1 to 20{ sum = sum+DayClose(cnt); } dayma = sum/maP; var1 = highest(H,182); var2 = lowest(L,182); var3 = (var1+var2)/2; if upcond1+upcond2+upcond3+upcond4+upcond5+upcond6 >= 1 And 기준선 > dayma And (CrossDown(L,var2*1.02) or CrossDown(C,var2*1.02)) Then buy("b",AtMarket); if MarketPosition == 1 Then ExitLong("bx",AtStop,EntryPrice*0.95); 즐거운 하루되세요 > 아일랜드전설 님이 쓴 글입니다. > 제목 : 수식 확인 부탁드리겠습니다. > 안녕하세요. 항상 도움에 감사드립니다. 하기와 같은 시스템 수식 확인 부탁드리겠습니다. - 전제 조건 - #1. 일봉 기준: 1봉전 상한가 or #2. 일봉 기준: 2봉전 상한가 or #3. 일봉 기준: 3봉전 상한가 or #4. 일봉 기준: 4봉전 상한가 or #5. 일봉 기준: 5봉전 상한가 or #6. 일봉 기준: 6봉전 상한가가 한 번은 나와야 함.(즉 1봉전부터 6봉전까지 상한가가 한번 나와야 함) 그리고 일봉 기준 1봉전 일목균형표 기준선 가격이 20일 이동 평균 가격 보다 반드시 커야 함. #매수조건: 60분봉에서 0봉과 181전봉사이의 가격중 가장 높은 가격과 가장 낮은 가격의 평균 가격에 0봉의 저가 OR 종가가 2%내로 근접했을 경우 다음 봉 시초가에 매수 #매도조건: 매수가격에 5% 이익이 났을 경우 매도 위와 조건에 부합하는 수식 확인 부탁드리겠습니다. 고맙습니다.