커뮤니티

변동폭돌파 재질문

프로필 이미지
inno33
2015-01-31 10:09:45
131
글번호 82829
답변완료
> 예스스탁 님이 쓴 글입니다. > 제목 : Re : 변동폭 돌파 > 안녕하세요 예스스탁입니다. 평균변동폭 n개의 80%돌파시 진입은 어떤 가격기준인지 모르겠습니다. 청산식만 올려드립니다. 변동폭은 atr을 이용했습니다. input : n(20),X(10); var : atrv(0); var1 = atr(n); if MarketPosition == 1 Then{ ExitLong("bx1",AtStop,EntryPrice-atrv[BarsSinceEntry]*3); #1포인트 이하 수익일때는 최고가 -atr*3 if highest(H,BarsSinceEntry) < EntryPrice+1 Then ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-Atrv*3); #1포인트 이상 수익일때는 최고가-atr*1.5 if highest(H,BarsSinceEntry) >= EntryPrice+1 Then ExitLong("btr2",AtStop,highest(h,BarsSinceEntry)-Atrv*1.5); } if MarketPosition == -1 Then{ ExitShort("bx1",AtStop,EntryPrice+atrv[BarsSinceEntry]*3); #1포인트 이하 수익일때는 최저가 +atr*3 if Lowest(L,BarsSinceEntry) > EntryPrice-1 Then ExitShort("str1",AtStop,lowest(L,BarsSinceEntry)+atrv*3); #1포인트 이상 수익일때는 최저가 +atr*1.5 if Lowest(L,BarsSinceEntry) <= EntryPrice-1 Then ExitShort("str2",AtStop,lowest(L,BarsSinceEntry)+atrv*1.5); } #X틱 손절 SetStopLoss(PriceScale*X,PointStop); 즐거운 하루되세요 > inno33 님이 쓴 글입니다. > 제목 : 변동폭 돌파 > 평균변동폭 n개의 80%돌파시 진입이후, 초기손절 변동폭의 3배, 트레일링스탑도 평균 변동폭의 3배돌파시 스탑적용, 일정 수익 구간이후에는 변동폭의 1.5배로 트레일링 스탑 조정하는식 부탁합니다.그리고 틱으로 초기손절 적용하는 방법도요 .수고하세요 질문이 부족했네요 봉개수 기준입니다.봉개수 n개 변동폭 80% 돌파시 입니다. 아 그리고 시스템식 설정되었는 변동폭 돌파를 테스트해보면 진입은 신호 발생시 즉시 신호가 발생하는데 봉완성시로 적용하려면 어떻게 해야하나요?
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-02-02 13:20:11

안녕하세요 예스스탁입니다. 최근완성봉 종가대비 지정한 n개봉 변동폭의 80% 이상 상승하면 매수 , 하락하면 매도로 작성했습니다. input : n(20),X(10),VtyPercent(0.80); var : atrv(0); atrv = atr(n); If MarketPosition() <> 1 Then Buy("b", AtStop, Close + (VtyPercent * var1)); If MarketPosition() <> -1 Then Sell ("s", AtStop, Close - (VtyPercent * var1)); if MarketPosition == 1 Then{ ExitLong("bx1",AtStop,EntryPrice-atrv[BarsSinceEntry]*3); #1포인트 이하 수익일때는 최고가 -atr*3 if highest(H,BarsSinceEntry) < EntryPrice+1 Then ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-Atrv*3); #1포인트 이상 수익일때는 최고가-atr*1.5 if highest(H,BarsSinceEntry) >= EntryPrice+1 Then ExitLong("btr2",AtStop,highest(h,BarsSinceEntry)-Atrv*1.5); } if MarketPosition == -1 Then{ ExitShort("sx1",AtStop,EntryPrice+atrv[BarsSinceEntry]*3); #1포인트 이하 수익일때는 최저가 +atr*3 if Lowest(L,BarsSinceEntry) > EntryPrice-1 Then ExitShort("str1",AtStop,lowest(L,BarsSinceEntry)+atrv*3); #1포인트 이상 수익일때는 최저가 +atr*1.5 if Lowest(L,BarsSinceEntry) <= EntryPrice-1 Then ExitShort("str2",AtStop,lowest(L,BarsSinceEntry)+atrv*1.5); } #X틱 손절 SetStopLoss(PriceScale*X,PointStop); 2. 봉완성시로 진입하시면 아래와 같습니다. input : n(20),X(10),VtyPercent(0.80); var : atrv(0); atrv = atr(n); If MarketPosition() <> 1 and crossup(c,Close + (VtyPercent * var1)) Then Buy("b"); If MarketPosition() <> -1 and CrossDown(c,Close - (VtyPercent * var1)) Then Sell ("s"); if MarketPosition == 1 Then{ ExitLong("bx1",AtStop,EntryPrice-atrv[BarsSinceEntry]*3); #1포인트 이하 수익일때는 최고가 -atr*3 if highest(H,BarsSinceEntry) < EntryPrice+1 Then ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-Atrv*3); #1포인트 이상 수익일때는 최고가-atr*1.5 if highest(H,BarsSinceEntry) >= EntryPrice+1 Then ExitLong("btr2",AtStop,highest(h,BarsSinceEntry)-Atrv*1.5); } if MarketPosition == -1 Then{ ExitShort("sx1",AtStop,EntryPrice+atrv[BarsSinceEntry]*3); #1포인트 이하 수익일때는 최저가 +atr*3 if Lowest(L,BarsSinceEntry) > EntryPrice-1 Then ExitShort("str1",AtStop,lowest(L,BarsSinceEntry)+atrv*3); #1포인트 이상 수익일때는 최저가 +atr*1.5 if Lowest(L,BarsSinceEntry) <= EntryPrice-1 Then ExitShort("str2",AtStop,lowest(L,BarsSinceEntry)+atrv*1.5); } #X틱 손절 SetStopLoss(PriceScale*X,PointStop); 즐거운 하루되세요 > inno33 님이 쓴 글입니다. > 제목 : 변동폭돌파 재질문 > > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 변동폭 돌파 > 안녕하세요 예스스탁입니다. 평균변동폭 n개의 80%돌파시 진입은 어떤 가격기준인지 모르겠습니다. 청산식만 올려드립니다. 변동폭은 atr을 이용했습니다. input : n(20),X(10); var : atrv(0); var1 = atr(n); if MarketPosition == 1 Then{ ExitLong("bx1",AtStop,EntryPrice-atrv[BarsSinceEntry]*3); #1포인트 이하 수익일때는 최고가 -atr*3 if highest(H,BarsSinceEntry) < EntryPrice+1 Then ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-Atrv*3); #1포인트 이상 수익일때는 최고가-atr*1.5 if highest(H,BarsSinceEntry) >= EntryPrice+1 Then ExitLong("btr2",AtStop,highest(h,BarsSinceEntry)-Atrv*1.5); } if MarketPosition == -1 Then{ ExitShort("bx1",AtStop,EntryPrice+atrv[BarsSinceEntry]*3); #1포인트 이하 수익일때는 최저가 +atr*3 if Lowest(L,BarsSinceEntry) > EntryPrice-1 Then ExitShort("str1",AtStop,lowest(L,BarsSinceEntry)+atrv*3); #1포인트 이상 수익일때는 최저가 +atr*1.5 if Lowest(L,BarsSinceEntry) <= EntryPrice-1 Then ExitShort("str2",AtStop,lowest(L,BarsSinceEntry)+atrv*1.5); } #X틱 손절 SetStopLoss(PriceScale*X,PointStop); 즐거운 하루되세요 > inno33 님이 쓴 글입니다. > 제목 : 변동폭 돌파 > 평균변동폭 n개의 80%돌파시 진입이후, 초기손절 변동폭의 3배, 트레일링스탑도 평균 변동폭의 3배돌파시 스탑적용, 일정 수익 구간이후에는 변동폭의 1.5배로 트레일링 스탑 조정하는식 부탁합니다.그리고 틱으로 초기손절 적용하는 방법도요 .수고하세요 질문이 부족했네요 봉개수 기준입니다.봉개수 n개 변동폭 80% 돌파시 입니다. 아 그리고 시스템식 설정되었는 변동폭 돌파를 테스트해보면 진입은 신호 발생시 즉시 신호가 발생하는데 봉완성시로 적용하려면 어떻게 해야하나요?