커뮤니티

문의드립니다

프로필 이미지
유선
2020-01-07 10:06:55
268
글번호 134948
답변완료
input : per1(23.6),per2(50.0),per3(76.4); var : hh(0),ll(0),dd(0),tt(0); var : tl1(0),tl2(0),tl3(0); if bdate > bdate[1] then { hh = h; ll = l; dd = sdate[1]; tt = stime[1]; TL_Delete(tl1); TL_Delete(tl2); TL_Delete(tl3); tl1 = TL_New(dd,tt,hh-(hh-ll)*(per1/100),sdate,stime,hh-(hh-ll)*(per1/100)); tl2 = TL_New(dd,tt,hh-(hh-ll)*(per2/100),sdate,stime,hh-(hh-ll)*(per2/100)); tl3 = TL_New(dd,tt,hh-(hh-ll)*(per3/100),sdate,stime,hh-(hh-ll)*(per3/100)); } if h > hh and hh > 0 Then { hh = h; TL_Delete(tl1); TL_Delete(tl2); TL_Delete(tl3); tl1 = TL_New(dd,tt,hh-(hh-ll)*(per1/100),sdate,stime,hh-(hh-ll)*(per1/100)); tl2 = TL_New(dd,tt,hh-(hh-ll)*(per2/100),sdate,stime,hh-(hh-ll)*(per2/100)); tl3 = TL_New(dd,tt,hh-(hh-ll)*(per3/100),sdate,stime,hh-(hh-ll)*(per3/100)); } if l < ll and ll > 0 Then { ll = l; TL_Delete(tl1); TL_Delete(tl2); TL_Delete(tl3); tl1 = TL_New(dd,tt,hh-(hh-ll)*(per1/100),sdate,stime,hh-(hh-ll)*(per1/100)); tl2 = TL_New(dd,tt,hh-(hh-ll)*(per2/100),sdate,stime,hh-(hh-ll)*(per2/100)); tl3 = TL_New(dd,tt,hh-(hh-ll)*(per3/100),sdate,stime,hh-(hh-ll)*(per3/100)); } TL_SetColor(TL1,CYAN); TL_SetSize(TL1,1); TL_SetExtRight(TL1,true); TL_SetColor(TL2,WHITE); TL_SetSize(TL2,1); TL_SetExtRight(TL2,true); TL_SetColor(TL3,RED); TL_SetSize(TL3,1); TL_SetExtRight(TL3,true); 위수식에서 수정을부탁드립니다 하락하다상승시 현재봉이레드색을상승돌파하면 하늘색은사라지고 레드색만 나오게 반대로 상승하다하락시 현재봉이 하늘색을 하락돌파하면 레드색은사라지고 하늘색만 나오게 수정하고십습니다 ~가능하다면 부탁드립니다 미리감사드립니다
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-01-07 15:49:10

안녕하세요 예스스탁입니다. 조건이 조금 모호합니다. 당일 고점이나 저점이 갱싱되면 3개의 선이 모두 출력되고 고점갱신 후 하늘색을 이하로 하락하면 빨간선은 삭제 저점갱신 후 빨간색을 이상으로 상승하면 하늘선은 삭제하게 수정해 드립니다. input : per1(23.6),per2(50.0),per3(76.4); var : hh(0),ll(0),dd(0),tt(0); var : tl1(0),tl2(0),tl3(0),T(0); if bdate > bdate[1] then { T = 0; hh = h; ll = l; dd = sdate[1]; tt = stime[1]; TL_Delete(tl1); TL_Delete(tl2); TL_Delete(tl3); tl1 = TL_New(dd,tt,hh-(hh-ll)*(per1/100),sdate,stime,hh-(hh-ll)*(per1/100)); tl2 = TL_New(dd,tt,hh-(hh-ll)*(per2/100),sdate,stime,hh-(hh-ll)*(per2/100)); tl3 = TL_New(dd,tt,hh-(hh-ll)*(per3/100),sdate,stime,hh-(hh-ll)*(per3/100)); } if h > hh and hh > 0 Then { hh = h; T = 1; TL_Delete(tl1); TL_Delete(tl2); TL_Delete(tl3); tl1 = TL_New(dd,tt,hh-(hh-ll)*(per1/100),sdate,stime,hh-(hh-ll)*(per1/100)); tl2 = TL_New(dd,tt,hh-(hh-ll)*(per2/100),sdate,stime,hh-(hh-ll)*(per2/100)); tl3 = TL_New(dd,tt,hh-(hh-ll)*(per3/100),sdate,stime,hh-(hh-ll)*(per3/100)); } if l < ll and ll > 0 Then { T = -1; ll = l; TL_Delete(tl1); TL_Delete(tl2); TL_Delete(tl3); tl1 = TL_New(dd,tt,hh-(hh-ll)*(per1/100),sdate,stime,hh-(hh-ll)*(per1/100)); tl2 = TL_New(dd,tt,hh-(hh-ll)*(per2/100),sdate,stime,hh-(hh-ll)*(per2/100)); tl3 = TL_New(dd,tt,hh-(hh-ll)*(per3/100),sdate,stime,hh-(hh-ll)*(per3/100)); } if T == -1 and crossup(c,hh-(hh-ll)*(per3/100)) Then TL_Delete(TL1); if T == 1 and CrossDown(c,hh-(hh-ll)*(per1/100)) Then TL_Delete(TL3); TL_SetColor(TL1,CYAN); TL_SetSize(TL1,1); TL_SetExtRight(TL1,true); TL_SetColor(TL2,WHITE); TL_SetSize(TL2,1); TL_SetExtRight(TL2,true); TL_SetColor(TL3,RED); TL_SetSize(TL3,1); TL_SetExtRight(TL3,true); 즐거운 하루되세요 > 유선 님이 쓴 글입니다. > 제목 : 문의드립니다 > input : per1(23.6),per2(50.0),per3(76.4); var : hh(0),ll(0),dd(0),tt(0); var : tl1(0),tl2(0),tl3(0); if bdate > bdate[1] then { hh = h; ll = l; dd = sdate[1]; tt = stime[1]; TL_Delete(tl1); TL_Delete(tl2); TL_Delete(tl3); tl1 = TL_New(dd,tt,hh-(hh-ll)*(per1/100),sdate,stime,hh-(hh-ll)*(per1/100)); tl2 = TL_New(dd,tt,hh-(hh-ll)*(per2/100),sdate,stime,hh-(hh-ll)*(per2/100)); tl3 = TL_New(dd,tt,hh-(hh-ll)*(per3/100),sdate,stime,hh-(hh-ll)*(per3/100)); } if h > hh and hh > 0 Then { hh = h; TL_Delete(tl1); TL_Delete(tl2); TL_Delete(tl3); tl1 = TL_New(dd,tt,hh-(hh-ll)*(per1/100),sdate,stime,hh-(hh-ll)*(per1/100)); tl2 = TL_New(dd,tt,hh-(hh-ll)*(per2/100),sdate,stime,hh-(hh-ll)*(per2/100)); tl3 = TL_New(dd,tt,hh-(hh-ll)*(per3/100),sdate,stime,hh-(hh-ll)*(per3/100)); } if l < ll and ll > 0 Then { ll = l; TL_Delete(tl1); TL_Delete(tl2); TL_Delete(tl3); tl1 = TL_New(dd,tt,hh-(hh-ll)*(per1/100),sdate,stime,hh-(hh-ll)*(per1/100)); tl2 = TL_New(dd,tt,hh-(hh-ll)*(per2/100),sdate,stime,hh-(hh-ll)*(per2/100)); tl3 = TL_New(dd,tt,hh-(hh-ll)*(per3/100),sdate,stime,hh-(hh-ll)*(per3/100)); } TL_SetColor(TL1,CYAN); TL_SetSize(TL1,1); TL_SetExtRight(TL1,true); TL_SetColor(TL2,WHITE); TL_SetSize(TL2,1); TL_SetExtRight(TL2,true); TL_SetColor(TL3,RED); TL_SetSize(TL3,1); TL_SetExtRight(TL3,true); 위수식에서 수정을부탁드립니다 하락하다상승시 현재봉이레드색을상승돌파하면 하늘색은사라지고 레드색만 나오게 반대로 상승하다하락시 현재봉이 하늘색을 하락돌파하면 레드색은사라지고 하늘색만 나오게 수정하고십습니다 ~가능하다면 부탁드립니다 미리감사드립니다