커뮤니티

수식 문의 드립니다.

프로필 이미지
린포체
2015-09-24 21:22:51
138
글번호 90705
답변완료
진입조건 A전략 매수 진입후 10틱 하락하면 추가로 1계약 매수진입 B전략 매도 진입후 10틱 상승하면 추가로 1계약 매도진입 청산조건 1계약 매수진입후 30틱 상승하면 청산 1계약 매도진입후 30틱 하락하면 청산 2계약 매수진입후 1계약 10틱 상승하면 청산 후 나머지 1계약 본절청산 2계약 매도진입후 1계약 10틱 하락하면 청산 후 나머지 1계약 본절청산
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-09-25 09:11:16

안녕하세요 예스스탁입니다. 1번식은 entryprice(첫진입의 가격)을 기준으로 신호가 발생합니다. 2번식은 avgentryprice(평균단가)를 기준으로 신호가 발생합니다 1, if MarketPosition <= 0 and 매수진입조건 Then buy("b",OnClose,def,1); if MarketPosition >= 0 and 매도진입조건 Then sell("s",OnClose,def,1); if MarketPosition == 1 Then{ if MaxEntries == 1 Then{ buy("bb",atlimit,EntryPrice-PriceScale*10,1); ExitLong("bx1",atlimit,EntryPrice+PriceScale*30); } if MaxEntries == 2 Then{ if CurrentContracts == MaxContracts Then ExitLong("bx21",atlimit,EntryPrice+PriceScale*10,"",1,1); if CurrentContracts == MaxContracts Then ExitLong("bx22",atlimit,EntryPrice); } } if MarketPosition == -1 Then{ if MaxEntries == 1 Then{ sell("ss",atlimit,EntryPrice+PriceScale*10,1); ExitShort("sx1",atlimit,EntryPrice-PriceScale*30); } if MaxEntries == 2 Then{ if CurrentContracts == MaxContracts Then ExitShort("sx21",atlimit,EntryPrice-PriceScale*10,"",1,1); if CurrentContracts == MaxContracts Then ExitShort("sx22",atlimit,EntryPrice); } } 2. if MarketPosition <= 0 and 매수진입조건 Then buy("b",OnClose,def,1); if MarketPosition >= 0 and 매도진입조건 Then sell("s",OnClose,def,1); if MarketPosition == 1 Then{ if MaxEntries == 1 Then{ buy("bb",atlimit,avgEntryPrice-PriceScale*10,1); ExitLong("bx1",atlimit,avgEntryPrice+PriceScale*30); } if MaxEntries == 2 Then{ if CurrentContracts == MaxContracts Then ExitLong("bx21",atlimit,avgEntryPrice+PriceScale*10,"",1,1); if CurrentContracts == MaxContracts Then ExitLong("bx22",atlimit,avgEntryPrice); } } if MarketPosition == -1 Then{ if MaxEntries == 1 Then{ sell("ss",atlimit,avgEntryPrice+PriceScale*10,1); ExitShort("sx1",atlimit,avgEntryPrice-PriceScale*30); } if MaxEntries == 2 Then{ if CurrentContracts == MaxContracts Then ExitShort("sx21",atlimit,avgEntryPrice-PriceScale*10,"",1,1); if CurrentContracts == MaxContracts Then ExitShort("sx22",atlimit,avgEntryPrice); } } 즐거운 한가위 되시기 바랍니다. > 린포체 님이 쓴 글입니다. > 제목 : 수식 문의 드립니다. > 진입조건 A전략 매수 진입후 10틱 하락하면 추가로 1계약 매수진입 B전략 매도 진입후 10틱 상승하면 추가로 1계약 매도진입 청산조건 1계약 매수진입후 30틱 상승하면 청산 1계약 매도진입후 30틱 하락하면 청산 2계약 매수진입후 1계약 10틱 상승하면 청산 후 나머지 1계약 본절청산 2계약 매도진입후 1계약 10틱 하락하면 청산 후 나머지 1계약 본절청산