커뮤니티

매수식 수정 부탁합니다

프로필 이미지
미래테크
2013-10-25 07:12:47
150
글번호 68826
답변완료
아래 시스템을 CS엘솔라 종목에 1분봉 적용한 결과 다음과 같이 나왔습니다 피라미딩은 다른진입 신호만 허용 매수결과는 10/21 b1 매수가 9970 200주 b2 매수가 9950 200주 b41 매수가 9940 1주 b51 매수가 9930 1주 요청사항 1 : 매수가 이후 5회 이내 매수가 한호가 아래로 동일 비중 (20%)씩 매수식 부탁합니다 즉 9970/9960/9950/9940/9930 호가에 같은 비중으로 예를 들어 그 비중이 200주 이면 위 호가에 200주씩 매수되도록 부탁합니다 요청사항 2 매수가 이후 5회 이내 매수가 대비 0.5% 하락시 동일 비중 (20%)씩 매수식 부탁합니다 즉 9970원이면 0.5% 하락시 20% 비중 매수, 또 추가로 0.5% 하락하면 20% 비중 매수 이런식으로 5회 이내 매수식 부탁합니다 아래는 제가 적용한 식입니다 input : 투자금액(10000000),N(1),진입당비중(20); var : Vol(0),xvol1(0),xvol2(0),count(0); Count = 0 ; for Value1 = 0 to 10 { if EntryDate( Value1 ) == sdate then Count = Count + 1; } if CodeCategoryEx == 11 and BasePrice < 50000 Then vol = int(int((투자금액*0.2)/C)/10)*10; Else vol = int((투자금액*0.2)/C); var5 = 10013; var6 = var5*0.993; if MarketPosition == 0 and sdate >= 20131021 and stime >= 90000 and crossup(L,var6) Then{ buy("b1",OnClose,def,Vol); buy("b2",AtLimit,c-PriceScale*2,Vol); buy("b3",AtLimit,c-PriceScale*3,Vol); buy("b4",AtLimit,c-PriceScale*4,Vol); buy("b5",AtLimit,c-PriceScale*5,Vol); } if MarketPosition == 1 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*1 Then buy("b21",atlimit,EntryPrice-PriceScale*1); if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*2 Then buy("b31",atlimit,EntryPrice-PriceScale*2); if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*3 Then buy("b41",atlimit,EntryPrice-PriceScale*3); if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*4 Then buy("b51",atlimit,EntryPrice-PriceScale*4); } if MarketPosition == 1 Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then{ xvol1 = int(int(MaxContracts*0.4)/10)*10; xvol2 = int(int(MaxContracts*0.3)/10)*10; } Else{ xvol1 = int(MaxContracts*0.4); xvol2 = int(MaxContracts*0.3); } if CurrentContracts == MaxContracts Then ExitLong("bx1",atlimit,AvgEntryPrice*1.045,"",xvol1,1); if CurrentContracts < MaxContracts Then{ if countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) == 1 Then ExitLong("bx2",atlimit,AvgEntryPrice*1.065,"",xvol2,1); if countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) == 2 Then ExitLong("bx3",atlimit,AvgEntryPrice*1.085); } ExitLong("losscut",AtStop,AvgEntryPrice*0.97); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-10-25 15:21:58

안녕하세요 예스스탁입니다. 1. input : 투자금액(10000000),N(1),진입당비중(20); var : Vol(0),xvol1(0),xvol2(0),count(0); Count = 0 ; for Value1 = 0 to 10 { if EntryDate( Value1 ) == sdate then Count = Count + 1; } if CodeCategoryEx == 11 and BasePrice < 50000 Then vol = int(int((투자금액*0.2)/C)/10)*10; Else vol = int((투자금액*0.2)/C); var5 = 10013; var6 = var5*0.993; if MarketPosition == 0 and sdate >= 20131021 and stime >= 90000 and crossup(L,var6) Then{ buy("b1",OnClose,def,Vol); buy("b2",AtLimit,c-PriceScale*1,Vol); buy("b3",AtLimit,c-PriceScale*2,Vol); buy("b4",AtLimit,c-PriceScale*3,Vol); buy("b5",AtLimit,c-PriceScale*4,Vol); } if MarketPosition == 1 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*1 Then buy("b21",atlimit,EntryPrice-PriceScale*1,Vol); if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*2 Then buy("b31",atlimit,EntryPrice-PriceScale*2,Vol); if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*3 Then buy("b41",atlimit,EntryPrice-PriceScale*3,Vol); if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*4 Then buy("b51",atlimit,EntryPrice-PriceScale*4,Vol); } if MarketPosition == 1 Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then{ xvol1 = int(int(MaxContracts*0.4)/10)*10; xvol2 = int(int(MaxContracts*0.3)/10)*10; } Else{ xvol1 = int(MaxContracts*0.4); xvol2 = int(MaxContracts*0.3); } if CurrentContracts == MaxContracts Then ExitLong("bx1",atlimit,AvgEntryPrice*1.045,"",xvol1,1); if CurrentContracts < MaxContracts Then{ if countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) == 1 Then ExitLong("bx2",atlimit,AvgEntryPrice*1.065,"",xvol2,1); if countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) == 2 Then ExitLong("bx3",atlimit,AvgEntryPrice*1.085); } ExitLong("losscut",AtStop,AvgEntryPrice*0.97); } 2. input : 투자금액(10000000),N(1),진입당비중(20); var : Vol(0),xvol1(0),xvol2(0),count(0); Count = 0 ; for Value1 = 0 to 10 { if EntryDate( Value1 ) == sdate then Count = Count + 1; } if CodeCategoryEx == 11 and BasePrice < 50000 Then vol = int(int((투자금액*0.2)/C)/10)*10; Else vol = int((투자금액*0.2)/C); var5 = 10013; var6 = var5*0.993; if MarketPosition == 0 and sdate >= 20131021 and stime >= 90000 and crossup(L,var6) Then{ buy("b1",OnClose,def,Vol); buy("b2",AtLimit,c*0.995,Vol); buy("b3",AtLimit,c*0.990,Vol); buy("b4",AtLimit,c*0.985,Vol); buy("b5",AtLimit,c*0.980,Vol); } if MarketPosition == 1 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice*0.995 Then buy("b21",atlimit,EntryPrice*0.995,Vol); if Lowest(L,BarsSinceEntry) > EntryPrice*0.990 Then buy("b31",atlimit,EntryPrice*0.990,Vol); if Lowest(L,BarsSinceEntry) > EntryPrice*0.985 Then buy("b41",atlimit,EntryPrice*0.985,Vol); if Lowest(L,BarsSinceEntry) > EntryPrice*0.980 Then buy("b51",atlimit,EntryPrice*0.980,Vol); } if MarketPosition == 1 Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then{ xvol1 = int(int(MaxContracts*0.4)/10)*10; xvol2 = int(int(MaxContracts*0.3)/10)*10; } Else{ xvol1 = int(MaxContracts*0.4); xvol2 = int(MaxContracts*0.3); } if CurrentContracts == MaxContracts Then ExitLong("bx1",atlimit,AvgEntryPrice*1.045,"",xvol1,1); if CurrentContracts < MaxContracts Then{ if countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) == 1 Then ExitLong("bx2",atlimit,AvgEntryPrice*1.065,"",xvol2,1); if countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) == 2 Then ExitLong("bx3",atlimit,AvgEntryPrice*1.085); } ExitLong("losscut",AtStop,AvgEntryPrice*0.97); } 즐거운 하루되세요 > 미래테크 님이 쓴 글입니다. > 제목 : 매수식 수정 부탁합니다 > 아래 시스템을 CS엘솔라 종목에 1분봉 적용한 결과 다음과 같이 나왔습니다 피라미딩은 다른진입 신호만 허용 매수결과는 10/21 b1 매수가 9970 200주 b2 매수가 9950 200주 b41 매수가 9940 1주 b51 매수가 9930 1주 요청사항 1 : 매수가 이후 5회 이내 매수가 한호가 아래로 동일 비중 (20%)씩 매수식 부탁합니다 즉 9970/9960/9950/9940/9930 호가에 같은 비중으로 예를 들어 그 비중이 200주 이면 위 호가에 200주씩 매수되도록 부탁합니다 요청사항 2 매수가 이후 5회 이내 매수가 대비 0.5% 하락시 동일 비중 (20%)씩 매수식 부탁합니다 즉 9970원이면 0.5% 하락시 20% 비중 매수, 또 추가로 0.5% 하락하면 20% 비중 매수 이런식으로 5회 이내 매수식 부탁합니다 아래는 제가 적용한 식입니다 input : 투자금액(10000000),N(1),진입당비중(20); var : Vol(0),xvol1(0),xvol2(0),count(0); Count = 0 ; for Value1 = 0 to 10 { if EntryDate( Value1 ) == sdate then Count = Count + 1; } if CodeCategoryEx == 11 and BasePrice < 50000 Then vol = int(int((투자금액*0.2)/C)/10)*10; Else vol = int((투자금액*0.2)/C); var5 = 10013; var6 = var5*0.993; if MarketPosition == 0 and sdate >= 20131021 and stime >= 90000 and crossup(L,var6) Then{ buy("b1",OnClose,def,Vol); buy("b2",AtLimit,c-PriceScale*2,Vol); buy("b3",AtLimit,c-PriceScale*3,Vol); buy("b4",AtLimit,c-PriceScale*4,Vol); buy("b5",AtLimit,c-PriceScale*5,Vol); } if MarketPosition == 1 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*1 Then buy("b21",atlimit,EntryPrice-PriceScale*1); if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*2 Then buy("b31",atlimit,EntryPrice-PriceScale*2); if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*3 Then buy("b41",atlimit,EntryPrice-PriceScale*3); if Lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*4 Then buy("b51",atlimit,EntryPrice-PriceScale*4); } if MarketPosition == 1 Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then{ xvol1 = int(int(MaxContracts*0.4)/10)*10; xvol2 = int(int(MaxContracts*0.3)/10)*10; } Else{ xvol1 = int(MaxContracts*0.4); xvol2 = int(MaxContracts*0.3); } if CurrentContracts == MaxContracts Then ExitLong("bx1",atlimit,AvgEntryPrice*1.045,"",xvol1,1); if CurrentContracts < MaxContracts Then{ if countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) == 1 Then ExitLong("bx2",atlimit,AvgEntryPrice*1.065,"",xvol2,1); if countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) == 2 Then ExitLong("bx3",atlimit,AvgEntryPrice*1.085); } ExitLong("losscut",AtStop,AvgEntryPrice*0.97); }