커뮤니티

확인부탁할께요

프로필 이미지
회원
2013-01-11 09:19:34
201
글번호 58028
답변완료
2번식 input : 투입금액1(300000),투입금액2(150000); var : Vol1(0),Vol2(0); if CodeCategory == 1 Then{ if BasePrice < 50000 Then{ Vol1 = int(int(투입금액1/C)/10)*10; Vol2 = int(int(투입금액2/C)/10)*10; } Else{ Vol1 = int(투입금액1/C); Vol2 = int(투입금액2/C); } } if CodeCategory == 2 or CodeCategory == 8 Then{ Vol1= int(투입금액1/C); Vol2= int(투입금액2/C); } if date != date[1] Then Condition1 = false; if MarketPosition == 1 Then Condition1 = true; if MarketPosition == 0 and stime == 150000 Then buy("b1",AtStop,dayopen+PriceScale*1,vol1); if MarketPosition == 0 and Condition1 == false and stime < 150000 Then buy("b1.",AtStop,dayopen+PriceScale*1,vol1); if MarketPosition == 1 Then{ if CurrentEntries == 1 and crossup(var1,var2) Then buy("b2",OnClose,def,vol1); if CurrentEntries >= 2 and crossup(var1,var2) Then buy("b3",OnClose,def,vol2); if CurrentEntries == 1 Then exitlong("bx1",atlimit,EntryPrice*1.3); if CurrentEntries > 1 Then exitlong("bx2",atlimit,AvgEntryPrice*1.02); } 오늘 식을 적용했는데요 종목이 하나두 매수 안됐어요 식대입력 즉시 아침에 시가로 및 +1호가 매수 바로 되게 해주세요 그리고 나서 추가 매수 매도하면 수식은 종료. 수고하십시오~~~~
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-01-11 10:01:42

안녕하세요 예스스탁입니다. 일봉을 사용하시므로 식이 조금 변경되었습니다. 외부변수 중 전일날짜에 첫번째매수(시초가매수)할 날의 직전 거래일의 날짜를 입력해 주시면 됩니다. 가령 다음주 월요일에 첫번째 매수를 하실경우 오늘(금요일)의 날짜를 입력해 주시면 됩니다. 매매시작하시고 청산이 발생하면 이후 주문이 들어가지 않으므로 다음에 다시거실때는 전일날짜를 새로운 날짜로 변경해 주시면 됩니다. input : 투입금액1(300000),투입금액2(150000),전일날짜(20130110); var : Vol1(0),Vol2(0); if CodeCategory == 1 Then{ if BasePrice < 50000 Then{ Vol1 = int(int(투입금액1/C)/10)*10; Vol2 = int(int(투입금액2/C)/10)*10; } Else{ Vol1 = int(투입금액1/C); Vol2 = int(투입금액2/C); } } if CodeCategory == 2 or CodeCategory == 8 Then{ Vol1= int(투입금액1/C); Vol2= int(투입금액2/C); } #지정한 날자 다음날 시가에 매수 if MarketPosition == 0 and Condition1 == false and sdate == 전일날짜 Then buy("b1",AtMarket,def,vol1); var1 = ma(c,3); var2 = ma(c,5); if MarketPosition == 1 Then{ if CurrentEntries == 1 and crossup(var1,var2) Then buy("b2",OnClose,def,vol1); if CurrentEntries >= 2 and crossup(var1,var2) Then buy("b3",OnClose,def,vol2); if CurrentEntries == 1 Then exitlong("bx1",atlimit,EntryPrice*1.3); if CurrentEntries > 1 Then exitlong("bx2",atlimit,AvgEntryPrice*1.02); } if ExitDate(1) > 0 Then Condition1 = true; 즐거운 하루되세요 > HI_jht7469 님이 쓴 글입니다. > 제목 : 확인부탁할께요 > 2번식 input : 투입금액1(300000),투입금액2(150000); var : Vol1(0),Vol2(0); if CodeCategory == 1 Then{ if BasePrice < 50000 Then{ Vol1 = int(int(투입금액1/C)/10)*10; Vol2 = int(int(투입금액2/C)/10)*10; } Else{ Vol1 = int(투입금액1/C); Vol2 = int(투입금액2/C); } } if CodeCategory == 2 or CodeCategory == 8 Then{ Vol1= int(투입금액1/C); Vol2= int(투입금액2/C); } if date != date[1] Then Condition1 = false; if MarketPosition == 1 Then Condition1 = true; if MarketPosition == 0 and stime == 150000 Then buy("b1",AtStop,dayopen+PriceScale*1,vol1); if MarketPosition == 0 and Condition1 == false and stime < 150000 Then buy("b1.",AtStop,dayopen+PriceScale*1,vol1); if MarketPosition == 1 Then{ if CurrentEntries == 1 and crossup(var1,var2) Then buy("b2",OnClose,def,vol1); if CurrentEntries >= 2 and crossup(var1,var2) Then buy("b3",OnClose,def,vol2); if CurrentEntries == 1 Then exitlong("bx1",atlimit,EntryPrice*1.3); if CurrentEntries > 1 Then exitlong("bx2",atlimit,AvgEntryPrice*1.02); } 오늘 식을 적용했는데요 종목이 하나두 매수 안됐어요 식대입력 즉시 아침에 시가로 및 +1호가 매수 바로 되게 해주세요 그리고 나서 추가 매수 매도하면 수식은 종료. 수고하십시오~~~~