커뮤니티

재문의 드립니다.

프로필 이미지
사과쥬스
2012-08-07 17:16:55
274
글번호 53590
답변완료
매수 매도 시간 09:00~2:20 매수 15분봉 기준 1차매수 - 현재가 볼린저밴드(20.2) 하단선이하 -0.8% 현재가가 위치시 매수 : 매수금액 1000000원 2차매수 - 1차매수 시점에서 2% 하락시 매수 : 매수금액 1000000원 3차매수 - 2차매수 시점에서 2% 하락시 매수 : 매수금액 2000000원 수익 실현 조건 1차 매수시 0.5%, 1.1%, 2.0% 분할 매도(or 남은 물량 15분봉 상 20일선 닿을 시 전량매도) - 2차 매수시 0%, 0.5%, 1.1% 분할 매도(or 남은 물량 15분봉 상 20일선 닿을 시 전량매도)- 3차 매수시 0%, 0.5% 분할 매도(or 남은 물량 15분봉 상 20일선 닿을 시 전량매도)- 손절 3차 매수 후 2% 추가 하락시 전량 매도 3차 매수 후 2% 추가 하락시 전량 매도 된 종목은 그날 매매 하지 않는도록 구성. 주문 수량 오류가 나옵니다. 현물 거래로 코스피 거래소 코스닥으로 합니다. 잘부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-08-07 19:45:08

안녕하세요 예스스탁입니다. 분할청산식 작성시에 진입수량을 몇%로 분할할 것인지 지정해 주셔야 합니다. 아래식에서는 3차로 분할할때는 1/3씩, 2차로 분할할때는 1/2로 지정했습니다. input : 금액1(1000000),금액2(1000000),금액3(2000000); if CodeCategory == 1 Then { if BasePrice < 50000 Then { Var1 = int(int(금액1/C)/10)*10; Var2 = int(int(금액1/C)/10)*10; Var3 = int(int(금액1/C)/10)*10; } Else{ Var1 = int(금액1/C); Var2 = int(금액2/C); Var3 = int(금액3/C); } } if CodeCategory == 2 Then { Var1 = int(금액1/C); Var2 = int(금액2/C); Var3 = int(금액3/C); } if CodeCategory == 6 Then { Var1 = int(금액1/(C*BigPointValue)); Var2 = int(금액2/(C*BigPointValue)); Var3 = int(금액3/(C*BigPointValue)); } Condition1 = ExitDate(1) == sdate and IsExitName("bxx",1); value1 = BollBandDown(20,2); value2 = ma(c,20); value3 = BollBandUp(20,2); if MarketPosition == 0 and Condition1 == false Then buy("b",Atlimit,value1*0.92,var1); if MarketPosition == 1 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then{ buy("b2",atlimit,EntryPrice*0.98,var2); buy("b3",atlimit,EntryPrice*0.96,var3); } if MarketPosition == 1 Then{ if CrossDown(c,ma(c,20)) Then exitlong(); if CurrentEntries == 3 Then ExitLong("bxx",AtStop,EntryPrice*0.94); if CurrentContracts == MaxContracts and CurrentEntries > CurrentEntries[1] Then{ if CodeCategory == 1 and BasePrice < 50000 Then{ Var11 = int(int(CurrentContracts*(1/3))/10)*10; Var12 = int(int(CurrentContracts*(1/2))/10)*10; } Else{ Var11 = int(CurrentContracts*(1/3)); Var12 = int(CurrentContracts*(1/2)); } } if CurrentEntries == 1 Then { if CurrentContracts == MaxContracts Then ExitLong("bx11",atlimit,EntryPrice*1.005,"",var11,1); if CurrentContracts < MaxContracts Then ExitLong("bx12",atlimit,EntryPrice*1.011,"",var11,1); if CurrentContracts < MaxContracts Then ExitLong("bx13",atlimit,EntryPrice*1.020); } if CurrentEntries == 2 Then { if CurrentContracts == MaxContracts and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then ExitLong("bx21",atlimit,EntryPrice,"",var11,1); if CurrentContracts < MaxContracts and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) == 1 Then ExitLong("bx22",atlimit,EntryPrice*1.005,"",var11,1); if CurrentContracts < MaxContracts and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) == 2 Then ExitLong("bx23",atlimit,EntryPrice*1.011); } if CurrentEntries == 3 Then { if CurrentContracts == MaxContracts Then ExitLong("bx31",atlimit,EntryPrice,"",var12,1); if CurrentContracts < MaxContracts Then ExitLong("bx32",atlimit,EntryPrice*0.005); } } 즐거운 하루되세요 > 사과쥬스 님이 쓴 글입니다. > 제목 : 재문의 드립니다. > 매수 매도 시간 09:00~2:20 매수 15분봉 기준 1차매수 - 현재가 볼린저밴드(20.2) 하단선이하 -0.8% 현재가가 위치시 매수 : 매수금액 1000000원 2차매수 - 1차매수 시점에서 2% 하락시 매수 : 매수금액 1000000원 3차매수 - 2차매수 시점에서 2% 하락시 매수 : 매수금액 2000000원 수익 실현 조건 1차 매수시 0.5%, 1.1%, 2.0% 분할 매도(or 남은 물량 15분봉 상 20일선 닿을 시 전량매도) - 2차 매수시 0%, 0.5%, 1.1% 분할 매도(or 남은 물량 15분봉 상 20일선 닿을 시 전량매도)- 3차 매수시 0%, 0.5% 분할 매도(or 남은 물량 15분봉 상 20일선 닿을 시 전량매도)- 손절 3차 매수 후 2% 추가 하락시 전량 매도 3차 매수 후 2% 추가 하락시 전량 매도 된 종목은 그날 매매 하지 않는도록 구성. 주문 수량 오류가 나옵니다. 현물 거래로 코스피 거래소 코스닥으로 합니다. 잘부탁드립니다.