커뮤니티
저점가격 정렬
2009-04-13 23:15:14
1111
글번호 21666
수고 많으십니다
문의번호 8798의 내용은 아래와 같습니다
저의 질문은 고점가격을 높은 순서가 아닌 저점가격을 낮은 순서로 정렬을 하고자하면
어떻게 해야 하나요, 아래 예에서 80, 90, 100, 110 이렇게 정렬하는 것을 의미합니다.
== 아래 ==
안녕하세요
예스스탁입니다.
input :left(3),right(3);
var : tempi2(0),tempmax(0),tempi(0),tempIndex(0);
array : SH[11](0),NTHVALUE[11](0);
SH[1] = SwingHigh(1,h,Left,right,dayindex()+1);
SH[2] = SwingHigh(2,h,Left,right,dayindex()+1);
SH[3] = SwingHigh(3,h,Left,right,dayindex()+1);
SH[4] = SwingHigh(4,h,Left,right,dayindex()+1);
SH[5] = SwingHigh(5,h,Left,right,dayindex()+1);
SH[6] = SwingHigh(6,h,Left,right,dayindex()+1);
SH[7] = SwingHigh(7,h,Left,right,dayindex()+1);
SH[8] = SwingHigh(8,h,Left,right,dayindex()+1);
SH[9] = SwingHigh(9,h,Left,right,dayindex()+1);
SH[10] = SwingHigh(10,h,Left,right,dayindex()+1);
For tempi2 = 1 to 10
{
tempmax = -99999999;
For tempi = 1 to 10
{
if ( tempmax < SH[tempi] ) then
{
tempmax = SH[tempi];
tempIndex = tempi;
}
}
NTHVALUE[tempi2] = tempmax;
SH[tempIndex] = -99999999;
}
plot1(NTHVALUE[1]);
plot2(NTHVALUE[2]);
plot3(NTHVALUE[3]);
plot4(NTHVALUE[4]);
plot5(NTHVALUE[5]);
plot6(NTHVALUE[6]);
plot7(NTHVALUE[7]);
plot8(NTHVALUE[8]);
plot9(NTHVALUE[9]);
plot10(NTHVALUE[10]);
총 당일 15개 까지 정렬하여 보여드립니다.
즐거운 하루되세요
> 불나는오리 님이 쓴 글입니다.
> 제목 : 당일 고점의 가격 정렬
> SwingHigh와 같은 것으로 그때 그때 고점을 알 수 있었는데..
이것을 당일부터 현재시점까지
고점이 생성되었을 경우의 순서(높은값부터~낮은값 순서대로)적인 값을 알고 싶습니다.
예를 들면,
오늘 시장이 시작되고 12시가 된 시점에서 SwingHigh로 나온 값들이
90, 100, 110, 80 이렇게 나왔을때...
가장 높은 값은 110
둘째는 100
셋째는 90
넷째는 80
이렇게 얻어오는 방법을 알고 싶습니다.
수고하세요.
답변 1
예스스탁 예스스탁 답변
2009-04-14 10:55:25
안녕하세요
예스스탁입니다.
input :left(3),right(3);
var : tempi2(0),tempmin(0),tempi(0),tempIndex(0);
array : SL[11](0),NTHVALUE[11](0);
SL[1] = Swinglow(1,L,Left,right,dayindex()+1);
SL[2] = SwingLow(2,L,Left,right,dayindex()+1);
SL[3] = SwingLow(3,L,Left,right,dayindex()+1);
SL[4] = SwingLow(4,L,Left,right,dayindex()+1);
SL[5] = SwingLow(5,L,Left,right,dayindex()+1);
SL[6] = SwingLow(6,L,Left,right,dayindex()+1);
SL[7] = SwingLow(7,L,Left,right,dayindex()+1);
SL[8] = SwingLow(8,L,Left,right,dayindex()+1);
SL[9] = SwingLow(9,L,Left,right,dayindex()+1);
SL[10] = SwingLow(10,L,Left,right,dayindex()+1);
For tempi2 = 1 to 10
{
tempmin = 99999999;
For tempi = 1 to 10
{
if ( tempmin > SL[tempi] ) then
{
tempmin = SL[tempi];
tempIndex = tempi;
}
}
NTHVALUE[tempi2] = tempmin;
SL[tempIndex] = 99999999;
}
plot1(NTHVALUE[1]);
plot2(NTHVALUE[2]);
plot3(NTHVALUE[3]);
plot4(NTHVALUE[4]);
plot5(NTHVALUE[5]);
plot6(NTHVALUE[6]);
plot7(NTHVALUE[7]);
plot8(NTHVALUE[8]);
plot9(NTHVALUE[9]);
plot10(NTHVALUE[10]);
즐거운 하루되세요
> HI_coco 님이 쓴 글입니다.
> 제목 : 저점가격 정렬
> 수고 많으십니다
문의번호 8798의 내용은 아래와 같습니다
저의 질문은 고점가격을 높은 순서가 아닌 저점가격을 낮은 순서로 정렬을 하고자하면
어떻게 해야 하나요, 아래 예에서 80, 90, 100, 110 이렇게 정렬하는 것을 의미합니다.
== 아래 ==
안녕하세요
예스스탁입니다.
input :left(3),right(3);
var : tempi2(0),tempmax(0),tempi(0),tempIndex(0);
array : SH[11](0),NTHVALUE[11](0);
SH[1] = SwingHigh(1,h,Left,right,dayindex()+1);
SH[2] = SwingHigh(2,h,Left,right,dayindex()+1);
SH[3] = SwingHigh(3,h,Left,right,dayindex()+1);
SH[4] = SwingHigh(4,h,Left,right,dayindex()+1);
SH[5] = SwingHigh(5,h,Left,right,dayindex()+1);
SH[6] = SwingHigh(6,h,Left,right,dayindex()+1);
SH[7] = SwingHigh(7,h,Left,right,dayindex()+1);
SH[8] = SwingHigh(8,h,Left,right,dayindex()+1);
SH[9] = SwingHigh(9,h,Left,right,dayindex()+1);
SH[10] = SwingHigh(10,h,Left,right,dayindex()+1);
For tempi2 = 1 to 10
{
tempmax = -99999999;
For tempi = 1 to 10
{
if ( tempmax < SH[tempi] ) then
{
tempmax = SH[tempi];
tempIndex = tempi;
}
}
NTHVALUE[tempi2] = tempmax;
SH[tempIndex] = -99999999;
}
plot1(NTHVALUE[1]);
plot2(NTHVALUE[2]);
plot3(NTHVALUE[3]);
plot4(NTHVALUE[4]);
plot5(NTHVALUE[5]);
plot6(NTHVALUE[6]);
plot7(NTHVALUE[7]);
plot8(NTHVALUE[8]);
plot9(NTHVALUE[9]);
plot10(NTHVALUE[10]);
총 당일 15개 까지 정렬하여 보여드립니다.
즐거운 하루되세요
> 불나는오리 님이 쓴 글입니다.
> 제목 : 당일 고점의 가격 정렬
> SwingHigh와 같은 것으로 그때 그때 고점을 알 수 있었는데..
이것을 당일부터 현재시점까지
고점이 생성되었을 경우의 순서(높은값부터~낮은값 순서대로)적인 값을 알고 싶습니다.
예를 들면,
오늘 시장이 시작되고 12시가 된 시점에서 SwingHigh로 나온 값들이
90, 100, 110, 80 이렇게 나왔을때...
가장 높은 값은 110
둘째는 100
셋째는 90
넷째는 80
이렇게 얻어오는 방법을 알고 싶습니다.
수고하세요.