커뮤니티

시스템 수식 부탁드립니다.

프로필 이미지
승부사1
2015-12-18 01:29:16
115
글번호 93568
답변완료
매수가 1 : 전일 종가 매수가 2 : 전일 시가 손절가 : 전일 저가 -1% 매도가 * 평단가대비 +5%를 돌파하면 홀딩후 5% 단위로 주가 체크 * +10%를 도달하지 못하고 하락하면 +5%에서 매도 * +15%를 도달하지 못하고 하락하면 +10%에서 매도 * +20%를 도달하지 못하고 하락하면 +15%에서 매도 * +25%를 도달하지 못하고 하락하면 +20%에서 매도 * +30%를 도달하지 못하고 하락하면 +25%에서 매도 * 상한가 매도 * 144500
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-12-18 11:43:44

안녕하세요 예스스탁입니다. 1번식은 전일종가와 전일시가 중 하나의 값을 터치하면 진입하게 됩니다. 피라미딩은 되지 않습니다. 만약 피라미딩을 하시는 식이시면 2번식 사용하시면 되며 적용하실때 피라미딩을 다른진입신호만 허용으로 설정하고 적용하시면 됩니다. 1번 var : 상한가(0), UpLimit(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); var : cnt(0),count(0); if date >= 19981207 then { if date < 20050328 && CodeCategory() == 2 then UpLimit = (BP[0] * 1.12); Else if date >= 20050328 and date < 20150615 Then UpLimit = (BP[0] * 1.15); Else UpLimit = (BP[0] * 1.30); 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; } } count = 0; for cnt = 0 to 10 { if sdate == EntryDate(cnt) Then count = count+1; } if MaxEntries < 2 and stime < 144500 then{ if MarketPosition == 0 and count == 0 Then{ if NextBarOpen < DayClose(1) Then buy("b11",AtStop,DayClose(1)); Else buy("b12",AtLimit,DayClose(1)); if NextBarOpen < DayOpen(1) Then buy("b21",AtStop,DayOpen(1)); Else buy("b22",AtLimit,DayOpen(1)); } } if MarketPosition == 1 Then{ exitlong("BL",AtStop,DayLow(1)); if highest(H,BarsSinceEntry) >= EntryPrice*1.05 and highest(H,BarsSinceEntry) < EntryPrice*1.10 Then exitlong("BP1",AtStop,EntryPrice*1.05); if highest(H,BarsSinceEntry) >= EntryPrice*1.10 and highest(H,BarsSinceEntry) < EntryPrice*1.15 Then exitlong("BP2",AtStop,EntryPrice*1.10); if highest(H,BarsSinceEntry) >= EntryPrice*1.15 and highest(H,BarsSinceEntry) < EntryPrice*1.20 Then exitlong("BP3",AtStop,EntryPrice*1.15); if highest(H,BarsSinceEntry) >= EntryPrice*1.20 and highest(H,BarsSinceEntry) < EntryPrice*1.25 Then exitlong("BP4",AtStop,EntryPrice*1.20); if highest(H,BarsSinceEntry) >= EntryPrice*1.25 and highest(H,BarsSinceEntry) < EntryPrice*1.30 Then exitlong("BP5",AtStop,EntryPrice*1.25); ExitLong("BP",atlimit,상한가); } SetStopEndofday(144500); 2번 var : 상한가(0), UpLimit(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); var : cnt(0),count(0); if date >= 19981207 then { if date < 20050328 && CodeCategory() == 2 then UpLimit = (BP[0] * 1.12); Else if date >= 20050328 and date < 20150615 Then UpLimit = (BP[0] * 1.15); Else UpLimit = (BP[0] * 1.30); 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; } } count = 0; for cnt = 0 to 10 { if sdate == EntryDate(cnt) Then count = count+1; } if MaxEntries < 2 and stime < 144500 then{ if (MarketPosition == 0 and count == 0) or (MarketPosition == 1 and count == 1) Then{ if NextBarOpen < DayClose(1) Then buy("b11",AtStop,DayClose(1)); Else buy("b12",AtLimit,DayClose(1)); if NextBarOpen < DayOpen(1) Then buy("b21",AtStop,DayOpen(1)); Else buy("b22",AtLimit,DayOpen(1)); } } if MarketPosition == 1 Then{ exitlong("BL",AtStop,DayLow(1)); if highest(H,BarsSinceEntry) >= EntryPrice*1.05 and highest(H,BarsSinceEntry) < EntryPrice*1.10 Then exitlong("BP1",AtStop,EntryPrice*1.05); if highest(H,BarsSinceEntry) >= EntryPrice*1.10 and highest(H,BarsSinceEntry) < EntryPrice*1.15 Then exitlong("BP2",AtStop,EntryPrice*1.10); if highest(H,BarsSinceEntry) >= EntryPrice*1.15 and highest(H,BarsSinceEntry) < EntryPrice*1.20 Then exitlong("BP3",AtStop,EntryPrice*1.15); if highest(H,BarsSinceEntry) >= EntryPrice*1.20 and highest(H,BarsSinceEntry) < EntryPrice*1.25 Then exitlong("BP4",AtStop,EntryPrice*1.20); if highest(H,BarsSinceEntry) >= EntryPrice*1.25 and highest(H,BarsSinceEntry) < EntryPrice*1.30 Then exitlong("BP5",AtStop,EntryPrice*1.25); ExitLong("BP",atlimit,상한가); } SetStopEndofday(144500); 즐거운 하루되세요 > 승부사1 님이 쓴 글입니다. > 제목 : 시스템 수식 부탁드립니다. > 매수가 1 : 전일 종가 매수가 2 : 전일 시가 손절가 : 전일 저가 -1% 매도가 * 평단가대비 +5%를 돌파하면 홀딩후 5% 단위로 주가 체크 * +10%를 도달하지 못하고 하락하면 +5%에서 매도 * +15%를 도달하지 못하고 하락하면 +10%에서 매도 * +20%를 도달하지 못하고 하락하면 +15%에서 매도 * +25%를 도달하지 못하고 하락하면 +20%에서 매도 * +30%를 도달하지 못하고 하락하면 +25%에서 매도 * 상한가 매도 * 144500