커뮤니티

문의 드립니다.

프로필 이미지
푸른
2023-12-01 06:01:50
1028
글번호 174495
답변완료
input : StartTime(0000),EndTime(0000); input : 익절틱수(0),손절틱수(0); var : Tcond(False),entry(0); Variables: Mom(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; IF Endtime <= starttime Then { SetStopEndofday(0); } } 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 L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*1 Then { Buy("b",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); } if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*1 Then { Sell("s",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); if L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*10 Then { Buy("b1",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*10 Then { Sell("s1",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); if L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*10 Then { Buy("b2",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*10 Then { Sell("s2",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); if L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*1 Then { Buy("b3",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*1 Then { Sell("s3",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); if L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*10 Then { Buy("b4",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*10 Then { Sell("s4",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); if L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*10 Then { Buy("b5",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*10 Then { Sell("s5",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 위 수식어를 일봉에 접목을 하고 싶은데 실질적으로 전일 잔고가 있을시 미처리 부분 때문에 적용하지 못하고 있습니다. 위 수식어는 과거 데이터로 주문이 이루어지는 특성상 일봉의 매수나 매도의 신호를 장중 예약주문이 가능하지 문의 드리고 가능하다면 익절 손절은 각각 100틱으로 설정하고자 합니다. 늘 감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-12-01 14:57:34

안녕하세요 예스스탁입니다. 일봉은 조건중 시간이나 당일청산이 동작하지 않습니다. 즉 지정한 거래시간과 당일청산은 발동될수 없어 해당 내용은 변경이 가능하지 않습니다. 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다. > input : StartTime(0000),EndTime(0000); input : 익절틱수(0),손절틱수(0); var : Tcond(False),entry(0); Variables: Mom(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; IF Endtime <= starttime Then { SetStopEndofday(0); } } 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 L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*1 Then { Buy("b",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); } if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*1 Then { Sell("s",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); if L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*10 Then { Buy("b1",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*10 Then { Sell("s1",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); if L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*10 Then { Buy("b2",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*10 Then { Sell("s2",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); if L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*1 Then { Buy("b3",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*1 Then { Sell("s3",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); if L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*10 Then { Buy("b4",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*10 Then { Sell("s4",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); if L ==lowest(L,1) and highest(H,4) >= lowest(L,2)+PriceScale*10 Then { Buy("b5",AtStop,(highest(H,4)+lowest(L,1))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then Sell(); if H == highest(H,1) and lowest(L,4) <= highest(H,2)+PriceScale*10 Then { Sell("s5",AtStop,(lowest(L,4)+highest(H,1))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then Buy(); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 위 수식어를 일봉에 접목을 하고 싶은데 실질적으로 전일 잔고가 있을시 미처리 부분 때문에 적용하지 못하고 있습니다. 위 수식어는 과거 데이터로 주문이 이루어지는 특성상 일봉의 매수나 매도의 신호를 장중 예약주문이 가능하지 문의 드리고 가능하다면 익절 손절은 각각 100틱으로 설정하고자 합니다. 늘 감사드립니다.