커뮤니티

수식부탁드립니다.

프로필 이미지
대박월천
2025-12-19 20:54:46
70
글번호 229219
답변완료

코스피200 선물 08:45 장시작 후 08:47까지  2분 동안 진폭의 배수를 점선(다양한 선과 굵기, 색상 선택 가능하도록)으로 표시 부탁드립니다.


* 고점라인과 저점라인 각  15개의 점선 표시   

* 예를들어 장시작 후 2분간의 진폭이 2.0p이고  선물지수가570~572였다면                                                                 

- 고점 위    572, 574, 576, 578, 580......(15개)          

- 저점아래  570, 568, 566, 564, 562.....(15개)     


위와 같이 분틱챠트에 매일 반복 생성되게 해주시구요. 

지난 챠트에도 계속 표시되어 있게 부탁드립니다.

항상 고맙습니다.^^


지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-12-22 09:29:47

안녕하세요 예스스탁입니다. 각 선과 굵기, 색상은 지표속성창 차트표시탭에서 지정하시면 됩니다. input : starttime(84500),Endtime(84700); var : HH(Nan),LL(Nan),Tcond(False),diff(0); if (sdate != sDate[1] and sTime >= starttime) or (sdate == sDate[1] and sTime >= starttime and sTime[1] < starttime) Then { Tcond = true; 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; diff = hh-ll; } Plot1(hh,"고점"); Plot2(ll,"저점"); Plot3(hh+diff*1,"고점+1"); Plot4(hh+diff*2,"고점+2"); Plot5(hh+diff*3,"고점+3"); Plot6(hh+diff*4,"고점+4"); Plot7(hh+diff*5,"고점+5"); Plot8(hh+diff*6,"고점+6"); Plot9(hh+diff*7,"고점+7"); Plot10(hh+diff*8,"고점+8"); Plot11(hh+diff*9,"고점+9"); Plot12(hh+diff*10,"고점+10"); Plot13(hh+diff*11,"고점+11"); Plot14(hh+diff*12,"고점+12"); Plot15(hh+diff*13,"고점+13"); Plot16(hh+diff*14,"고점+14"); Plot17(hh+diff*15,"고점+15"); Plot18(hh-diff*1,"저점-1"); Plot19(hh-diff*2,"저점-2"); Plot20(hh-diff*3,"저점-3"); Plot21(hh-diff*4,"저점-4"); Plot22(hh-diff*5,"저점-5"); Plot23(hh-diff*6,"저점-6"); Plot24(hh-diff*7,"저점-7"); Plot25(hh-diff*8,"저점-8"); Plot26(hh-diff*9,"저점-9"); Plot27(hh-diff*10,"저점-10"); Plot28(hh-diff*11,"저점-11"); Plot29(hh-diff*12,"저점-12"); Plot30(hh-diff*13,"저점-13"); Plot31(hh-diff*14,"저점-14"); Plot32(hh-diff*15,"저점-15"); 즐거운 하루되세요