커뮤니티
문의
2013-03-27 16:56:31
162
글번호 61320
선물 외국인 매수량을 변수 P
p가 ? 백억 이상이면 10계약 매수
한계약식 0.2 상승할때마다 매수 청산
매도는 반대로
선물 외국인 매도량이 변수 -p1
? 이하면 매도 10계약
한계약식 0.2 상승할때마다 매도 청산
답변 1
예스스탁 예스스탁 답변
2013-03-27 18:09:22
안녕하세요
예스스탁입니다.
수급데이터는 순매수 데이터만 제공됩니다.
매수와 매도가 따로 제공되지 않습니다.
아래식은 순매수를 이용한 식입니다.
참조데이터로 선물외국인순매수금액을 추가하신 후
식 적용하시면 됩니다.
var : P(0,data2);
p = data2(c);
if MarketPosition == 0 and crossup(P,100) Then
buy("b",OnClose,def,10);
if MarketPosition == 0 and CrossDown(P,-100) Then
sell("s",OnClose,def,10);
if MarketPosition == 1 Then{
exitlong("bx1",atlimit,EntryPrice+0.2,"",1,1);
exitlong("bx2",atlimit,EntryPrice+0.4,"",1,1);
exitlong("bx3",atlimit,EntryPrice+0.6,"",1,1);
exitlong("bx4",atlimit,EntryPrice+0.8,"",1,1);
exitlong("bx5",atlimit,EntryPrice+1.0,"",1,1);
exitlong("bx6",atlimit,EntryPrice+1.2,"",1,1);
exitlong("bx7",atlimit,EntryPrice+1.4,"",1,1);
exitlong("bx8",atlimit,EntryPrice+1.6,"",1,1);
exitlong("bx9",atlimit,EntryPrice+1.8,"",1,1);
exitlong("bx10",atlimit,EntryPrice+2.0,"",1,1);
}
if MarketPosition == -1 Then{
ExitShort("sx1",atlimit,EntryPrice-0.2,"",1,1);
ExitShort("sx2",atlimit,EntryPrice-0.4,"",1,1);
ExitShort("sx3",atlimit,EntryPrice-0.6,"",1,1);
ExitShort("sx4",atlimit,EntryPrice-0.8,"",1,1);
ExitShort("sx5",atlimit,EntryPrice-1.0,"",1,1);
ExitShort("sx6",atlimit,EntryPrice-1.2,"",1,1);
ExitShort("sx7",atlimit,EntryPrice-1.4,"",1,1);
ExitShort("sx8",atlimit,EntryPrice-1.6,"",1,1);
ExitShort("sx9",atlimit,EntryPrice-1.8,"",1,1);
ExitShort("sx10",atlimit,EntryPrice-2.0,"",1,1);
}
즐거운 하루되세요
> 구다이전설 님이 쓴 글입니다.
> 제목 : 문의
> 선물 외국인 매수량을 변수 P
p가 ? 백억 이상이면 10계약 매수
한계약식 0.2 상승할때마다 매수 청산
매도는 반대로
선물 외국인 매도량이 변수 -p1
? 이하면 매도 10계약
한계약식 0.2 상승할때마다 매도 청산