커뮤니티

이것도 수정부탁드립니다

프로필 이미지
초보트레이더11
2019-03-23 21:36:35
371
글번호 127338
답변완료
정말 감사합니다 한가지만 더 추가부탁드릴께요 시간을 설정이 안되어있는데 아침 9시부터 새벽 2시까지 설정 추가 부탁드릴께요 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 시스템문의합니다 > 안녕하세요 예스스탁입니다. if MarketPosition >= 0 and H < dayopen+PriceScale*20 Then sell("s",AtLimit,dayopen+PriceScale*20,2); if MarketPosition == -1 Then { if CurrentContracts > CurrentContracts[1] Then { Condition1 = false; Condition2 = false; } if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx2" Then Condition2 = true; if Condition1 == false Then ExitShort("sx1",atlimit,AvgEntryPrice-PriceScale*10,"",Floor(CurrentContracts*0.5),1); if Condition2 == false Then ExitShort("sx2",atlimit,AvgEntryPrice-PriceScale*20); sell("ss",AtLimit,LatestEntryPrice(0)+PriceScale*30,CurrentContracts*2); } if MarketPosition <= 0 and L > dayopen-PriceScale*20 Then Buy("b",AtLimit,dayopen-PriceScale*20,2); if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] Then { Condition1 = false; Condition2 = false; } if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx2" Then Condition2 = true; if Condition1 == false Then ExitLong("bx1",atlimit,AvgEntryPrice-PriceScale*10,"",Floor(CurrentContracts*0.5),1); if Condition2 == false Then ExitLong("bx2",atlimit,AvgEntryPrice-PriceScale*20); Buy("bb",AtLimit,LatestEntryPrice(0)-PriceScale*30,CurrentContracts*2); } 즐거운 하루되세요 > 초보트레이더11 님이 쓴 글입니다. > 제목 : 시스템문의합니다 > 당일 시가대비 20틱위에서 매도2계약들어가서 진입가 대비 10틱 20틱에서 1계약씩청산하고 청산이 안됐을시 50틱에서 추가로 가지고 있는 수량대비 2배로 추가매도하고 평단가 대비 10틱 20틱에서 반 반 청산하고 또 청산이 안됐을 경우 80틱에서 추가로 가지고있는 수량대비 2배로 추가매도해서 평단가 대비 10틱 20틱에서 반 반씩청산 하는시스템식을 만들고 싶습니다 그렇게 각 30틱마다 진입이 되겠끔해서 500틱까지 반복이 되겠끔 하고 싶습니다 매수도 마찬가지로요 만약 20틱에서 진입해서 다 청산이 되면 다시 20틱에 오면 매도가 되겠끔 50틱에서 추가로 들어가서 청산이 되면 다시 50틱에서도 진입이 &#46124;으면 좋겠습니다 단 진입이 되어있으면 추가 진입은 금지이고 각 진입이된 다음 30틱에서 진입이 되겠끔 부탁드립니다 만약 1계약이 청산된 상태라면 1계약은 추가로 진입가능하고요
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-03-25 13:51:50

안녕하세요 예스스탁입니다. input : starttime(90000),endtime(20000); var : Tcond(false); if bdate != bdate[1] then SetStopEndofday(endtime); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { SetStopEndofday(0); Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; } if Tcond == true then { if MarketPosition >= 0 and H < dayopen+PriceScale*20 Then sell("s",AtLimit,dayopen+PriceScale*20,2); if MarketPosition == -1 Then { if CurrentContracts > CurrentContracts[1] Then { Condition1 = false; Condition2 = false; } if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx2" Then Condition2 = true; if Condition1 == false Then ExitShort("sx1",atlimit,AvgEntryPrice-PriceScale*10,"",Floor(CurrentContracts*0.5),1); if Condition2 == false Then ExitShort("sx2",atlimit,AvgEntryPrice-PriceScale*20); sell("ss",AtLimit,LatestEntryPrice(0)+PriceScale*30,CurrentContracts*2); } if MarketPosition <= 0 and L > dayopen-PriceScale*20 Then Buy("b",AtLimit,dayopen-PriceScale*20,2); if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] Then { Condition1 = false; Condition2 = false; } if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx2" Then Condition2 = true; if Condition1 == false Then ExitLong("bx1",atlimit,AvgEntryPrice-PriceScale*10,"",Floor(CurrentContracts*0.5),1); if Condition2 == false Then ExitLong("bx2",atlimit,AvgEntryPrice-PriceScale*20); Buy("bb",AtLimit,LatestEntryPrice(0)-PriceScale*30,CurrentContracts*2); } } 즐거운 하루되세요 > 초보트레이더11 님이 쓴 글입니다. > 제목 : 이것도 수정부탁드립니다 > 정말 감사합니다 한가지만 더 추가부탁드릴께요 시간을 설정이 안되어있는데 아침 9시부터 새벽 2시까지 설정 추가 부탁드릴께요 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 시스템문의합니다 > 안녕하세요 예스스탁입니다. if MarketPosition >= 0 and H < dayopen+PriceScale*20 Then sell("s",AtLimit,dayopen+PriceScale*20,2); if MarketPosition == -1 Then { if CurrentContracts > CurrentContracts[1] Then { Condition1 = false; Condition2 = false; } if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx2" Then Condition2 = true; if Condition1 == false Then ExitShort("sx1",atlimit,AvgEntryPrice-PriceScale*10,"",Floor(CurrentContracts*0.5),1); if Condition2 == false Then ExitShort("sx2",atlimit,AvgEntryPrice-PriceScale*20); sell("ss",AtLimit,LatestEntryPrice(0)+PriceScale*30,CurrentContracts*2); } if MarketPosition <= 0 and L > dayopen-PriceScale*20 Then Buy("b",AtLimit,dayopen-PriceScale*20,2); if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] Then { Condition1 = false; Condition2 = false; } if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx2" Then Condition2 = true; if Condition1 == false Then ExitLong("bx1",atlimit,AvgEntryPrice-PriceScale*10,"",Floor(CurrentContracts*0.5),1); if Condition2 == false Then ExitLong("bx2",atlimit,AvgEntryPrice-PriceScale*20); Buy("bb",AtLimit,LatestEntryPrice(0)-PriceScale*30,CurrentContracts*2); } 즐거운 하루되세요 > 초보트레이더11 님이 쓴 글입니다. > 제목 : 시스템문의합니다 > 당일 시가대비 20틱위에서 매도2계약들어가서 진입가 대비 10틱 20틱에서 1계약씩청산하고 청산이 안됐을시 50틱에서 추가로 가지고 있는 수량대비 2배로 추가매도하고 평단가 대비 10틱 20틱에서 반 반 청산하고 또 청산이 안됐을 경우 80틱에서 추가로 가지고있는 수량대비 2배로 추가매도해서 평단가 대비 10틱 20틱에서 반 반씩청산 하는시스템식을 만들고 싶습니다 그렇게 각 30틱마다 진입이 되겠끔해서 500틱까지 반복이 되겠끔 하고 싶습니다 매수도 마찬가지로요 만약 20틱에서 진입해서 다 청산이 되면 다시 20틱에 오면 매도가 되겠끔 50틱에서 추가로 들어가서 청산이 되면 다시 50틱에서도 진입이 됬으면 좋겠습니다 단 진입이 되어있으면 추가 진입은 금지이고 각 진입이된 다음 30틱에서 진입이 되겠끔 부탁드립니다 만약 1계약이 청산된 상태라면 1계약은 추가로 진입가능하고요