커뮤니티
감사합니다.
2015-01-07 15:58:09
118
글번호 82002
감사합니다.
옵션손절매가 선물변동에 따라 이루지는 수식은 어떻게 되는지요?
(진입시 피라미딩 적용, 각각의 진입시점보다 선물 0.5P 변동시 각각손절)
감사합니다.
답변 1
예스스탁 예스스탁 답변
2015-01-07 16:59:59
안녕하세요
예스스탁입니다.
문의하신 내용은 손절매 강제청산함수로는 가능하지 않고
수식에서 풀어서 작성하셔야 합니다.
각 진입이 1게약씩 진입한다고 가정할때 아래와 같이 작성하시면 됩니다.
피라미딩으로 누적하는 횟수를 가늠하셔서 넉넉히 별로 나열해서 작성하셔야 합니다.
5회까지만 작성해 드립니다.
var : D1(0,data1),D2(0,data1),D3(0,data1),D4(0,data1),D5(0,data1);
if MarketPosition == 1 Then{
#첫번째진입
if MaxEntries == 1 and CurrentContracts > CurrentContracts[1] Then{
D1 = data2(c);
}
if MaxEntries >= 1 and data2(c) <= D1-0.5 then
ExitLong("bx1",OnClose,def,"",1,1);
# 두번째진입
if MaxEntries == 2 and CurrentContracts > CurrentContracts[1] Then{
D2 = data2(c);
}
if MaxEntries >= 2 and data2(c) <= D2-0.5 then
ExitLong("bx2",OnClose,def,"",1,1);
#세번째진입
if MaxEntries == 3 and CurrentContracts > CurrentContracts[1] Then{
D3 = data2(c);
}
if MaxEntries >= 3 and data2(c) <= D3-0.5 then
ExitLong("bx3",OnClose,def,"",1,1);
#네번째진입
if MaxEntries == 4 and CurrentContracts > CurrentContracts[1] Then{
D4 = data2(c);
}
if MaxEntries >= 4 and data2(c) <= D4-0.5 then
ExitLong("bx4",OnClose,def,"",1,1);
#다섯번째진입
if MaxEntries == 5 and CurrentContracts > CurrentContracts[1] Then{
D5 = data2(c);
}
if MaxEntries >= 5 and data2(c) <= D5-0.5 then
ExitLong("bx5",OnClose,def,"",1,1);
}
즐거운 하루되세요
> huhboo99 님이 쓴 글입니다.
> 제목 : 감사합니다.
> 감사합니다.
옵션손절매가 선물변동에 따라 이루지는 수식은 어떻게 되는지요?
(진입시 피라미딩 적용, 각각의 진입시점보다 선물 0.5P 변동시 각각손절)
감사합니다.
다음글
이전글