커뮤니티

안녕하세요?

프로필 이미지
상중하
2017-07-23 15:31:00
100
글번호 111509
답변완료
안녕하세요? 분할청산 수식 문의 드립니다. 3계약을 진입한 상태에서 질문 드립니다. 잔고가 3계약일때 익절 +5틱(1계약) , +10틱(1계약) , +20틱(1계약) , 손절 -10틱(1계약), 손절 -15틱(1계약), 손절 -20틱(1계약) 잔고가 2계약일때 익절 +10틱(1계약) , +20틱(1계약) , 손절 -5틱(1계약) ,진입가(1계약) 잔고가 1계약일때 익절 +20틱(1계약) , 진입가(1계약) 매수,매도 청산식 부탁드립니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-07-24 14:59:45

안녕하세요 예스스탁입니다. if MarketPosition == 1 and MaxContracts == 3 then{ if CurrentContracts == 3 then{ exitlong("bp31",atlimit,EntryPrice+PriceScale*5,"",1,1); exitlong("bp32",atlimit,EntryPrice+PriceScale*10,"",1,1); exitlong("bp33",atlimit,EntryPrice+PriceScale*20,"",1,1); exitlong("bl31",AtStop,EntryPrice-PriceScale*5,"",1,1); exitlong("bl32",AtStop,EntryPrice-PriceScale*10,"",1,1); exitlong("bl33",AtStop,EntryPrice-PriceScale*20,"",1,1); } if CurrentContracts == 2 then{ exitlong("bp21",atlimit,EntryPrice+PriceScale*10,"",1,1); exitlong("bp22",atlimit,EntryPrice+PriceScale*20,"",1,1); exitlong("bl21",AtStop,EntryPrice-PriceScale*5,"",1,1); exitlong("bl22",AtStop,EntryPrice,"",1,1); } if CurrentContracts == 1 then{ exitlong("bp11",atlimit,EntryPrice+PriceScale*20,"",1,1); exitlong("bl11",AtStop,EntryPrice,"",1,1); } } if MarketPosition == -1 and MaxContracts == 3 then{ if CurrentContracts == 3 then{ ExitShort("sp31",atlimit,EntryPrice-PriceScale*5,"",1,1); ExitShort("sp32",atlimit,EntryPrice-PriceScale*10,"",1,1); ExitShort("sp33",atlimit,EntryPrice-PriceScale*20,"",1,1); ExitShort("sl31",AtStop,EntryPrice+PriceScale*5,"",1,1); ExitShort("sl32",AtStop,EntryPrice+PriceScale*10,"",1,1); ExitShort("sl33",AtStop,EntryPrice+PriceScale*20,"",1,1); } if CurrentContracts == 2 then{ ExitShort("sp21",atlimit,EntryPrice-PriceScale*10,"",1,1); ExitShort("sp22",atlimit,EntryPrice-PriceScale*20,"",1,1); ExitShort("sl21",AtStop,EntryPrice+PriceScale*5,"",1,1); ExitShort("sl22",AtStop,EntryPrice,"",1,1); } if CurrentContracts == 2 then{ ExitShort("sp11",atlimit,EntryPrice-PriceScale*20,"",1,1); ExitShort("sl11",AtStop,EntryPrice,"",1,1); } } 즐거운 하루되세요 > 상중하 님이 쓴 글입니다. > 제목 : 안녕하세요? > 안녕하세요? 분할청산 수식 문의 드립니다. 3계약을 진입한 상태에서 질문 드립니다. 잔고가 3계약일때 익절 +5틱(1계약) , +10틱(1계약) , +20틱(1계약) , 손절 -10틱(1계약), 손절 -15틱(1계약), 손절 -20틱(1계약) 잔고가 2계약일때 익절 +10틱(1계약) , +20틱(1계약) , 손절 -5틱(1계약) ,진입가(1계약) 잔고가 1계약일때 익절 +20틱(1계약) , 진입가(1계약) 매수,매도 청산식 부탁드립니다. 감사합니다.