커뮤니티

수식어 부탁드립니다

프로필 이미지
푸른
2022-06-07 13:58:23
1014
글번호 159619
답변완료

첨부 이미지

var : entry(0); if Bdate != Bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if entry < 1 then { input : 익절틱수(150),손절틱수(20); if NextBarSdate != sDate Then { if NextBarOpen > C Then Sell("s",AtStop,C); if NextBarOpen < C Then Buy("b",AtStop,C); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); -------------- 진입신호1회를 추가한 것인데요 수식어가 정확한지 문의드리고 추가로 매매시간은 08시40분부터 익일 05시00분의 수식어를 부탁드립니다. ------------------------------ 1번 그래프의 수식어 입니다. input : 익절틱수(500),손절틱수(20); if NextBarSdate != sDate Then { if NextBarOpen > C Then Sell("s",AtStop,C); if NextBarOpen < C Then Buy("b",AtStop,C); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 상기 수식어에 아래 내용을 추가로 부탁드립니다. 1. 진입신호1회 2. 매매시간을 한국시간 08시40분부터 익일 05시00분 3. 당일 7시시가 이후 전일종가~ 당일시가의 Buy,Sell 예상되는 진입신호값에서 자동주문이 (buy-50틱),(sell+50틱)에 되도록 부탁드립니다. ----------------------------- 2번 그래프의 수식어 입니다. input : 익절틱수(150),손절틱수(20); if NextBarSdate != sDate Then { if NextBarOpen > C Then Sell("s",AtStop,C); if NextBarOpen < C Then Buy("b",AtStop,C); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 위는 제일 위 첨부파일의 수식어 입니다. 궁금한건 일봉매매에서 하루1회신호로 성능보고서 데이터로 나오는지 아니면 계속된 신호에 총합의 흐름으로 성능보고서가 나오는지 궁금합니다. ---------------------------------
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-06-07 14:37:35

안녕하세요 예스스탁입니다. 1 랭귀지에서 하나의 buy나 sell은 한봉에 한번만 동작합니다. 수식에 buy와 sell이 하나씩만 사용되었고 올려주신 그림에서 차트 주기가 일봉이므로 하루에 매수진입과 매도진입이 한번씩만 동작하게 됩니다. 총 2회가 발생할 수 있습니다. 2 일봉차트에서는 시간을 조건으로 지정할 수 없습니다. 시간은 분단위 이하의 주기차트에서만 유효합니다. 그러므로 매매시간을 지정하시려면 분단위 이하의 주기에서 적용해야 하고 수식도 그에 맞게 변경하셔야 합니다. 3 또한 올리신 수식은 국내종목에나 사용되는 식입니다. 해외에도 일봉주기에서는 적용하셔도 되지만 분봉이하에서는 맞지 않는 내용이 됩니다. 국내종목은 야간시장이 없어 현재봉날짜와 다음봉시가날짜를 비교해서 날짜가 변경된것을 확인할 수 있지만 해외선물은 0시를 기준으로 영업일이 변경되지 않습니다. 4 수정한 식입니다. 분봉주기에 적용하셔야 합니다. 매수나 매도 중 먼저 만족한 것으로 1회만 진입하고 지정한 종료시간에 당일청산을 하게 됩니다. input : 익절틱수(150),손절틱수(20); input : StartTime(84000),EndTime(50000); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (NextBarSdate != sDate and NextBarStime >= 70000) or (NextBarSdate == sDate and NextBarStime >= 70000 and sTime < 70000) Then { entry = 0; if MarketPosition <= 0 Then Sell("s",AtLimit,C+PriceScale*50); if MarketPosition >= 0 Then Buy("b",AtLimit,C-PriceScale*50); } if Tcond == true Then { if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition <= 0 and entry < 1 and DayHigh < DayClose(1)+PriceScale*50 Then Sell("s2",AtLimit,DayClose(1)+PriceScale*50); if MarketPosition >= 0 and entry < 1 and DayLow > DayClose(1)-PriceScale*50 Then Buy("b2",AtLimit,DayClose(1)-PriceScale*50); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 수식어 부탁드립니다 > var : entry(0); if Bdate != Bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if entry < 1 then { input : 익절틱수(150),손절틱수(20); if NextBarSdate != sDate Then { if NextBarOpen > C Then Sell("s",AtStop,C); if NextBarOpen < C Then Buy("b",AtStop,C); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); -------------- 진입신호1회를 추가한 것인데요 수식어가 정확한지 문의드리고 추가로 매매시간은 08시40분부터 익일 05시00분의 수식어를 부탁드립니다. ------------------------------ 1번 그래프의 수식어 입니다. input : 익절틱수(500),손절틱수(20); if NextBarSdate != sDate Then { if NextBarOpen > C Then Sell("s",AtStop,C); if NextBarOpen < C Then Buy("b",AtStop,C); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 상기 수식어에 아래 내용을 추가로 부탁드립니다. 1. 진입신호1회 2. 매매시간을 한국시간 08시40분부터 익일 05시00분 3. 당일 7시시가 이후 전일종가~ 당일시가의 Buy,Sell 예상되는 진입신호값에서 자동주문이 (buy-50틱),(sell+50틱)에 되도록 부탁드립니다. ----------------------------- 2번 그래프의 수식어 입니다. input : 익절틱수(150),손절틱수(20); if NextBarSdate != sDate Then { if NextBarOpen > C Then Sell("s",AtStop,C); if NextBarOpen < C Then Buy("b",AtStop,C); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 위는 제일 위 첨부파일의 수식어 입니다. 궁금한건 일봉매매에서 하루1회신호로 성능보고서 데이터로 나오는지 아니면 계속된 신호에 총합의 흐름으로 성능보고서가 나오는지 궁금합니다. ---------------------------------