예스스탁
예스스탁 답변
2021-02-10 13:27:35
안녕하세요
예스스탁입니다.
1
날짜값은 8자리숫자입니다.
그래서 해당값에 180을 더해도 180일 뒤가 되지 않습니다.
20151001+180 = 20151181
날짜를 줄리안데이트를 변경해서 180일 뒤를 지정하셔야 합니다.
줄리안데이트는 1900년1월1일 이후에 경과된 일수로 DateToJulian함수로 변환할 수 있습니다.
2
for num1 = 9 to 1
초기값보다 종료값이 작으면 downto입니다.
for num1 = 9 downto 1
3
속성에서 그래프 종류를 점이나 일자그래프와 같이
이전지점과 연결되지 않은 종류로 지정하시기 바랍니다.
var : cond1(False), num1(0);
Array : hlines[10](0), dates[10](0);
cond1 = (H - MAX(C,O)) / (MAX(C,O) - L) > 1.5 && H / C[1] > 1.1 &&
v > ma(v[1], 5) * 3;
if cond1 == true Then
{
for num1 = 9 downto 1
{
hlines[num1] = hlines[num1-1];
dates[num1] = dates[num1-1];
}
hlines[0] = H;
dates[0] = DateToJulian(sdate);
}
if hlines[0] > 0 and dates[0]+180 >= DateToJulian(sdate) then plot1(hlines[0],"1");
if hlines[1] > 0 and dates[1]+180 >= DateToJulian(sdate) then plot2(hlines[1],"2");
if hlines[2] > 0 and dates[2]+180 >= DateToJulian(sdate) then plot3(hlines[2],"3");
if hlines[3] > 0 and dates[3]+180 >= DateToJulian(sdate) then plot4(hlines[3],"4");
if hlines[4] > 0 and dates[4]+180 >= DateToJulian(sdate) then plot5(hlines[4],"5");
if hlines[5] > 0 and dates[5]+180 >= DateToJulian(sdate) then plot6(hlines[5],"6");
if hlines[6] > 0 and dates[6]+180 >= DateToJulian(sdate) then plot7(hlines[6],"7");
if hlines[7] > 0 and dates[7]+180 >= DateToJulian(sdate) then plot8(hlines[7],"8");
if hlines[8] > 0 and dates[8]+180 >= DateToJulian(sdate) then plot9(hlines[8],"9");
if hlines[9] > 0 and dates[9]+180 >= DateToJulian(sdate) then plot10(hlines[9],"10");
즐거운 하루되세요
> 혁신가 님이 쓴 글입니다.
> 제목 : 차트에 선 긋기
> 안녕하세요.
차트에서 특정한 일자에 발생한 고가를 각각에 대해서
그 발생한 일자로 부터 180일간 동안 직선 가격선을 긋고 싶은데 어떻게 하면 될까요?
var : cond1(False), num1(0);
Array : hlines[10](0), dates[10](0);
cond1 =
(H - MAX(C,O)) / (MAX(C,O) - L) > 1.5 && H / C[1] > 1.1 &&
v > ma(v[1], 5) * 3;
if cond1 == true Then {
for num1 = 9 to 1 {
hlines[num1] = hlines[num1-1];
dates[num1] = dates[num1-1];
}
hlines[0] = H;
dates[0] = sdate;
}
if dates[0]+180 < sdate then plot1(hlines[0],"1");
if dates[1]+180 < sdate then plot2(hlines[1],"2");
if dates[2]+180 < sdate then plot3(hlines[2],"3");
if dates[3]+180 < sdate then plot4(hlines[3],"4");
if dates[4]+180 < sdate then plot5(hlines[4],"5");
if dates[5]+180 < sdate then plot6(hlines[5],"6");
if dates[6]+180 < sdate then plot7(hlines[6],"7");
if dates[7]+180 < sdate then plot8(hlines[7],"8");
if dates[8]+180 < sdate then plot9(hlines[8],"9");
if dates[9]+180 < sdate then plot10(hlines[9],"10");
바쁘실텐데, 감사합니다.