커뮤니티
문의
2009-01-30 08:32:12
742
글번호 19869
안녕하세요?
아래식을 수정부탁드립니다.
아래식처럼 진입할경우
분할청산식이 작동하질 않습니다.
진입을 1회만 하게되면 작동하는데 아래식처럼 2회이상 진입하게 되면 작동을 안합니다.
2회이상진입해도 부놜청산 될수 있도록 부탁드립니다.
======================
input : N(10);
var : value(0);
var15 = date - int(date/100)*100;
var16 = DayOfWeek(date);
if var15 >= 8 and var15 <= 14 and
var16 == 4 then
value = 1;
else
value = 0;
#1.진입
If CurrentEntries < N and stime >= 090000 and stime < 130000 and c>daylow*1.1 and c>o then {
Buy("a1",OnClose,def,10);
}
#2.청산
if value == 1 then{
SetStopEndofday(144500);
}
Else
{
SetStopEndofday(150300);
}
#2.청산
if MarketPosition() == 1 Then{
if MarketPosition()[1] != 1 Then{
value1 = CurrentContracts();
var1 = int(value1*0.1);
var2 = value1-int(value1*0.1)*9;
}
if CurrentContracts == value1 and stime>=130000 and C < O Then{
exitlong("X1",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*1 and stime>=130000 and C < O Then{
exitlong("X2",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*2 and stime>=130000 and C < O Then{
exitlong("X3",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*3 and stime>=130000 and C < O Then{
exitlong("X4",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*4 and stime>=130000 and C < O Then{
exitlong("X5",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*5 and stime>=130000 and C < O Then{
exitlong("X6",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*6 and stime>=130000 and C < O Then{
exitlong("X7",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*7 and stime>=130000 and C < O Then{
exitlong("X8",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*8 and stime>=130000 and C < O Then{
exitlong("X9",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*9 and stime>=130000 and C < O Then{
exitlong("X10",OnClose,def,"",var2,1);
}
}
===========================
답변 1
예스스탁 예스스탁 답변
2009-01-30 11:05:03
안녕하세요
예스스탁입니다.
input : N(10);
var : value(0);
var15 = date - int(date/100)*100;
var16 = DayOfWeek(date);
if var15 >= 8 and var15 <= 14 and
var16 == 4 then
value = 1;
else
value = 0;
#1.진입
If CurrentEntries < N and stime >= 090000 and stime < 130000 and c>daylow*1.1 and c>o then {
Buy("a1",OnClose,def,10);
}
#2.청산
if value == 1 then{
SetStopEndofday(144500);
}
Else
{
SetStopEndofday(150300);
}
#2.청산
if MarketPosition() == 1 Then{
if CurrentContracts > CurrentContracts[1] Then{
value1 = CurrentContracts();
var1 = int(value1*0.1);
var2 = value1-int(value1*0.1)*9;
}
if CurrentContracts == value1 and stime>=130000 and C < O Then{
exitlong("X1",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*1 and stime>=130000 and C < O Then{
exitlong("X2",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*2 and stime>=130000 and C < O Then{
exitlong("X3",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*3 and stime>=130000 and C < O Then{
exitlong("X4",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*4 and stime>=130000 and C < O Then{
exitlong("X5",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*5 and stime>=130000 and C < O Then{
exitlong("X6",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*6 and stime>=130000 and C < O Then{
exitlong("X7",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*7 and stime>=130000 and C < O Then{
exitlong("X8",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*8 and stime>=130000 and C < O Then{
exitlong("X9",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*9 and stime>=130000 and C < O Then{
exitlong("X10",OnClose,def,"",var2,1);
}
}
즐거운 하루되세요
> 송아지 님이 쓴 글입니다.
> 제목 : 문의
> 안녕하세요?
아래식을 수정부탁드립니다.
아래식처럼 진입할경우
분할청산식이 작동하질 않습니다.
진입을 1회만 하게되면 작동하는데 아래식처럼 2회이상 진입하게 되면 작동을 안합니다.
2회이상진입해도 부놜청산 될수 있도록 부탁드립니다.
======================
input : N(10);
var : value(0);
var15 = date - int(date/100)*100;
var16 = DayOfWeek(date);
if var15 >= 8 and var15 <= 14 and
var16 == 4 then
value = 1;
else
value = 0;
#1.진입
If CurrentEntries < N and stime >= 090000 and stime < 130000 and c>daylow*1.1 and c>o then {
Buy("a1",OnClose,def,10);
}
#2.청산
if value == 1 then{
SetStopEndofday(144500);
}
Else
{
SetStopEndofday(150300);
}
#2.청산
if MarketPosition() == 1 Then{
if MarketPosition()[1] != 1 Then{
value1 = CurrentContracts();
var1 = int(value1*0.1);
var2 = value1-int(value1*0.1)*9;
}
if CurrentContracts == value1 and stime>=130000 and C < O Then{
exitlong("X1",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*1 and stime>=130000 and C < O Then{
exitlong("X2",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*2 and stime>=130000 and C < O Then{
exitlong("X3",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*3 and stime>=130000 and C < O Then{
exitlong("X4",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*4 and stime>=130000 and C < O Then{
exitlong("X5",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*5 and stime>=130000 and C < O Then{
exitlong("X6",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*6 and stime>=130000 and C < O Then{
exitlong("X7",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*7 and stime>=130000 and C < O Then{
exitlong("X8",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*8 and stime>=130000 and C < O Then{
exitlong("X9",OnClose,def,"",var1,1);
}
if CurrentContracts == value1-var1*9 and stime>=130000 and C < O Then{
exitlong("X10",OnClose,def,"",var2,1);
}
}
===========================
다음글
이전글