커뮤니티
부턱드립니다
2018-03-08 11:57:11
218
글번호 117232
아래 수식에서 하루전 또는 N일전의 수식부탁드립니다
input : 시작시간(173000),끝시간(183000);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
var1 = O;
var2 = H;
var3 = L;
var4 = C;
Condition1 = true;
}
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Condition1 = false;
if Condition1 == true then{
if H > var2 Then
var2 = H;
if L < var3 Then
var3 = L;
}
plot1(var1,"시가");
plot2(var2,"고가");
plot3(var3,"저가");
plot4((var2+var3)/2,"중가");
plot5(var4,"close종가");
답변 1
예스스탁 예스스탁 답변
2018-03-09 10:23:10
안녕하세요
예스스탁입니다.
input : 시작시간(173000),끝시간(183000),n(5);
var : cnt(0);
Array : OO[50](0),HH[50](0),LL[50](0),CC[50](0);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Condition1 = true;
OO[0] = O;
HH[0] = H;
LL[0] = L;
for cnt = 1 to 49{
OO[cnt] = OO[cnt-1][1];
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
CC[cnt] = CC[cnt-1][1];
}
}
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Condition1 = false;
if Condition1 == true then{
if H > HH[0] Then
HH[0] = H;
if L < LL[0] Then
LL[0] = L;
CC[0] = C;
}
if OO[n] > 0 then{
plot1(OO[n],"시가");
plot2(HH[n],"고가");
plot3(LL[n],"저가");
plot4((HH[n]+LL[n])/2,"중가");
plot5(CC[n],"close종가");
}
즐거운 하루되세요
> 마르뚝 님이 쓴 글입니다.
> 제목 : 부턱드립니다
> 아래 수식에서 하루전 또는 N일전의 수식부탁드립니다
input : 시작시간(173000),끝시간(183000);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
var1 = O;
var2 = H;
var3 = L;
var4 = C;
Condition1 = true;
}
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Condition1 = false;
if Condition1 == true then{
if H > var2 Then
var2 = H;
if L < var3 Then
var3 = L;
}
plot1(var1,"시가");
plot2(var2,"고가");
plot3(var3,"저가");
plot4((var2+var3)/2,"중가");
plot5(var4,"close종가");