커뮤니티
문의
2008-09-03 07:13:17
732
글번호 16901
항상 친절한 답변 감사드립니다
var : Bcount(0),Scount(0);
Bcount = 0;
SCount = 0 ;
for Value1 = 0 to 10 {
if EntryDate( Value1 ) == sdate and MarketPosition(value1) == 1 then
BCount = BCount + 1;
if EntryDate( Value1 ) == sdate and MarketPosition(value1) == -1 then
SCount = SCount + 1;
}
if dayindex() > 0 and Scount < 3 Then{
if accumn(iff(crossdown(C,dayopen()-2),1,0),dayindex()) >= 1 and
accumn(iff(crossup(C,daylow()+1),1,0),dayindex()) >= 1 and
mro(crossdown(C,dayopen()-2),dayindex(),1) > mro(crossup(C,daylow()+1),dayindex(),1) and
crossdown(c,daylow()[1]) Then
sell();
}
if dayindex() > 0 and Bcount < 3 Then{
if accumn(iff(crossdown(C,dayopen()-2),1,0),dayindex()) >= 1 and
accumn(iff(crossup(C,daylow()+1),1,0),dayindex()) == 0 and
crossdown(c,daylow()[1]) Then
buy();
}
상기수식을 Data2에두고
data1에서 매매하는 수식으로 전환도 가능한가요?
미리 감사드립니다
답변 1
예스스탁 예스스탁 답변
2008-09-03 09:04:15
안녕하세요
예스스탁입니다.
식을 data2를 참조하여 data1을 매매하는 식으로 변경했습니다.
진입횟수는 실제 진입되는 종목과 관계되므로 변경하지 않았습니다.
주종목과 타종목을 같은 주기로 사용하시기 바랍니다.
var : Bcount(0),Scount(0);
Bcount = 0;
SCount = 0 ;
for Value1 = 0 to 10 {
if EntryDate( Value1 ) == sdate and MarketPosition(value1) == 1 then
BCount = BCount + 1;
if EntryDate( Value1 ) == sdate and MarketPosition(value1) == -1 then
SCount = SCount + 1;
}
if data2(stime) > 90000 and Scount < 3 Then{
if accumn(iff(crossdown(data2(C),data2(openD(0))-2),1,0),data2(dayindex)) >= 1 and
accumn(iff(crossup(data2(C),data2(lowD(0))+1),1,0),data2(dayindex)) >= 1 and
mro(crossdown(data2(C),data2(openD(0))-2),data2(dayindex),1) >
mro(crossup(data2(C),data2(lowD(0))+1),data2(dayindex),1) and
crossdown(data2(c),data2(lowD(0)[1])) Then
sell();
}
if Data2(stime) > 90000 and Bcount < 3 Then{
if accumn(iff(crossdown(data2(C),data2(openD(0))-2),1,0),data2(dayindex)) >= 1 and
accumn(iff(crossup(data2(C),data2(lowD(0))+1),1,0),data2(dayindex)) == 0 and
crossdown(data2(c),data2(lowD(0)[1])) Then
buy();
}
즐거운 하루되세요
> 주식달인 님이 쓴 글입니다.
> 제목 : 문의
> 항상 친절한 답변 감사드립니다
var : Bcount(0),Scount(0);
Bcount = 0;
SCount = 0 ;
for Value1 = 0 to 10 {
if EntryDate( Value1 ) == sdate and MarketPosition(value1) == 1 then
BCount = BCount + 1;
if EntryDate( Value1 ) == sdate and MarketPosition(value1) == -1 then
SCount = SCount + 1;
}
if dayindex() > 0 and Scount < 3 Then{
if accumn(iff(crossdown(C,dayopen()-2),1,0),dayindex()) >= 1 and
accumn(iff(crossup(C,daylow()+1),1,0),dayindex()) >= 1 and
mro(crossdown(C,dayopen()-2),dayindex(),1) > mro(crossup(C,daylow()+1),dayindex(),1) and
crossdown(c,daylow()[1]) Then
sell();
}
if dayindex() > 0 and Bcount < 3 Then{
if accumn(iff(crossdown(C,dayopen()-2),1,0),dayindex()) >= 1 and
accumn(iff(crossup(C,daylow()+1),1,0),dayindex()) == 0 and
crossdown(c,daylow()[1]) Then
buy();
}
상기수식을 Data2에두고
data1에서 매매하는 수식으로 전환도 가능한가요?
미리 감사드립니다
이전글