커뮤니티

수식 수정 부탁합니다

프로필 이미지
회원
2013-03-18 10:26:47
210
글번호 60837
답변완료
1.아래의 식에서 9시에 매도 나올경우 하루동안 매수 금지 되고 다음에 날다시 매수가능하도록 만들어주세요 매수후 매도는 하루에 가능하나 매도후 매수는 하루에하루수없도록해주세요 2.하루에 3프로이상 올랐을때는 매수 금지하도록 해주세요 input : 투입금액(300000),P1(90); var : count(0),cnt(0),cnt1(0),sumV(0), maV(0); sumV = 0; for cnt1 = 0 to P1-1 { sumV = sumV+DayClose(cnt1); } maV = sumV / P1; if CodeCategory == 1 Then{ #코스피 if BasePrice < 50000 Then Var1 = int(int(투입금액/C)/10)*10; Else Var1 = int(투입금액/C); } if CodeCategory == 2 Then#코스닥 Var1 = int(투입금액/C); if CodeCategory == 6 Then#옵션 Var1 = int(투입금액/(C*BigPointValue)); value1 = Upvol/DownVol*50; count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } If MarketPosition == 0 and V > 20000 and Upvol/DownVol*100 >=150 and count < 1 and C > mav and C < dayopen*1.03 and Stime >= 100000 Then buy("매수",onclose,def,var1); if MarketPosition == 1 Then{ if CodeCategory == 1 and BasePrice < 50000 Then Var2 = int(int(MaxContracts*0.5)/10)*10; Else Var2 = int(MaxContracts*0.5); if CurrentContracts == MaxContracts Then{ ExitLong("매도",AtLimit,AvgEntryPrice*1.03,"",var2,1); } if CurrentContracts < MaxContracts Then{ ExitLong("매도1",AtStop,highest(H,BarsSinceEntry)*0.98); ExitLong("매도2",AtStop,var3); } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-03-18 14:53:21

안녕하세요 예스스탁입니다. input : 투입금액(300000),P1(90); var : count(0),cnt(0),cnt1(0),sumV(0), maV(0); sumV = 0; for cnt1 = 0 to P1-1 { sumV = sumV+DayClose(cnt1); } maV = sumV / P1; if CodeCategory == 1 Then{ #코스피 if BasePrice < 50000 Then Var1 = int(int(투입금액/C)/10)*10; Else Var1 = int(투입금액/C); } if CodeCategory == 2 Then#코스닥 Var1 = int(투입금액/C); if CodeCategory == 6 Then#옵션 Var1 = int(투입금액/(C*BigPointValue)); value1 = Upvol/DownVol*50; count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } If MarketPosition == 0 and ExitDate(1) != sdate and c < DayClose(1)*1.03 and V > 20000 and Upvol/DownVol*100 >=150 and count < 1 and C > mav and C < dayopen*1.03 and Stime >= 100000 Then buy("매수",onclose,def,var1); if MarketPosition == 1 Then{ if CodeCategory == 1 and BasePrice < 50000 Then Var2 = int(int(MaxContracts*0.5)/10)*10; Else Var2 = int(MaxContracts*0.5); if CurrentContracts == MaxContracts Then{ ExitLong("매도",AtLimit,AvgEntryPrice*1.03,"",var2,1); } if CurrentContracts < MaxContracts Then{ ExitLong("매도1",AtStop,highest(H,BarsSinceEntry)*0.98); ExitLong("매도2",AtStop,var3); } } 즐거운 하루되세요 > HI_jht7469 님이 쓴 글입니다. > 제목 : 수식 수정 부탁합니다 > 1.아래의 식에서 9시에 매도 나올경우 하루동안 매수 금지 되고 다음에 날다시 매수가능하도록 만들어주세요 매수후 매도는 하루에 가능하나 매도후 매수는 하루에하루수없도록해주세요 2.하루에 3프로이상 올랐을때는 매수 금지하도록 해주세요 input : 투입금액(300000),P1(90); var : count(0),cnt(0),cnt1(0),sumV(0), maV(0); sumV = 0; for cnt1 = 0 to P1-1 { sumV = sumV+DayClose(cnt1); } maV = sumV / P1; if CodeCategory == 1 Then{ #코스피 if BasePrice < 50000 Then Var1 = int(int(투입금액/C)/10)*10; Else Var1 = int(투입금액/C); } if CodeCategory == 2 Then#코스닥 Var1 = int(투입금액/C); if CodeCategory == 6 Then#옵션 Var1 = int(투입금액/(C*BigPointValue)); value1 = Upvol/DownVol*50; count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } If MarketPosition == 0 and V > 20000 and Upvol/DownVol*100 >=150 and count < 1 and C > mav and C < dayopen*1.03 and Stime >= 100000 Then buy("매수",onclose,def,var1); if MarketPosition == 1 Then{ if CodeCategory == 1 and BasePrice < 50000 Then Var2 = int(int(MaxContracts*0.5)/10)*10; Else Var2 = int(MaxContracts*0.5); if CurrentContracts == MaxContracts Then{ ExitLong("매도",AtLimit,AvgEntryPrice*1.03,"",var2,1); } if CurrentContracts < MaxContracts Then{ ExitLong("매도1",AtStop,highest(H,BarsSinceEntry)*0.98); ExitLong("매도2",AtStop,var3); } }