커뮤니티

수식 수정부탁드립니다.

프로필 이미지
미완
2022-02-21 20:22:35
1265
글번호 156560
답변완료
input : StartTime(170000),EndTime(155900); input : n(50),익절틱수(50),진입횟수(3); var : Tcond(false),entry(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; entry = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if Tcond == true and entry < 진입횟수 Then { if MarketPosition == 0 and DayClose(1) > DayOpen(1) and L > DayOpen-PriceScale*n Then Buy("b",AtLimit,DayOpen(0)-PriceScale*n); if MarketPosition == 0 and DayClose(1) < DayOpen(1) and H < DayOpen+PriceScale*n Then Sell("s",AtLimit,DayOpen(0)+PriceScale*n); } SetStopProfittarget(익절틱수*PriceScale,PointStop); 위 수식중 진입 부분 수식을 아래 내용으로 수정 부탁드립니다.. 1. 일봉상 전일자 봉이 음봉으로 마감시 금일 진입은 시작가 보다 지정틱수(input) 만큼 낮게 매수 진입. 예) 지정틱수가 50일때, 시작가가 89.75이면 89.25에 매수 진입 2. 일봉상 전일자 봉이 양봉으로 마감시 금일 진입은 시작가 보다 지정틱수(input) 만큼 높게 매도 진입. 예) 지정틱수가 50일때, 시작가가 89.75이면 90.25에 매도 진입
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-02-22 09:39:42

안녕하세요 예스스탁입니다. input : StartTime(170000),EndTime(155900); input : n(50),익절틱수(50),진입횟수(3); var : Tcond(false),entry(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; entry = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if Tcond == true and entry < 진입횟수 Then { if MarketPosition == 0 and DayClose(1) < DayOpen(1) and L > DayOpen-PriceScale*n Then Buy("b",AtLimit,DayOpen(0)-PriceScale*n); if MarketPosition == 0 and DayClose(1) > DayOpen(1) and H < DayOpen+PriceScale*n Then Sell("s",AtLimit,DayOpen(0)+PriceScale*n); } SetStopProfittarget(익절틱수*PriceScale,PointStop); 즐거운 하루 되세요 > 미완 님이 쓴 글입니다. > 제목 : 수식 수정부탁드립니다. > input : StartTime(170000),EndTime(155900); input : n(50),익절틱수(50),진입횟수(3); var : Tcond(false),entry(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; entry = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if Tcond == true and entry < 진입횟수 Then { if MarketPosition == 0 and DayClose(1) > DayOpen(1) and L > DayOpen-PriceScale*n Then Buy("b",AtLimit,DayOpen(0)-PriceScale*n); if MarketPosition == 0 and DayClose(1) < DayOpen(1) and H < DayOpen+PriceScale*n Then Sell("s",AtLimit,DayOpen(0)+PriceScale*n); } SetStopProfittarget(익절틱수*PriceScale,PointStop); 위 수식중 진입 부분 수식을 아래 내용으로 수정 부탁드립니다.. 1. 일봉상 전일자 봉이 음봉으로 마감시 금일 진입은 시작가 보다 지정틱수(input) 만큼 낮게 매수 진입. 예) 지정틱수가 50일때, 시작가가 89.75이면 89.25에 매수 진입 2. 일봉상 전일자 봉이 양봉으로 마감시 금일 진입은 시작가 보다 지정틱수(input) 만큼 높게 매도 진입. 예) 지정틱수가 50일때, 시작가가 89.75이면 90.25에 매도 진입