커뮤니티
문의 드립니다.
2012-04-15 14:03:39
288
글번호 50050
안녕하십니까!
- 진입
. 1차 매수 50% : 5 > 20 이평선
. 2차 매수 50% : 5 > 60 이평선
- 청산
. 1차 청산 50% : 5 < 10 이평선
. 2차 청산 50% : 5 < 50 이평선
- 재진입 50% : 1차 청산후 5 > 20 및 5 > 60 이평선 상태
감사합니다.
답변 1
예스스탁 예스스탁 답변
2012-04-16 11:43:03
안녕하세요
예스스탁입니다.
input : 투입금액(6000000);
var : ma5(0),ma10(0),ma20(0),ma50(0),ma60(0),vv(0);
if CodeCategory == 1 Then{ #코스피
if BasePrice < 50000 Then
Var1 = int(int((투입금액*0.5)/C)/10)*10;
Else
Var1 = int((투입금액*0.5)/C);
}
if CodeCategory == 2 Then#코스닥
Var1 = int((투입금액*0.5)/C);
if CodeCategory == 6 Then#옵션
Var1 = int((투입금액*0.5)/(C*BigPointValue));
ma5 = ma(c,5);
ma10 = ma(c,10);
ma20 = ma(c,20);
ma50 = ma(c,50);
ma60 = ma(c,60);
if MarketPosition == 0 and ma5 > ma20 Then
buy("b1",OnClose,def,var1);
if MarketPosition == 1 and MaxEntries == 1 and ma5 > ma60 Then
buy("b2",OnClose,def,var1);
if MarketPosition == 1 Then{
if CurrentContracts > CurrentContracts[1] and CurrentEntries == 2 Then{
Condition1 = true;
vv = int(CurrentContracts*0.5);
}
if MaxEntries == 2 and CurrentContracts < CurrentContracts[1] Then
Condition1 = false;
if ma5 < ma10 and MaxEntries == 2 and Condition1 == true Then
ExitLong("bx1",OnClose,def,"",vv,1);
if ma5 < ma50 and MaxEntries == 2 and Condition1 == false Then
ExitLong("bx2");
if MaxEntries == 2 and CurrentEntries == 1 Then{
if ma5 > ma20 or ma5 > ma60 Then
buy("add",OnClose,def,var1);
}
}
피라미딩은 다른진입신호만 허용으로 설정하시고
적용하시기 바랍니다.
즐거운 하루되세요
> 아틀라스 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> 안녕하십니까!
- 진입
. 1차 매수 50% : 5 > 20 이평선
. 2차 매수 50% : 5 > 60 이평선
- 청산
. 1차 청산 50% : 5 < 10 이평선
. 2차 청산 50% : 5 < 50 이평선
- 재진입 50% : 1차 청산후 5 > 20 및 5 > 60 이평선 상태
감사합니다.
이전글