커뮤니티
질문
2013-07-07 22:48:18
151
글번호 65087
input : 시작날짜(20130104);
var : cnt(0),count(0);
if sdate >= 시작날짜 and stime == 090500 Then{
if stime == 090500 Then{
if PositionProfit(1) >= 0 Then{
buy("b1",onclose,def,1);
}
Else{
count = 0;
for cnt = 1 to 4{
if PositionProfit(cnt) < 0 Then
count = count+1;
}
if count < 4 Then
buy("b21",onclose,def,var1*2);
if count == 4 Then
buy("b22",onclose,def,1);
}
}
}
if MarketPosition == 1 Then
var1 = CurrentContracts;
SetStopEndofday(144500);
위식은 손실시 마다 1.2.4.8주 씩 매수하다가 연속손실시 다시 1.2.3.4로 매수수량이
순환되는 식인데요 이것을
연속손실시 8.4.2.1주 씩 매수되도록 즉 위식을 1.2.4.8 매수 되는것을 8.4.2.1주 씩
매수 되도록 고쳐주세요
감사합니다.
답변 1
예스스탁 예스스탁 답변
2013-07-08 14:51:54
안녕하세요
예스스탁입니다.
input : 시작날짜(20130104);
var : cnt(0),count(0);
if sdate >= 시작날짜 and stime == 090500 Then{
if stime == 090500 Then{
if PositionProfit(1) >= 0 Then{
buy("b1",onclose,def,1);
}
Else{
count = 0;
for cnt = 4 downto 1{
if PositionProfit(cnt) < 0 Then
count = count+1;
Else
count = 0;
}
if count == 1 Then
buy("b21",onclose,def,8);
if count >= 2 Then
buy("b22",onclose,def,max(var1/2,1));
}
}
}
if MarketPosition == 1 Then
var1 = CurrentContracts;
SetStopEndofday(144500);
직전거래가 수익이 나면 1주
연속손실 1회는 8주
연속손실 2회는 4주
연속손실 3회는 2주
연속손실 4회 이상은 모두 1주입니다.
즐거운 하루되세요
> kcg9005 님이 쓴 글입니다.
> 제목 : 질문
> input : 시작날짜(20130104);
var : cnt(0),count(0);
if sdate >= 시작날짜 and stime == 090500 Then{
if stime == 090500 Then{
if PositionProfit(1) >= 0 Then{
buy("b1",onclose,def,1);
}
Else{
count = 0;
for cnt = 1 to 4{
if PositionProfit(cnt) < 0 Then
count = count+1;
}
if count < 4 Then
buy("b21",onclose,def,var1*2);
if count == 4 Then
buy("b22",onclose,def,1);
}
}
}
if MarketPosition == 1 Then
var1 = CurrentContracts;
SetStopEndofday(144500);
위식은 손실시 마다 1.2.4.8주 씩 매수하다가 연속손실시 다시 1.2.3.4로 매수수량이
순환되는 식인데요 이것을
연속손실시 8.4.2.1주 씩 매수되도록 즉 위식을 1.2.4.8 매수 되는것을 8.4.2.1주 씩
매수 되도록 고쳐주세요
감사합니다.
다음글
이전글