커뮤니티

수식 문의 드립니다.

프로필 이미지
부자청년28
2021-02-25 07:48:11
840
글번호 146625
답변완료
안녕하세요? 1분봉에서 매매 예정입니다. 일봉상 전일 상한가 매수는 오늘 현재가가 전일종가 대비 -3% 일때 매수가 일어나는 시간은 오전 10시부터 오후1시 사이 매도는 매수시점부터 10분후 현재남은 물량의 30% 매도 15분후 현재남은 물량의 50% 매도 20분후 남은 물량 전부 매도 매수후 5% 상승시 현재물량의 50% 매도 매수후 10% 상승시 남은 전체 매도 매수후 5% 상승했다가 2% 까지 떨어지면 전체매도 손절은! 매수후 -10% 남은 물량의 50% 매도 매수후 -15% 전체 손절 청산은! 당일 15시10분 전부 매도 이상입니다. 감사합니다~
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-02-25 16:34:24

안녕하세요 예스스탁입니다. input : 금액(10000000),Per1(-3); input : 익절1(5),익절2(10),손절(-15),수익률(5),감소율(-2); input : 분1(10),분2(15),분3(20); var : 상한가(0), UpLimit(0),TM(0),BT(0),BE(0),BH(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(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; } } if Bdate != Bdate[1] Then { Condition1 = False; if DayHigh(1) >= 상한가[1] Then Condition1 = true; } TM = TimeToMinutes(sTime); if Condition1 == true and sTime >= 100000 and sTime < 130000 Then { if ExitDate(1) != sDate and MarketPosition == 0 Then { Buy("b1",AtLimit,DayClose(1)*(1+Per1/100),Floor((금액*0.3)/min(DayClose(1)*0.98,NextBarOpen))); } } if MarketPosition == 1 Then { BH = Highest(H,BarsSinceEntry); ExitLong("bl",AtStop,EntryPrice*(1+손절/100)); ExitLong("bp1",AtLimit,EntryPrice*(1+익절1/100),"",Floor(CurrentContracts*0.5),1); ExitLong("bp2",AtLimit,EntryPrice*(1+익절2/100)); if TM >= TimeToMinutes(EntryTime)+분1 and TM[1] < TimeToMinutes(EntryTime)+분1 Then ExitLong("bt1",OnClose,DEF,"",Floor(CurrentContracts*0.3),1); if TM >= TimeToMinutes(EntryTime)+분2 and TM[1] < TimeToMinutes(EntryTime)+분2 Then ExitLong("bt2",OnClose,DEF,"",Floor(CurrentContracts*0.5),1); if TM >= TimeToMinutes(EntryTime)+분3 and TM[1] < TimeToMinutes(EntryTime)+분3 Then ExitLong("bt3"); if BH >= EntryPrice+(1+수익률) Then ExitLong("btr",AtStop,BH*(1+감소율/100)); } SetStopEndofday(151000); 즐거운 하루되세요 > 부자청년28 님이 쓴 글입니다. > 제목 : 수식 문의 드립니다. > 안녕하세요? 1분봉에서 매매 예정입니다. 일봉상 전일 상한가 매수는 오늘 현재가가 전일종가 대비 -3% 일때 매수가 일어나는 시간은 오전 10시부터 오후1시 사이 매도는 매수시점부터 10분후 현재남은 물량의 30% 매도 15분후 현재남은 물량의 50% 매도 20분후 남은 물량 전부 매도 매수후 5% 상승시 현재물량의 50% 매도 매수후 10% 상승시 남은 전체 매도 매수후 5% 상승했다가 2% 까지 떨어지면 전체매도 손절은! 매수후 -10% 남은 물량의 50% 매도 매수후 -15% 전체 손절 청산은! 당일 15시10분 전부 매도 이상입니다. 감사합니다~