현재 시간이 3시일 경우
1시~2시 고가=H1
1시~2시 저가=L1
2시~3시 고가=H2
2시~3시 저가=L2
H2-(H1-L1)을 구한다
L2+(H1-L1)을 구한다
감사합니다
답변 2
예스스탁
예스스탁 답변
2023-12-06 14:12:39
안녕하세요
예스스탁입니다.
input : time1(130000),Time2(140000),time3(150000);
var : T(0),H1(0),L1(0),H2(0),L2(0);
if bdate != Bdate[1] Then
T = 0;
if (sdate != sdate[1] and stime >= time1) or
(sdate == sdate[1] and stime >= time1 and stime[1] < time1) Then
{
T = 1;
H1 = H;
L1 = L;
}
if (sdate != sdate[1] and stime >= Time2) or
(sdate == sdate[1] and stime >= Time2 and stime[1] < Time2) Then
{
T = 2;
H2 = H;
L2 = L;
}
if (sdate != sdate[1] and stime >= Time3) or
(sdate == sdate[1] and stime >= Time3 and stime[1] < Time3) Then
{
T = 3;
}
if T == 1 then
{
if H > h1 Then
h1 = h;
if l < l1 Then
l1 = l;
}
if T == 2 then
{
if H > h2 Then
h2 = h;
if l < l2 Then
l2 = l;
}
if T == 3 Then
{
value1 = H2-(H1-L1);
value2 = L2+(H1-L1);
Plot1(value1);
Plot2(value2);
}
Else
{
NoPlot(1);
NoPlot(2);
}
즐거운 하루되세요
> para 님이 쓴 글입니다.
> 제목 : 지표 질문입니다
> 현재 시간이 3시일 경우
1시~2시 고가=H1
1시~2시 저가=L1
2시~3시 고가=H2
2시~3시 저가=L2
H2-(H1-L1)을 구한다
L2+(H1-L1)을 구한다
감사합니다