커뮤니티

감사합니다.

프로필 이미지
새로운돌
2015-11-02 11:50:32
200
글번호 91938
답변완료

첨부 이미지

먼저 항상 감사드립니다. 다름이 아니오라 아직 여러번 진입하는 통계가 존재하여 문의 드립니다. N을 1로 두었는데도 여러번 진입을 하네요. 하루 한번 진입하기 위한 다른 조건이 필요한 걸까요? 여러번 진입하는 날은 사진과 같습니다. 아래는 만들어주신 함수입니다. 부탁드리겠습니다. input : N(1),nday(2),pt(0.5),시간(93000); var : Entry(0); if bdate != Bdate[1] Then Entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then Entry = Entry+1; if stime >= 시간 and stime < 145900 then{ if entry < N and H < dayhigh(nday)+pt Then buy("b",AtStop,dayhigh(nday)+pt); if entry < N and H > dayhigh(nday)+pt Then buy("bb",AtLimit,dayhigh(nday)+pt); if entry < N and L > daylow(nday)-pt Then sell("s",AtStop,daylow(nday)-pt); if entry < N and L < daylow(nday)-pt Then Sell("ss",AtLimit,daylow(nday)-pt); } SetStopProfittarget(0.5,PointStop); SetStopLoss(0.5,PointStop); SetStopEndofday(145900);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-11-03 11:50:55

안녕하세요 예스스탁입니다. 수식의 진입횟수가 포지션 변경을 기준으로 카운트 하는데 동일봉에서 진입과 청산이 있어 종가시점 포지션 변화가 없기 때문에 카운트가 되지 않았습니다. 당일 진입횟수 카운트를 다른 방법으로 처리해 드립니다. input : N(1),nday(2),pt(0.5),시간(93000); var : cnt(0),Entry(0); entry = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then entry = entry+1; } if stime >= 시간 and stime < 145900 then{ if entry < N and H < dayhigh(nday)+pt Then buy("b",AtStop,dayhigh(nday)+pt); if entry < N and H > dayhigh(nday)+pt Then buy("bb",AtLimit,dayhigh(nday)+pt); if entry < N and L > daylow(nday)-pt Then sell("s",AtStop,daylow(nday)-pt); if entry < N and L < daylow(nday)-pt Then Sell("ss",AtLimit,daylow(nday)-pt); } SetStopProfittarget(0.5,PointStop); SetStopLoss(0.5,PointStop); SetStopEndofday(145900); 즐거운 하루되세요 > 돌을던져라 님이 쓴 글입니다. > 제목 : 감사합니다. > 먼저 항상 감사드립니다. 다름이 아니오라 아직 여러번 진입하는 통계가 존재하여 문의 드립니다. N을 1로 두었는데도 여러번 진입을 하네요. 하루 한번 진입하기 위한 다른 조건이 필요한 걸까요? 여러번 진입하는 날은 사진과 같습니다. 아래는 만들어주신 함수입니다. 부탁드리겠습니다. input : N(1),nday(2),pt(0.5),시간(93000); var : Entry(0); if bdate != Bdate[1] Then Entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then Entry = Entry+1; if stime >= 시간 and stime < 145900 then{ if entry < N and H < dayhigh(nday)+pt Then buy("b",AtStop,dayhigh(nday)+pt); if entry < N and H > dayhigh(nday)+pt Then buy("bb",AtLimit,dayhigh(nday)+pt); if entry < N and L > daylow(nday)-pt Then sell("s",AtStop,daylow(nday)-pt); if entry < N and L < daylow(nday)-pt Then Sell("ss",AtLimit,daylow(nday)-pt); } SetStopProfittarget(0.5,PointStop); SetStopLoss(0.5,PointStop); SetStopEndofday(145900);