커뮤니티
질문입니다.
2006-05-18 07:31:55
1229
글번호 10004
안녕하세요... 예전에 답변 주신 N일전 특정시간대의 PRICE의 고가와 저가를 나타내는 사용자 함수입니다. 그런데 시간대가 090000을 입력하면 값이 나오질 않는 경우가 있습니다. 수정부탁드립니다.
#N일전 특정시간대의 PRICE의 고가
input : Price(Numeric),N(Numeric),time1(Numeric),time2(Numeric);
var : cnt(0);
array : value[7](0);
var1 = Price;
if date != date[1] then{
for cnt = 1 to 6
value[cnt] = value[cnt-1][1];
}
if stime < time1 then
value[0] = var1;
if stime >= time1 and stime <= time2 then{
if var1 > value[0] then
value[0] = var1;
}
_NtimeH1=value[N];
#N일전 특정시간대의 PRICE의 저가
input : Price(numeric),N(Numeric),time1(Numeric),time2(Numeric);
var : cnt(0);
array : value[7](0);
var1 = Price;
if date != date[1] then{
for cnt = 1 to 6
value[cnt] = value[cnt-1][1];
}
if stime < time1 then
value[0] = var1;
if stime >= time1 and stime <= time2 then{
if var1 < value[0] then
value[0] = var1;
}
_NtimeL1=value[N];
답변 1
예스스탁 예스스탁 답변
2006-05-18 14:42:42
안녕하세요
예스스탁입니다.
식을 수정했습니다.
#N일전 특정시간대의 PRICE의 고가
input : Price(Numeric),N(Numeric),time1(Numeric),time2(Numeric);
var : cnt(0);
array : value[7](0);
var1 = Price;
if date != date[1] then{
for cnt = 1 to 6
value[cnt] = value[cnt-1][1];
}
if stime <= time1 then
value[0] = var1;
if stime >= time1 and stime <= time2 then{
if var1 > value[0] then
value[0] = var1;
}
_NtimeH1=value[N];
#N일전 특정시간대의 PRICE의 저가
input : Price(numeric),N(Numeric),time1(Numeric),time2(Numeric);
var : cnt(0);
array : value[7](0);
var1 = Price;
if date != date[1] then{
for cnt = 1 to 6
value[cnt] = value[cnt-1][1];
}
if stime <= time1 then
value[0] = var1;
if stime >= time1 and stime <= time2 then{
if var1 < value[0] then
value[0] = var1;
}
_NtimeL1=value[N];
즐거운 하루되세요
> CJ_MINSUNG 님이 쓴 글입니다.
> 제목 : 질문입니다.
> 안녕하세요... 예전에 답변 주신 N일전 특정시간대의 PRICE의 고가와 저가를 나타내는 사용자 함수입니다. 그런데 시간대가 090000을 입력하면 값이 나오질 않는 경우가 있습니다. 수정부탁드립니다.
#N일전 특정시간대의 PRICE의 고가
input : Price(Numeric),N(Numeric),time1(Numeric),time2(Numeric);
var : cnt(0);
array : value[7](0);
var1 = Price;
if date != date[1] then{
for cnt = 1 to 6
value[cnt] = value[cnt-1][1];
}
if stime < time1 then
value[0] = var1;
if stime >= time1 and stime <= time2 then{
if var1 > value[0] then
value[0] = var1;
}
_NtimeH1=value[N];
#N일전 특정시간대의 PRICE의 저가
input : Price(numeric),N(Numeric),time1(Numeric),time2(Numeric);
var : cnt(0);
array : value[7](0);
var1 = Price;
if date != date[1] then{
for cnt = 1 to 6
value[cnt] = value[cnt-1][1];
}
if stime < time1 then
value[0] = var1;
if stime >= time1 and stime <= time2 then{
if var1 < value[0] then
value[0] = var1;
}
_NtimeL1=value[N];