커뮤니티
문의드립니다
2017-11-08 04:39:43
150
글번호 113988
수정부탁드립니다.
input:As(100000),Fr(140000),Lo(190000),Ne(213000);
var : tx1(0),tx2(0),tx3(0),tx4(0);
if stime == As or (stime > As and stime[1] < As) Then
var1 = O;
if stime == Fr or (stime > Fr and stime[1] < Fr) Then
var2 = O;
if stime == Lo or (stime > Lo and stime[1] < Lo) Then
var3 = O;
if stime == Ne or (stime > Ne and stime[1] < Ne) Then
var4 = O;
if stime >= As and CurrentDate == sdate Then{
plot1(var1,"AO");
Text_Delete(tx1);
tx1 = Text_New(sdate,stime,var1,"AO");
Text_SetColor(tx1,magenta);
}
if stime >= Fr and CurrentDate == sdate Then{
plot2(var2,"FO");
Text_Delete(tx2);
tx2 = Text_New(sdate,stime,var2,"FO");
Text_SetColor(tx2,RGB(92,172,238));
}
if stime >= Lo and CurrentDate == sdate then{
plot3(var3,"LO");
Text_Delete(tx3);
tx3 = Text_New(sdate,stime,var3,"LO");
Text_SetColor(tx3,white);
}
if stime >= Ne and CurrentDate == sdate then{
plot4(var4,"NO");
Text_Delete(tx4);
tx4 = Text_New(sdate,stime,var4,"NO");
Text_SetColor(tx4,green);
}
해선 예스글로벌 분차트(차트기준시간:서울/도쿄)에
위의 식을 적용하면 지정된 시점부터 밤 0시전 까지만 값이 표시가 됩니다.
밤 0시 부터는 더이상 표시되지 않고 지표를 다시 적용해도 표시되지 않습니다.
각 지표값이 지정시점부터 익일 지정시점까지 계속 표시되게 수정 부탁드립니다.
답변 1
예스스탁 예스스탁 답변
2017-11-08 15:36:45
안녕하세요
예스스탁입니다.
1
if문에 stime >= As와 같은 조건이 있기 때문에
새벽시간대에는 지표가 출력되지 않습니다.
시간제한 조건을 삭제하시면 됩니다.
input:As(100000),Fr(140000),Lo(190000),Ne(213000);
var : tx1(0),tx2(0),tx3(0),tx4(0);
if stime == As or (stime > As and stime[1] < As) Then
var1 = O;
if stime == Fr or (stime > Fr and stime[1] < Fr) Then
var2 = O;
if stime == Lo or (stime > Lo and stime[1] < Lo) Then
var3 = O;
if stime == Ne or (stime > Ne and stime[1] < Ne) Then
var4 = O;
if CurrentDate == sdate Then{
plot1(var1,"AO");
Text_Delete(tx1);
tx1 = Text_New(sdate,stime,var1,"AO");
Text_SetColor(tx1,magenta);
}
if CurrentDate == sdate Then{
plot2(var2,"FO");
Text_Delete(tx2);
tx2 = Text_New(sdate,stime,var2,"FO");
Text_SetColor(tx2,RGB(92,172,238));
}
if CurrentDate == sdate then{
plot3(var3,"LO");
Text_Delete(tx3);
tx3 = Text_New(sdate,stime,var3,"LO");
Text_SetColor(tx3,white);
}
if CurrentDate == sdate then{
plot4(var4,"NO");
Text_Delete(tx4);
tx4 = Text_New(sdate,stime,var4,"NO");
Text_SetColor(tx4,green);
}
2
가장 최근 값만 그리신다면 아래와 같이 추세선 함수로 처리하셔도 됩니다.
input:As(100000),Fr(140000),Lo(190000),Ne(213000);
var : tx1(0),tx2(0),tx3(0),tx4(0);
if stime == As or (stime > As and stime[1] < As) Then{
var1 = O;
TL_Delete(var11);
var11 = TL_New(sdate[1],stime[1],var1,sdate,stime,var1);
}
if stime == Fr or (stime > Fr and stime[1] < Fr) Then{
var2 = O;
TL_Delete(var22);
var22 = TL_New(sdate[1],stime[1],var2,sdate,stime,var2);
}
if stime == Lo or (stime > Lo and stime[1] < Lo) Then{
var3 = O;
TL_Delete(var33);
var33 = TL_New(sdate[1],stime[1],var3,sdate,stime,var3);
}
if stime == Ne or (stime > Ne and stime[1] < Ne) Then{
var4 = O;
TL_Delete(var44);
var44 = TL_New(sdate[1],stime[1],var4,sdate,stime,var4);
}
TL_SetEnd(var11,sdate,stime,var1);
TL_SetEnd(var22,sdate,stime,var2);
TL_SetEnd(var33,sdate,stime,var3);
TL_SetEnd(var44,sdate,stime,var4);
즐거운 하루되세요
> 뉴스타트 님이 쓴 글입니다.
> 제목 : 문의드립니다
> 수정부탁드립니다.
input:As(100000),Fr(140000),Lo(190000),Ne(213000);
var : tx1(0),tx2(0),tx3(0),tx4(0);
if stime == As or (stime > As and stime[1] < As) Then
var1 = O;
if stime == Fr or (stime > Fr and stime[1] < Fr) Then
var2 = O;
if stime == Lo or (stime > Lo and stime[1] < Lo) Then
var3 = O;
if stime == Ne or (stime > Ne and stime[1] < Ne) Then
var4 = O;
if stime >= As and CurrentDate == sdate Then{
plot1(var1,"AO");
Text_Delete(tx1);
tx1 = Text_New(sdate,stime,var1,"AO");
Text_SetColor(tx1,magenta);
}
if stime >= Fr and CurrentDate == sdate Then{
plot2(var2,"FO");
Text_Delete(tx2);
tx2 = Text_New(sdate,stime,var2,"FO");
Text_SetColor(tx2,RGB(92,172,238));
}
if stime >= Lo and CurrentDate == sdate then{
plot3(var3,"LO");
Text_Delete(tx3);
tx3 = Text_New(sdate,stime,var3,"LO");
Text_SetColor(tx3,white);
}
if stime >= Ne and CurrentDate == sdate then{
plot4(var4,"NO");
Text_Delete(tx4);
tx4 = Text_New(sdate,stime,var4,"NO");
Text_SetColor(tx4,green);
}
해선 예스글로벌 분차트(차트기준시간:서울/도쿄)에
위의 식을 적용하면 지정된 시점부터 밤 0시전 까지만 값이 표시가 됩니다.
밤 0시 부터는 더이상 표시되지 않고 지표를 다시 적용해도 표시되지 않습니다.
각 지표값이 지정시점부터 익일 지정시점까지 계속 표시되게 수정 부탁드립니다.