커뮤니티

문의합니다.

프로필 이미지
심리도박사
2014-09-10 14:35:51
147
글번호 78416
답변완료
input : Per(10),매수1(1000000),매수2(1000000),매수3(2000000),매수4(4000000); var : Vol1(0),vol2(0),vol3(0),vol4(0); var : X(0),xVol1(0),xvol2(0),xvol3(0); var1 = ma(c,1); var2 = ma(C,20); if CodeCategoryEx == 11 and BasePrice < 50000 Then{ vol1 = int(int((매수1)/C)/10)*10; vol2 = int(int((매수2)/C)/10)*10; vol3 = int(int((매수3)/C)/10)*10; vol4 = int(int((매수4)/C)/10)*10; } Else{ vol1 = int((매수1)/C); vol2 = int((매수2)/C); vol3 = int((매수3)/C); vol4 = int((매수4)/C); } if MarketPosition == 0 and C > O and var1 <= var2*0.8 Then buy("b1",OnClose,def,vol1); if MarketPosition == 1 Then{ if MaxEntries == 1 Then buy("b2",atlimit,AvgEntryPrice*(1-Per/100),vol2); if MaxEntries == 1 Then buy("b3",atlimit,AvgEntryPrice*(1-Per/100),vol3); if MaxEntries == 1 Then buy("b4",atlimit,AvgEntryPrice*(1-Per/100),vol4); } if MarketPosition == 1 Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then{ xvol1 = int(int(MaxContracts*0.5)/10)*10; xvol2 = int(int(MaxContracts*0.5)/10)*10; xvol3 = int(int(MaxContracts*0.5)/10)*10; } Else{ xvol1 = int(MaxContracts*0.5); xvol2 = int(MaxContracts*0.5); xvol3 = int(MaxContracts*0.5); } if CurrentContracts < CurrentContracts[1] Then x = x+1; if X == 0 Then ExitLong("bx1",AtStop,AvgEntryPrice*1.03,"",Xvol1,1); if X == 1 Then ExitLong("bx2",AtStop,AvgEntryPrice*1.05,"",Xvol2,1); if X == 2 Then ExitLong("bx3",AtStop,AvgEntryPrice*1.10,"",Xvol3,1); if MaxEntries == 4 Then ExitLong("bx",AtStop,AvgEntryPrice*0.9); } Else X = 0; 위식에서 1차매수를 if MarketPosition == 0 and C > O and var1 <= var2*0.8 Then buy("b1",OnClose,def,vol1); 에서 시장가 매수로 변경부탁드립니다. 1분봉에서 적용할것입니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-09-11 15:54:13

안녕하세요 예스스탁입니다. 시스템 수식안에서는 주문가격을 지정하는 부분이 없습니다. 시스템은 조건만족시 신호만 발생합니다. 실제주문가격은 시스템 트레이딩 설정창의 매매탭에서 진입/청산주문가격으로 지정가능하고 특정신호명만 주문가격을 따로 지정은 가능하지 않습니다. 즐거운 하루되세요 > 심리도박사 님이 쓴 글입니다. > 제목 : 문의합니다. > input : Per(10),매수1(1000000),매수2(1000000),매수3(2000000),매수4(4000000); var : Vol1(0),vol2(0),vol3(0),vol4(0); var : X(0),xVol1(0),xvol2(0),xvol3(0); var1 = ma(c,1); var2 = ma(C,20); if CodeCategoryEx == 11 and BasePrice < 50000 Then{ vol1 = int(int((매수1)/C)/10)*10; vol2 = int(int((매수2)/C)/10)*10; vol3 = int(int((매수3)/C)/10)*10; vol4 = int(int((매수4)/C)/10)*10; } Else{ vol1 = int((매수1)/C); vol2 = int((매수2)/C); vol3 = int((매수3)/C); vol4 = int((매수4)/C); } if MarketPosition == 0 and C > O and var1 <= var2*0.8 Then buy("b1",OnClose,def,vol1); if MarketPosition == 1 Then{ if MaxEntries == 1 Then buy("b2",atlimit,AvgEntryPrice*(1-Per/100),vol2); if MaxEntries == 1 Then buy("b3",atlimit,AvgEntryPrice*(1-Per/100),vol3); if MaxEntries == 1 Then buy("b4",atlimit,AvgEntryPrice*(1-Per/100),vol4); } if MarketPosition == 1 Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then{ xvol1 = int(int(MaxContracts*0.5)/10)*10; xvol2 = int(int(MaxContracts*0.5)/10)*10; xvol3 = int(int(MaxContracts*0.5)/10)*10; } Else{ xvol1 = int(MaxContracts*0.5); xvol2 = int(MaxContracts*0.5); xvol3 = int(MaxContracts*0.5); } if CurrentContracts < CurrentContracts[1] Then x = x+1; if X == 0 Then ExitLong("bx1",AtStop,AvgEntryPrice*1.03,"",Xvol1,1); if X == 1 Then ExitLong("bx2",AtStop,AvgEntryPrice*1.05,"",Xvol2,1); if X == 2 Then ExitLong("bx3",AtStop,AvgEntryPrice*1.10,"",Xvol3,1); if MaxEntries == 4 Then ExitLong("bx",AtStop,AvgEntryPrice*0.9); } Else X = 0; 위식에서 1차매수를 if MarketPosition == 0 and C > O and var1 <= var2*0.8 Then buy("b1",OnClose,def,vol1); 에서 시장가 매수로 변경부탁드립니다. 1분봉에서 적용할것입니다.