커뮤니티
문의 드립니다.
2019-09-30 17:02:36
158
글번호 132374
안녕하세요.
수식 수정 문의드립니다.
아래 지표식을 주가지수 옵션에 적용하면 지표가 나타납니다.
그런데 weeklyoption에 적용하고 주가지수옵션처럼 상장일을 외부변수로 지정하면
지표가 차트에 나타나지 않습니다.
예를 들면
이번 주 weeklyoption 상장일인 9월 26일(목) 09:00로 외부변수를 지정하면
지표가 아예 사라집니다.
27일(금) 09:00로 지정하면 지표가 27일부터는 나타나고요.
수정 부탁드립니다.
많은 도움에 항상 감사드립니다.
=============================
input: p(1);
input : Startdate(2019000),StartnTime(090000);
input : Enddate(20191000),EndnTime(000000);
var: HH(0),LL(0),RR(0);
var : Tcond(false);
if sdate != sdate[1] Then
{
Condition1 = false;
if sdate >= startdate and sdate[1] < startdate then
{
Condition1 = true;
}
Condition2 = false;
if sdate >= Enddate and sdate[1] < Enddate then
{
Condition2 = true;
}
}
if Condition1 == true and
((sdate != sdate[1] and stime >= StartnTime) or
(sdate == sdate[1] and stime >= StartnTime and stime[1] < StartnTime)) Then
{
Tcond = true;
HH = H;
LL = L;
}
if Condition2 == true and
((sdate != sdate[1] and stime >= EndnTime) or
(sdate == sdate[1] and stime >= EndnTime and stime[1] < EndnTime)) Then
{
Tcond = false;
}
if Tcond == true then
{
if H > HH Then
HH = H;
if L < Ll Then
LL = L;
RR=HH-LL;
}
if HH > 0 and LL > 0 then
{
if P == 1 Then
{
plot1(HH,"근월물최고가");
plot2(HH,"근월물최저가");
}
Else{
plot3(HH,"근월물최고가");
plot4(LL,"근월물최저가");
}
}
답변 1
예스스탁 예스스탁 답변
2019-10-01 13:28:13
안녕하세요
예스스탁입니다.
input: p(1);
input : Startdate(20190926),StartnTime(090000);
input : Enddate(20191002),EndnTime(150000);
var: HH(0),LL(0),RR(0);
var : Tcond(false);
if index == 0 Then
{
Condition1 = false;
if sdate >= startdate then
{
Condition1 = true;
}
if Condition1 == true and stime >= StartnTime Then
{
Tcond = true;
HH = H;
LL = L;
}
}
if index > 0 and sdate != sdate[1] Then
{
Condition1 = false;
if sdate >= startdate and sdate[1] < startdate then
{
Condition1 = true;
}
Condition2 = false;
if sdate >= Enddate and sdate[1] < Enddate then
{
Condition2 = true;
}
}
if index > 0 and Condition1 == true and
((sdate != sdate[1] and stime >= StartnTime) or
(sdate == sdate[1] and stime >= StartnTime and stime[1] < StartnTime)) Then
{
Tcond = true;
HH = H;
LL = L;
}
if Condition2 == true and
((sdate != sdate[1] and stime >= EndnTime) or
(sdate == sdate[1] and stime >= EndnTime and stime[1] < EndnTime)) Then
{
Tcond = false;
}
if Tcond == true then
{
if H > HH Then
HH = H;
if L < Ll Then
LL = L;
RR=HH-LL;
}
if HH > 0 and LL > 0 then
{
if P == 1 Then
{
plot1(HH,"근월물최고가");
plot2(HH,"근월물최저가");
}
Else{
plot3(HH,"근월물최고가");
plot4(LL,"근월물최저가");
}
}
즐거운 하루되세요
> 태양같이 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> 안녕하세요.
수식 수정 문의드립니다.
아래 지표식을 주가지수 옵션에 적용하면 지표가 나타납니다.
그런데 weeklyoption에 적용하고 주가지수옵션처럼 상장일을 외부변수로 지정하면
지표가 차트에 나타나지 않습니다.
예를 들면
이번 주 weeklyoption 상장일인 9월 26일(목) 09:00로 외부변수를 지정하면
지표가 아예 사라집니다.
27일(금) 09:00로 지정하면 지표가 27일부터는 나타나고요.
수정 부탁드립니다.
많은 도움에 항상 감사드립니다.
=============================
input: p(1);
input : Startdate(2019000),StartnTime(090000);
input : Enddate(20191000),EndnTime(000000);
var: HH(0),LL(0),RR(0);
var : Tcond(false);
if sdate != sdate[1] Then
{
Condition1 = false;
if sdate >= startdate and sdate[1] < startdate then
{
Condition1 = true;
}
Condition2 = false;
if sdate >= Enddate and sdate[1] < Enddate then
{
Condition2 = true;
}
}
if Condition1 == true and
((sdate != sdate[1] and stime >= StartnTime) or
(sdate == sdate[1] and stime >= StartnTime and stime[1] < StartnTime)) Then
{
Tcond = true;
HH = H;
LL = L;
}
if Condition2 == true and
((sdate != sdate[1] and stime >= EndnTime) or
(sdate == sdate[1] and stime >= EndnTime and stime[1] < EndnTime)) Then
{
Tcond = false;
}
if Tcond == true then
{
if H > HH Then
HH = H;
if L < Ll Then
LL = L;
RR=HH-LL;
}
if HH > 0 and LL > 0 then
{
if P == 1 Then
{
plot1(HH,"근월물최고가");
plot2(HH,"근월물최저가");
}
Else{
plot3(HH,"근월물최고가");
plot4(LL,"근월물최저가");
}
}
다음글
이전글