커뮤니티

49399번 추가요청에대한 회신 요청드립니다.

프로필 이미지
dqzero
2016-09-02 11:25:24
93
글번호 101622
답변완료
항상 빠른 답변 감사드립니다. 수식에 대한 추가 요청사항을 회신바랍니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-09-02 18:18:01

안녕하세요 예스스탁입니다. 차트에 텍스트를 출력하기위해서는 위치로 봉의 날짜와 시간을 지정해야 하는데 수식에서는 현재보이는 차트의 왼쪽 끝이나 중심을 알수가 없습니다. 차트의 마지막봉에 표시되게 작성해 드립니다. 1. 전일값 input : Per1(23.6),Per2(38.2),Per3(50.0),Per4(61.8),Per5(76.4); var : HH(0),LL(0),HH1(0),LL1(0); var : Tx1(0),tx2(0),tx3(0),tx4(0),tx5(0),tx6(0),tx7(0); if sdate != sdate[1] Then{ HH = H; LL = L; HH1 = HH[1]; LL1 = LL[1]; } if H > HH Then HH = H; if L < LL then LL = L; var1 = HH1-(HH1-LL1)*(Per1/100); var2 = HH1-(HH1-LL1)*(Per2/100); var3 = HH1-(HH1-LL1)*(Per3/100); var4 = HH1-(HH1-LL1)*(Per4/100); var5 = HH1-(HH1-LL1)*(Per5/100); if HH1 > 0 and LL1 > 0 then{ plot1(HH1,"H"); plot2(var1,"23.6"); plot3(var2,"38.2"); plot4(var3,"50.0"); plot5(var4,"61.8"); plot6(var5,"76.4"); plot7(LL1,"L"); Text_Delete(tx1); Text_Delete(tx2); Text_Delete(tx3); Text_Delete(tx4); Text_Delete(tx5); Text_Delete(tx6); Text_Delete(tx7); tx1 = Text_New(sdate,stime,HH1,"상단"+":"+NumToStr(HH1,2)); tx2 = Text_New(sdate,stime,var1,NumToStr(per1,2)+"%:"+NumToStr(var1,2)); tx3 = Text_New(sdate,stime,var2,NumToStr(per2,2)+"%:"+NumToStr(var2,2)); tx4 = Text_New(sdate,stime,var3,NumToStr(per3,2)+"%:"+NumToStr(var3,2)); tx5 = Text_New(sdate,stime,var4,NumToStr(per4,2)+"%:"+NumToStr(var4,2)); tx6 = Text_New(sdate,stime,var5,NumToStr(per5,2)+"%:"+NumToStr(var5,2)); tx7 = Text_New(sdate,stime,LL1,"하단"+":"+NumToStr(HH1,2)); Text_SetStyle(tx1,2,1); Text_SetStyle(tx2,2,1); Text_SetStyle(tx3,2,1); Text_SetStyle(tx4,2,1); Text_SetStyle(tx5,2,1); Text_SetStyle(tx6,2,1); Text_SetStyle(tx7,2,1); } 2. 당일값 input : Per1(23.6),Per2(38.2),Per3(50.0),Per4(61.8),Per5(76.4); var : HH(0),LL(0),HH1(0),LL1(0); var : Tx1(0),tx2(0),tx3(0),tx4(0),tx5(0),tx6(0),tx7(0); if sdate != sdate[1] Then{ HH = H; LL = L; HH1 = HH[1]; LL1 = LL[1]; } if H > HH Then HH = H; if L < LL then LL = L; var1 = HH-(HH-LL)*(Per1/100); var2 = HH-(HH-LL)*(Per2/100); var3 = HH-(HH-LL)*(Per3/100); var4 = HH-(HH-LL)*(Per4/100); var5 = HH-(HH-LL)*(Per5/100); if HH > 0 and LL > 0 then{ plot1(HH,"H"); plot2(var1,"23.6"); plot3(var2,"38.2"); plot4(var3,"50.0"); plot5(var4,"61.8"); plot6(var5,"76.4"); plot7(LL,"L"); Text_Delete(tx1); Text_Delete(tx2); Text_Delete(tx3); Text_Delete(tx4); Text_Delete(tx5); Text_Delete(tx6); Text_Delete(tx7); tx1 = Text_New(sdate,stime,HH,"상단"+":"+NumToStr(HH,2)); tx2 = Text_New(sdate,stime,var1,NumToStr(per1,2)+"%:"+NumToStr(var1,2)); tx3 = Text_New(sdate,stime,var2,NumToStr(per2,2)+"%:"+NumToStr(var2,2)); tx4 = Text_New(sdate,stime,var3,NumToStr(per3,2)+"%:"+NumToStr(var3,2)); tx5 = Text_New(sdate,stime,var4,NumToStr(per4,2)+"%:"+NumToStr(var4,2)); tx6 = Text_New(sdate,stime,var5,NumToStr(per5,2)+"%:"+NumToStr(var5,2)); tx7 = Text_New(sdate,stime,LL,"하단"+":"+NumToStr(LL,2)); Text_SetStyle(tx1,2,1); Text_SetStyle(tx2,2,1); Text_SetStyle(tx3,2,1); Text_SetStyle(tx4,2,1); Text_SetStyle(tx5,2,1); Text_SetStyle(tx6,2,1); Text_SetStyle(tx7,2,1); } 즐거운 하루되세요 > dqzero 님이 쓴 글입니다. > 제목 : 49399번 추가요청에대한 회신 요청드립니다. > 항상 빠른 답변 감사드립니다. 수식에 대한 추가 요청사항을 회신바랍니다.