-분봉차트에서 현재 시간(예: 17시) 기준하여 특정기한(예:특정기한이 5일간이라면 7일전 17시부터 2일전 16시59분59초까지)의 최고가, 최저가를 나타내는 지표를 부탁드립니다.
답변 1
예스스탁
예스스탁 답변
2020-04-20 11:50:11
안녕하세요
예스스탁입니다.
input : n1(2),n2(7);
var : cnt(0),T(0),hh(0),ll(0),Tcond(false);
Array : dd[100](0);
if sdate != sdate[1] then
{
dd[0] = sdate;
for cnt = 1 to 99
{
dd[cnt] = dd[cnt-1][1];
}
}
hh = 0;
ll = 0;
T = 0;
for cnt = 0 to index
{
if t == 0 and sdate[cnt] == dd[n1] and stime[cnt] <= stime Then
{
T = 1;
}
if T == 1 and sdate[cnt] == dd[n2] and stime[cnt] <= stime Then
{
T = 2;
cnt = index+1;
}
if T == 1 then
{
if hh == 0 or (hh > 0 and h[cnt] > hh) Then
hh = h[cnt];
if ll == 0 or (ll > 0 and l[cnt] < ll) Then
ll = l[cnt];
}
}
plot1(hh);
plot2(ll);
즐거운 하루되세요
> 예시 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> -분봉차트에서 현재 시간(예: 17시) 기준하여 특정기한(예:특정기한이 5일간이라면 7일전 17시부터 2일전 16시59분59초까지)의 최고가, 최저가를 나타내는 지표를 부탁드립니다.