커뮤니티

문의드립니다

프로필 이미지
회원
2016-05-25 12:39:34
99
글번호 98467
답변완료
47890 작성하여 주신 수식 감사 합니다. 진입과 손절을 수정 하였으면 합니다 1.진입카운트를 종가상이 아닌 터치로 가는한지요.가능하다면 부탁 드리겠습니다 2.손절을 종가상 시가를 넘었을때. 수고하세요..^^
사용자 함수
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2016-05-25 14:38:32

안녕하세요 예스스탁입니다. 터치로 변경하시면 아래정도로 작성이 가능합니다. 봉 자체가 시초가 위에 있다가 하락해서 시초가를 터치하는 경우만 카운트가 되고 진입이 됩니다. 손절은 종가가 시초가보다 크면 실행되게 수정했습니다. input : 진입시작횟수(3),진입끝횟수(7),수량(3),손절틱수(5); var: dn(0); if Bdate != Bdate[1] Then dn = 0; if dayindex > 0 and L <= dayopen and L[1] > dayopen Then{ dn = dn +1; } if dn >= 진입시작횟수-1 and dn < 진입끝횟수 and L > dayopen Then{ sell("s",AtStop,dayopen,수량); } if MarketPosition == -1 Then{ if C > dayopen and BarsSinceEntry > 0 Then ExitShort("손절"); ExitShort("sx1",atlimit,EntryPrice-PriceScale*30,"",max(1,floor(MaxContracts*(1/3))),1); ExitShort("sx2",atlimit,EntryPrice-PriceScale*50,"",max(1,floor(MaxContracts*(1/3))),1); ExitShort("sx3",atlimit,EntryPrice-PriceScale*70); if CurrentContracts < MaxContracts and lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*30 Then ExitShort("sx4",AtStop,lowest(L,BarsSinceEntry)+(EntryPrice-lowest(L,BarsSinceEntry))*0.4); } 즐거운 하루되세요 > leezard 님이 쓴 글입니다. > 제목 : 문의드립니다 > 47890 작성하여 주신 수식 감사 합니다. 진입과 손절을 수정 하였으면 합니다 1.진입카운트를 종가상이 아닌 터치로 가는한지요.가능하다면 부탁 드리겠습니다 2.손절을 종가상 시가를 넘었을때. 수고하세요..^^
프로필 이미지

회원

2016-05-25 14:52:35

수식 감사합니다...^^
프로필 이미지

예스스탁 예스스탁 답변

2016-05-25 14:54:15

안녕하세요 예스스탁입니다. 신호의 타입중 atstop과 atlimit은 현재봉에서 조건충족되면 셋팅하고 다음봉에서 지정한 가격을 터치하면 신호가 발생합니다. 당일 마지막봉에서 셋팅이 되지 않게 조건 추가했습니다. input : 진입시작횟수(3),진입끝횟수(7),수량(3),손절틱수(5); var: dn(0); if Bdate != Bdate[1] Then dn = 0; if dayindex > 0 and L <= dayopen and L[1] > dayopen Then{ dn = dn +1; } if dn >= 진입시작횟수-1 and dn < 진입끝횟수 and L > dayopen and NextBarSdate == sdate Then{ sell("s",AtStop,dayopen,수량); } if MarketPosition == -1 Then{ if C > dayopen and BarsSinceEntry > 0 Then ExitShort("손절"); ExitShort("sx1",atlimit,EntryPrice-PriceScale*30,"",max(1,floor(MaxContracts*(1/3))),1); ExitShort("sx2",atlimit,EntryPrice-PriceScale*50,"",max(1,floor(MaxContracts*(1/3))),1); ExitShort("sx3",atlimit,EntryPrice-PriceScale*70); if CurrentContracts < MaxContracts and lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*30 Then ExitShort("sx4",AtStop,lowest(L,BarsSinceEntry)+(EntryPrice-lowest(L,BarsSinceEntry))*0.4); } 만약 시스템을 거는 종목이 해외선물이면 NextBarSdate == sdate로는 제어가 되지 않습니다. 적절한 시간조건을 추가해 주셔야 합니다. 즐거운 하루되세요 > leezard 님이 쓴 글입니다. > 제목 : 감사합니다 > 수식 감사합니다...^^