커뮤니티

수식 부탁드립니다.

프로필 이미지
쌀사비팔
2010-01-14 09:29:29
832
글번호 27436
답변완료
<현물1> *매수 조건 -전일 상이고, 당일 시가가 전일 종가대비 -1 ~ +4%이면, 시가 매수 [전일 상중에서 시가와 종가가 같은(점상, T상)은 제외] -단, 전전일에는 상이 아니어야 함 -일봉 이평선 5, 20은 정배열 이어야 함 *매수청산 조건 -10%이익이면, 청산 -10%손실이면, 청산 ------------------------- <현물2> *매수조건 -엔밸로프(20, 2) 하단선을 이탈할 때 1차 매수 -1차 매수가 대비 4%하락시 2차 매수 -추가 4%하락시(총 8%) 3차매수 -추가 4%하락시(총12%) 4차매수 계속.... *매수청산 조건 -매수가 평균 2%상승시 매수청산
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2010-01-14 09:28:06

안녕하세요 예스스탁입니다. 1. input : p1(5),P2(20); var : cnt(0),sum1(0),sum2(0),mav1(0),mav2(0); var : 상한가(0), UpLimit(0); var : aaa(0), bbb(0), ccc(0), ddd(0), eee(0),fff(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 { aaa = int(UpLimit/100+0.00001)*100; bbb = int(UpLimit/100+0.00001)*100; ccc = int(UpLimit/100+0.00001)*100; ddd = int(UpLimit/50+0.00001)*50; eee = int(UpLimit/10+0.00001)*10; fff = int(UpLimit/5+0.00001)*5; } else { aaa = int(UpLimit/1000+0.00001)*1000; bbb = int(UpLimit/500+0.00001)*500; ccc = int(UpLimit/100+0.00001)*100; ddd = int(UpLimit/50+0.00001)*50; eee = int(UpLimit/10+0.00001)*10; fff = int(UpLimit/10+0.00001)*10; } } Else { aaa = int(UpLimit/1000+0.00001)*1000; bbb = int(UpLimit/500+0.00001)*500; ccc = int(UpLimit/100+0.00001)*100; ddd = int(UpLimit/50+0.00001)*50; eee = int(UpLimit/10+0.00001)*10; fff = int(UpLimit/5+0.00001)*5; } if CodeCategory() == 1 || CodeCategory() == 2 then { If BP >= 500000 Then 상한가 = aaa; Else If BP >= 100000 Then 상한가 = iff(bbb>=500000, aaa, bbb); Else If BP >= 50000 Then 상한가 = iff(ccc>=100000, bbb, ccc); Else If BP >= 10000 Then 상한가 = iff(ddd>=50000, ccc, ddd); Else If BP >= 5000 Then 상한가 = iff(eee>=10000, ddd, eee); Else 상한가 = iff(fff>=5000, eee, fff); } else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF 상한가 = fff; } } sum1 = 0; sum2 = 0; for cnt = 0 to P2{ if cnt < P1 Then sum1 = sum1+DayClose(cnt); if cnt < P2 Then sum2 = sum2+DayClose(cnt); } mav1 = sum1/p1; mav2 = sum1/P2; if date != date[1] Then{ value1 = 상한가[1]; value2 = value1[1]; } if DayClose(1) >= Value1 and DayClose(2) >= value2 and mav1 > mav2 and c > dayopen and stime == 150000 and NextBarOpen >= C*0.99 and NextBarOpen <= 1.04 Then buy("b",AtMarket); SetStopLoss(10); SetStopProfittarget(10); 2. if MarketPosition == 0 and CrossDown(C,EnvelopeDown(20,2)) Then buy("b"); if MarketPosition == 1 Then{ buy("b1",Atlimit,EntryPrice*(1-(0.04*CurrentEntries))); exitlong("bx",atlimit,AvgEntryPrice*1.02); } 즐거운 하루되세요 > 쌀사비팔 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다. > <현물1> *매수 조건 -전일 상이고, 당일 시가가 전일 종가대비 -1 ~ +4%이면, 시가 매수 [전일 상중에서 시가와 종가가 같은(점상, T상)은 제외] -단, 전전일에는 상이 아니어야 함 -일봉 이평선 5, 20은 정배열 이어야 함 *매수청산 조건 -10%이익이면, 청산 -10%손실이면, 청산 ------------------------- <현물2> *매수조건 -엔밸로프(20, 2) 하단선을 이탈할 때 1차 매수 -1차 매수가 대비 4%하락시 2차 매수 -추가 4%하락시(총 8%) 3차매수 -추가 4%하락시(총12%) 4차매수 계속.... *매수청산 조건 -매수가 평균 2%상승시 매수청산