커뮤니티
질문입니다....
2013-11-23 20:13:38
199
글번호 69780
오류가 납니다..
제 실력으로는 수정이 안됩니다.
감사합니다.
Input : Period(15), Period1(5), Period2(5);
value1 = StochasticsK(Period,Period1);
value2 = StochasticsD(Period,Period1,Period2);
# 매도/매수 1회로 제한
var : count(0),cnt(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if CrossUp(value1,value1) Then{
var1 = c;
var2 = index;
}
#당일 1회, 0910 이후~14시 00까지
if count < 1 and stime >= 091000 and stime < 140000 and index >= var2 and index < var2+3 and var2 > 0 Then
Buy("b1",atlimit,var1-PriceScale*5) and index == var2+3 Then
buy("b2");
}
답변 1
예스스탁 예스스탁 답변
2013-11-26 14:47:04
안녕하세요
예스스탁입니다.
조건식은 if문에 들어가야 합니다
실행문 뒤에 and로 조건문이 들어갈수 없습니다.
Input : Period(15), Period1(5), Period2(5);
value1 = StochasticsK(Period,Period1);
value2 = StochasticsD(Period,Period1,Period2);
# 매도/매수 1회로 제한
var : count(0),cnt(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if CrossUp(value1,value1) Then{
var1 = c;
var2 = index;
}
#당일 1회, 0910 이후~14시 00까지
if count < 1 and stime >= 091000 and stime < 140000 and
index >= var2 and index < var2+3 and var2 > 0 and index == var2+3 Then{
Buy("b1",atlimit,var1-PriceScale*5);
buy("b2");
}
즐거운 하루되세요
> HI_pj*** 님이 쓴 글입니다.
> 제목 : 질문입니다....
> 오류가 납니다..
제 실력으로는 수정이 안됩니다.
감사합니다.
Input : Period(15), Period1(5), Period2(5);
value1 = StochasticsK(Period,Period1);
value2 = StochasticsD(Period,Period1,Period2);
# 매도/매수 1회로 제한
var : count(0),cnt(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if CrossUp(value1,value1) Then{
var1 = c;
var2 = index;
}
#당일 1회, 0910 이후~14시 00까지
if count < 1 and stime >= 091000 and stime < 140000 and index >= var2 and index < var2+3 and var2 > 0 Then
Buy("b1",atlimit,var1-PriceScale*5) and index == var2+3 Then
buy("b2");
}
다음글