안녕하세요?
1. 값이 "0"으로 출력됩니다
var : sg(0);
if sTime == 113000 Then
sg = Open;
plot1(sg);
안녕하세요
예스스탁입니다.
변수에 값을 저장하면 이후 변경될때 까지 유지됩니다.
아래와 같이만 작성하시면 됩니다.
var : sg(0);
if sTime == 113000 Then
sg = Open;
plot1(sg);
즐거운 하루되세요
2. 잘 사용중인데 수정 부탁드립니다
당초 : 매일 10~12 중 고저가 차이를 20일간 어레이에 저장
변경 : 매일 10~12 중 고가와 10시시가 차이를 20일간 어레이에 저장
input : StartTime(100000),MidTime(120000),EndTime(220000);
var : Tcond(False),cnt(0),hh(0),ll(0);
Array : HL[100](0);
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
For cnt = 99 downto 1
{
HL[cnt] = HL[cnt-1];
}
hh = h;
ll = l;
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
}
if Tcond == true Then
{
if h > hh Then
hh = h;
if l < ll Then
ll = l;
HL[0] = hh-ll;
}
즐거운 하루되세요
답변 1
예스스탁
예스스탁 답변
2023-08-30 09:13:42
안녕하세요
예스스탁입니다.
1
첨부된 그림과 같이 값이 출력되고 있습니다.
선물 1분봉 차트입니다.
지표를 적용한 차트에 아래 지표 적용해서
stime으로 113000봉이 있는지 확인하시기 바랍니다.
plot1(stime);
봉의 시간이 특정시간이라고 지정하면 차트는 분봉이어야 하고
봉의 조회갯수나 분주기별로 stime으로 113000봉이 없을 수 있습니다.
또한 틱봉의 경우 체결건수로 N개씩 구분해 봉을 만들므로
해당 시간의 봉이 없을 수 있습니다.
정확히 특정시간 봉이 아닌
113000이후의 첫봉을 지정하시려면 수식을 아래와 같이 작성하셔야 합니다.
var : sg(0);
if (sdate != sdate[1] and stime >= 113000) or
(sdate == sdate[1] and stime >= 113000 and stime[1] < 113000) Then
sg = Open;
plot1(sg);
2
input : StartTime(100000),MidTime(120000),EndTime(220000);
var : Tcond(False),cnt(0),hh(0),OO(0);
Array : HL[100](0);
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
For cnt = 99 downto 1
{
HL[cnt] = HL[cnt-1];
}
hh = h;
OO = O;
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
}
if Tcond == true Then
{
if h > hh Then
hh = h;
HL[0] = hh-OO;
Plot1(HL[0]);
}
즐거운 하루되세요
> 코퍼 님이 쓴 글입니다.
> 제목 : 변수저장, array
> 안녕하세요?
1. 값이 "0"으로 출력됩니다
var : sg(0);
if sTime == 113000 Then
sg = Open;
plot1(sg);
안녕하세요
예스스탁입니다.
변수에 값을 저장하면 이후 변경될때 까지 유지됩니다.
아래와 같이만 작성하시면 됩니다.
var : sg(0);
if sTime == 113000 Then
sg = Open;
plot1(sg);
즐거운 하루되세요
2. 잘 사용중인데 수정 부탁드립니다
당초 : 매일 10~12 중 고저가 차이를 20일간 어레이에 저장
변경 : 매일 10~12 중 고가와 10시시가 차이를 20일간 어레이에 저장
input : StartTime(100000),MidTime(120000),EndTime(220000);
var : Tcond(False),cnt(0),hh(0),ll(0);
Array : HL[100](0);
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
For cnt = 99 downto 1
{
HL[cnt] = HL[cnt-1];
}
hh = h;
ll = l;
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
}
if Tcond == true Then
{
if h > hh Then
hh = h;
if l < ll Then
ll = l;
HL[0] = hh-ll;
}
즐거운 하루되세요