예스스탁
예스스탁 답변
2020-03-10 15:52:39
안녕하세요
예스스탁입니다.
청산함수에 수량을 지정하셔야 합니다.
수량이 지정되지 않으면 전량 청산입니다.
if 매수진입조건 Then
buy("b",OnClose,def,2);
if 매도진입조건 Then
sell("s",OnClose,def,2);
if MarketPosition == 1 then
{
if CurrentContracts == MaxContracts and 조건 Then
ExitLong("bx1",OnClose,def,"",1,1);
if CurrentContracts < MaxContracts Then
ExitLong("bx2",atstop,EntryPrice,"",1,1);
}
if MarketPosition == -1 then
{
if CurrentContracts == MaxContracts and 조건 Then
ExitShort("sx1",OnClose,def,"",1,1);
if CurrentContracts < MaxContracts Then
ExitShort("sx2",atstop,EntryPrice,"",1,1);
}
즐거운 하루되세요
> 원펀맨 님이 쓴 글입니다.
> 제목 : 청산 수식 부탁드립니다.
>
해선을 하는 사람이구요
2계약 진입했을때
어느조건이 되면 1계약만 청산하고
나머지 1계약은 본절가 설정하고 추세를 가져가는 청산전략을
꾸미고 싶습니다.
simul돌려보니 exitlong, exitshort 은 전부 청산해버리는것 같아요