커뮤니티

필터링 추가 부탁 드립니다.

프로필 이미지
피니트
2013-11-23 03:07:37
240
글번호 69770
답변완료
샹들리에 청산 방식으로 ATR 2.5 로 당일 매도진입 , 매수 진입 하고자 합니다. 필터링 원칙은 1. 당일 오후 1시 이후에는 진입 하지 않는다. (= 09:00 ~ 13:00에만 진입한다 ) 2. (실제 매수, 매도 여부에 무관하게) 신호에 따른 거래에서 직전의 거래가 손실일 경우에만 진입한다. 3. 당일의 첫 번 째 거래는 2. 의 원칙을 적용하지 않고 무조건 진입한다. input : ATRPeriod(15),ATRS(2.5); var : MaxHigh(0),MinLow(0); if MarketPosition() == 0 Then{ if crossup(ma(c,5),ma(c,20)) Then { buy(); } if CrossDown(ma(c,5),ma(c,20)) Then { Sell(); } } if MarketPosition() == 1 then { exitlong("매수추적",Atstop,highest(H,barssinceentry)-ATR(ATRperiod)*ATRS); } if MarketPosition() == -1 then{ ExitShort("매도추적",Atstop,lowest(L,barssinceentry)+ATR(ATRperiod)*ATRS); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-11-25 17:47:46

안녕하세요? 예스스탁입니다. 문의하신 내용 답변드립니다. input : ATRPeriod(15),ATRS(2.5); Var : Count(0); Count = 0 ; For Value1 = 0 To 10 { If EntryDate(Value1) == date Then Count = Count + 1; } if MarketPosition() == 0 and stime < 130000 Then{ if count == 0 then { if crossup(ma(c,5),ma(c,20)) Then buy(); if CrossDown(ma(c,5),ma(c,20)) Then Sell(); } else { if PositionProfit(1) < 0 Then { if crossup(ma(c,5),ma(c,20)) Then buy(); if CrossDown(ma(c,5),ma(c,20)) Then Sell(); } } } if MarketPosition() == 1 then exitlong("매수추적",Atstop,highest(H,barssinceentry)-ATR(ATRperiod)*ATRS); if MarketPosition() == -1 then ExitShort("매도추적",Atstop,lowest(L,barssinceentry)+ATR(ATRperiod)*ATRS); 즐거운 날 되세요. > 피니트 님이 쓴 글입니다. > 제목 : 필터링 추가 부탁 드립니다. > 샹들리에 청산 방식으로 ATR 2.5 로 당일 매도진입 , 매수 진입 하고자 합니다. 필터링 원칙은 1. 당일 오후 1시 이후에는 진입 하지 않는다. (= 09:00 ~ 13:00에만 진입한다 ) 2. (실제 매수, 매도 여부에 무관하게) 신호에 따른 거래에서 직전의 거래가 손실일 경우에만 진입한다. 3. 당일의 첫 번 째 거래는 2. 의 원칙을 적용하지 않고 무조건 진입한다. input : ATRPeriod(15),ATRS(2.5); var : MaxHigh(0),MinLow(0); if MarketPosition() == 0 Then{ if crossup(ma(c,5),ma(c,20)) Then { buy(); } if CrossDown(ma(c,5),ma(c,20)) Then { Sell(); } } if MarketPosition() == 1 then { exitlong("매수추적",Atstop,highest(H,barssinceentry)-ATR(ATRperiod)*ATRS); } if MarketPosition() == -1 then{ ExitShort("매도추적",Atstop,lowest(L,barssinceentry)+ATR(ATRperiod)*ATRS); }