120분봉, 240분봉 완성 후 각 분봉의 중간값을 차트에 자동표시하는 수식 가능할까요?
답변 1
예스스탁
예스스탁 답변
2023-05-26 09:50:48
안녕하세요
예스스탁입니다.
input : 분1(120),분2(240);
var : S1(0),D1(0),TM(0),TF1(0),TF2(0);
var : h1(0),l1(0),h11(0),l11(0);
var : h2(0),l2(0),h21(0),l21(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF1 = TM%분1;
TF2 = TM%분2;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 분1 > 1 and TF1 < TF1[1]) or
(Bdate == Bdate[1] and 분1 > 1 and TM >= TM[1]+분1) or
(Bdate == Bdate[1] and 분1 == 1 and TM > TM[1]) Then
{
h1 = h;
l1 = l;
h11 = h1[1];
l11 = l1[1];
}
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 분2 > 1 and TF2 < TF2[1]) or
(Bdate == Bdate[1] and 분2 > 1 and TM >= TM[1]+분2) or
(Bdate == Bdate[1] and 분2 == 1 and TM > TM[1]) Then
{
h2 = h;
l2 = l;
h21 = h2[1];
l21 = l2[1];
}
if h1 > 0 and h > h1 Then
h1 = h;
if l1 > 0 and l < l1 Then
l1 = l;
if h2 > 0 and h > h2 Then
h2 = h;
if l2 > 0 and l < l2 Then
l2 = l;
if h11 > 0 and l11 > 0 Then
{
Plot1(h11);
Plot2(l11);
}
if h21 > 0 and l21 > 0 Then
{
Plot3(h21);
Plot4(l21);
}
}
즐거운 하루되세요
> 부활 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> 120분봉, 240분봉 완성 후 각 분봉의 중간값을 차트에 자동표시하는 수식 가능할까요?