커뮤니티
검토부탁드립니다.
2016-12-23 11:23:56
115
글번호 105234
안녕하세요.
아래 수식은 어제 작성해주신 것인데요.
이것을 특정날짜를 기준으로 바꾸고 싶어서 해보았는데 잘안되네요.
var : AA(0),BB(0),CC(0),DD(0);
AA = AccumN(V,10);
BB = AA[10];
CC = AA[20];
DD = AA[30];
var1 = ma(C,5);
var2 = ma(c,10);
Condition1 = C > var1 and C > O and C <= O*1.25 and AA > BB*1.55;
Condition2 = C > var1 and C > O and C <= O*1.30 and AA > BB*1.50 and AA > CC*1.7;
Condition3 = C > var1 and C > var2 and C > O and C <= O*1.35 and AA > BB*1.50 and AA > CC*1.7 and AA > CC*2.1;
if Condition1 == true or Condition2 == true or Condition3 == true Then
find(1);
위 수식을 아래와 같이 하면 아무것도 검색이 안됩니다.
어디가 잘못된것인가요?
input : ndate(20141201);
var : AA(0),BB(0),CC(0),DD(0);
AA = AccumN(V,10);
BB = AA[10];
CC = AA[20];
DD = AA[30];
var1 = ma(C,5);
var2 = ma(c,10);
Condition1 = C > var1 and C > O and C <= O*1.25 and AA > BB*1.55;
Condition2 = C > var1 and C > O and C <= O*1.30 and AA > BB*1.50 and AA > CC*1.7;
Condition3 = C > var1 and C > var2 and C > O and C <= O*1.35 and AA > BB*1.50 and AA > CC*1.7 and AA > CC*2.1;
if sdate == ndate and
(Condition1 == true or Condition2 == true or Condition3 == true) Then
find(1);
답변 1
예스스탁 예스스탁 답변
2016-12-23 13:46:44
안녕하세요
예스스탁입니다.
현재시점에서 이전의 특정일을 고르시게 해야 합니다.
작성하신 내용은 오늘이 20141201이라는 의미입니다.
오늘이 ndate가 아니므로 검색이 되지 않는 것입니다.
input : ndate(20141201);
var : AA(0),BB(0),CC(0),DD(0);
AA = AccumN(V,10);
BB = AA[10];
CC = AA[20];
DD = AA[30];
var1 = ma(C,5);
var2 = ma(c,10);
Condition1 = C > var1 and C > O and C <= O*1.25 and AA > BB*1.55;
Condition2 = C > var1 and C > O and C <= O*1.30 and AA > BB*1.50 and AA > CC*1.7;
Condition3 = C > var1 and C > var2 and C > O and C <= O*1.35 and AA > BB*1.50 and AA > CC*1.7 and AA > CC*2.1;
#지정한 날짜에 3개 중 1개라도 만족하면 Condition4는 true
if sdate == ndate and
(Condition1 == true or Condition2 == true or Condition3 == true) Then
Condition4 = true;
#Condition4에 true가 저장된 종목을 검색
if Condition4 == true Then
find(1);
즐거운 하루되세요
> 강태공3 님이 쓴 글입니다.
> 제목 : 검토부탁드립니다.
> 안녕하세요.
아래 수식은 어제 작성해주신 것인데요.
이것을 특정날짜를 기준으로 바꾸고 싶어서 해보았는데 잘안되네요.
var : AA(0),BB(0),CC(0),DD(0);
AA = AccumN(V,10);
BB = AA[10];
CC = AA[20];
DD = AA[30];
var1 = ma(C,5);
var2 = ma(c,10);
Condition1 = C > var1 and C > O and C <= O*1.25 and AA > BB*1.55;
Condition2 = C > var1 and C > O and C <= O*1.30 and AA > BB*1.50 and AA > CC*1.7;
Condition3 = C > var1 and C > var2 and C > O and C <= O*1.35 and AA > BB*1.50 and AA > CC*1.7 and AA > CC*2.1;
if Condition1 == true or Condition2 == true or Condition3 == true Then
find(1);
위 수식을 아래와 같이 하면 아무것도 검색이 안됩니다.
어디가 잘못된것인가요?
input : ndate(20141201);
var : AA(0),BB(0),CC(0),DD(0);
AA = AccumN(V,10);
BB = AA[10];
CC = AA[20];
DD = AA[30];
var1 = ma(C,5);
var2 = ma(c,10);
Condition1 = C > var1 and C > O and C <= O*1.25 and AA > BB*1.55;
Condition2 = C > var1 and C > O and C <= O*1.30 and AA > BB*1.50 and AA > CC*1.7;
Condition3 = C > var1 and C > var2 and C > O and C <= O*1.35 and AA > BB*1.50 and AA > CC*1.7 and AA > CC*2.1;
if sdate == ndate and
(Condition1 == true or Condition2 == true or Condition3 == true) Then
find(1);