커뮤니티

익절조건식 작성

프로필 이미지
조민철
2016-04-01 09:12:41
76
글번호 96754
답변완료
항상 감사드립니다 아래 익절조건식을 작성하고 싶습니다. 1. 현재 매수포지션이고 최대이익이 100틱이상이면 60틱에서 매수청산 1-1.현재 매수포지션이고 최대이익이 100틱이상이면 최대이익*0.638 에서 매수 청산 2. 현재 매도포지션이고 최대이익이 100틱이상이면 60틱에서 매도청산 2-1.현재 매도포지션이고 최대이익이 100틱이상이면 최대이익*0.638 에서 매도 청산 3.아래조건식은 매수조건식입니다 if ((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition (1) != 1) or (MarketPosition == -1)) and #동일방향 재진입금지# v20==1 and upAroon2 > DnAroon2 and UpAroon2>70 and dnAroon2 <30 Then buy("B1_타주기"); 매도조건식은 buy("B1_타주기")신호가 발생하지않으면 매도진입조건입니다 매수신호가 발생하지 않으면 항상매도신호입니다 매도조건식 부탁드립니다 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-04-01 13:46:18

안녕하세요 예스스탁입니다. 1. if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*100 Then exitlong("bx1",AtStop,EntryPrice+PriceScale*60); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*100 Then exitlong("bx2",AtStop,EntryPrice+(highest(H,BarsSinceEntry)-EntryPrice)*0.638); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*100 Then ExitShort("sx1",AtStop,EntryPrice-PriceScale*60); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*100 Then ExitShort("sx2",AtStop,EntryPrice-(EntryPrice-Lowest(L,BarsSinceEntry))*0.638); } 2 if ((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition (1) != 1) or (MarketPosition == -1)) and #동일방향 재진입금지# v20==1 and upAroon2 > DnAroon2 and UpAroon2>70 and dnAroon2 <30 Then buy("B1_타주기"); if !(v20==1 and upAroon2 > DnAroon2 and UpAroon2>70 and dnAroon2 <30) Then ExitLong(); 즐거운 하루되세요 > 조민철 님이 쓴 글입니다. > 제목 : 익절조건식 작성 > 항상 감사드립니다 아래 익절조건식을 작성하고 싶습니다. 1. 현재 매수포지션이고 최대이익이 100틱이상이면 60틱에서 매수청산 1-1.현재 매수포지션이고 최대이익이 100틱이상이면 최대이익*0.638 에서 매수 청산 2. 현재 매도포지션이고 최대이익이 100틱이상이면 60틱에서 매도청산 2-1.현재 매도포지션이고 최대이익이 100틱이상이면 최대이익*0.638 에서 매도 청산 3.아래조건식은 매수조건식입니다 if ((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition (1) != 1) or (MarketPosition == -1)) and #동일방향 재진입금지# v20==1 and upAroon2 > DnAroon2 and UpAroon2>70 and dnAroon2 <30 Then buy("B1_타주기"); 매도조건식은 buy("B1_타주기")신호가 발생하지않으면 매도진입조건입니다 매수신호가 발생하지 않으면 항상매도신호입니다 매도조건식 부탁드립니다 감사합니다.