커뮤니티
질문드립니다.
2011-10-21 10:33:35
453
글번호 43953
if MaxEntries == 3 Then{
if CurrentContracts == MaxContracts Then
ExitLong("3차1반절",atlimit,(EntryPrice*0.92)*1.06,"",value11,1);
if CurrentContracts < MaxContracts and highest(H,BarsSinceEntry) >= (EntryPrice*0.92)*1.06 Then
exitlong("3차1익절",AtStop,(EntryPrice*0.92)*1.041);
분봉에서 적용되는 식의 일부분이구요.
6%까지 오른후 일정량이 매도되고
6%에서 다시 4.1% 까지 떨어지면 전부 매도되는걸 예상하고 만든건데요..
6%에서 일정량이 매도된후 다시 4.1%까지 떨어져야 매되되는게 아니라
6%일정량 매도후 몇틱움직이다가 전체 "3차1익절" 일어납니다.
어디를 수정해야 하나요?
답변 1
예스스탁 예스스탁 답변
2011-10-21 13:28:04
안녕하세요
예스스탁입니다.
올리신 내용만으로는 수정할 곳이 없어 보입니다.
임의로 식을 만들어 테스트한 결과
첨부된 그림과 같이 정상적으로 청산이 됩니다.
종목은 강원랜드입니다.
테스트한 식은 아래와 같습니다.
진입은 임의로 3번 진입하게 만들었으며
"3차1반절"의 value1은 정확한 산식을 몰라 2로 대체했습니다.
if sdate >= 20110823 and MarketPosition == 0 and crossup(c,ma(c,20)) Then
buy("b1",OnClose,def,2);
if MarketPosition == 1 and CurrentEntries == 1 Then
buy("b2",atlimit,(EntryPrice*0.96),1);
if MarketPosition == 1 and CurrentEntries == 2 Then
buy("b3",atlimit,(EntryPrice*0.92),1);
if MaxEntries == 3 Then{
if CurrentContracts == MaxContracts Then
ExitLong("3차1반절",atlimit,(EntryPrice*0.92)*1.06,"",2,1);
if CurrentContracts < MaxContracts and highest(H,BarsSinceEntry) >= (EntryPrice*0.92)*1.06 Then
exitlong("3차1익절",AtStop,(EntryPrice*0.92)*1.041);
}
즐거운 하루되세요
> 부자청년28 님이 쓴 글입니다.
> 제목 : 질문드립니다.
> if MaxEntries == 3 Then{
if CurrentContracts == MaxContracts Then
ExitLong("3차1반절",atlimit,(EntryPrice*0.92)*1.06,"",value11,1);
if CurrentContracts < MaxContracts and highest(H,BarsSinceEntry) >= (EntryPrice*0.92)*1.06 Then
exitlong("3차1익절",AtStop,(EntryPrice*0.92)*1.041);
분봉에서 적용되는 식의 일부분이구요.
6%까지 오른후 일정량이 매도되고
6%에서 다시 4.1% 까지 떨어지면 전부 매도되는걸 예상하고 만든건데요..
6%에서 일정량이 매도된후 다시 4.1%까지 떨어져야 매되되는게 아니라
6%일정량 매도후 몇틱움직이다가 전체 "3차1익절" 일어납니다.
어디를 수정해야 하나요?
다음글