커뮤니티

부탁드립니다

프로필 이미지
유로파54
2018-07-12 02:41:57
139
글번호 120499
답변완료
안녕하세요? 아래 수식은 일전에 도움받아서 감사히 잘 사용하고있는 수식입니다 (* 추세선과 1P가 진행시 그자리가 표시되는 수식입니다) 헌데 여기서 추세선은 빼고 1P 자리만 표시되게 수식을 수정하고싶습니다 부탁드립니다 =========================================================================== Input:전환포인트(1),선굵기(6); Var : j(0),upTr(100),dnTr(-100),trnd(0),TL1(0),TL2(0),TL3(0); var : date11(0),date12(0),time11(0),time12(0); Array:hiVal[10](0),loVal[10](0),hiBar[10](0),loBar[10](0); for j = 1 to 9 { loBar[j] = loBar[j] + 1; hiBar[j] = hiBar[j] + 1; } if hiVal[0] <= H or hiVal[0] == 0 then { hiVal[0] = H; hiBar[0] = 0; } else { hiBar[0] = hiBar[0] + 1; } if loVal[0] >= L or loVal[0] == 0 then { loVal[0] = L; loBar[0] = 0; } else { loBar[0] = loBar[0] + 1; } if trnd != dnTr && hiVal[0] > H && hiVal[0]-전환포인트 > L then trnd = dnTr; else if trnd != upTr && loVal[0] < L && loVal[0]+전환포인트 < H then trnd = upTr; if trnd[1] == upTr and trnd == dnTr then { //SELL(); TL2 = TL_New(sdate,stime,999999999,sdate,stime,0); TL_SetColor(TL2,blue); TL_SetSize(TL2,선굵기); for j = 8 downto 1 { hiVal[j+1] = hiVal[j]; hiBar[j+1] = hiBar[j]; } hiVal[1] = hiVal[0]; hiBar[1] = hiBar[0]; hiVal[0] = H; hiBar[0] = 0; loVal[0] = L; loBar[0] = 0; date11 = date[loBar[1]]; //추세선 시작일. 전저점의 날짜 time11 = stime[loBar[1]]; //추세선 시작시간 Value11 = loVal[1]; //추세선 시작가격 date12 = date[hiBar[1]]; //추세선 종료일. 전고점의 날짜 time12 = stime[hiBar[1]]; //추세선 종료시간 Value12 = hiVal[1]; //추세선 종료가격 TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,red); TL_SetSize(TL1,선굵기); } if trnd[1] == dnTr and trnd == dnTr and hiVal[1] < hiVal[0] and hiVal[0]-전환포인트 > L then { hiVal[1] = hiVal[0]; hiBar[1] = hiBar[0]; hiVal[0] = H; hiBar[0] = 0; loVal[0] = L; loBar[0] = 0; date12 = date[hiBar[1]]; //추세선 종료일 time12 = stime[hiBar[1]]; Value12 = hiVal[1]; TL_SetEnd(TL1, date12,time12,Value12); } if trnd[1] == dnTr and trnd == upTr then { //BUY(); TL2 = TL_New(sdate,stime,999999999,sdate,stime,0); TL_SetColor(TL2,red); TL_SetSize(TL2,선굵기); for j = 8 downto 1 { loVal[j+1] = loVal[j]; loBar[j+1] = loBar[j]; } loVal[1] = loVal[0]; loBar[1] = loBar[0]; loVal[0] = L; loBar[0] = 0; hiVal[0] = H; hiBar[0] = 0; date11 = date[hiBar[1]]; time11 = stime[hiBar[1]]; Value11 = hiVal[1]; date12 = date[loBar[1]]; time12 = stime[loBar[1]]; Value12 = loVal[1]; TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,blue); TL_SetSize(TL1,선굵기); } if trnd[1] == upTr and trnd == upTr and loVal[1] > loVal[0] and loVal[0]+전환포인트 < H then { loVal[1] = loVal[0]; loBar[1] = loBar[0]; loVal[0] = L; loBar[0] = 0; hiVal[0] = H; hiBar[0] = 0; date12 = date[loBar[1]]; time12 = stime[loBar[1]]; Value12 = loVal[1]; TL_SetEnd(TL1, date12,time12,Value12); }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-07-12 14:33:41

안녕하세요 예스스탁입니다. 수직선만 그려지게 수정해 드립니다. Input:전환포인트(1),선굵기(6); Var : j(0),upTr(100),dnTr(-100),trnd(0),TL1(0),TL2(0),TL3(0); var : date11(0),date12(0),time11(0),time12(0); Array:hiVal[10](0),loVal[10](0),hiBar[10](0),loBar[10](0); for j = 1 to 9 { loBar[j] = loBar[j] + 1; hiBar[j] = hiBar[j] + 1; } if hiVal[0] <= H or hiVal[0] == 0 then { hiVal[0] = H; hiBar[0] = 0; } else { hiBar[0] = hiBar[0] + 1; } if loVal[0] >= L or loVal[0] == 0 then { loVal[0] = L; loBar[0] = 0; } else { loBar[0] = loBar[0] + 1; } if trnd != dnTr && hiVal[0] > H && hiVal[0]-전환포인트 > L then trnd = dnTr; else if trnd != upTr && loVal[0] < L && loVal[0]+전환포인트 < H then trnd = upTr; if trnd[1] == upTr and trnd == dnTr then { //SELL(); TL2 = TL_New(sdate,stime,999999999,sdate,stime,0); TL_SetColor(TL2,blue); TL_SetSize(TL2,선굵기); for j = 8 downto 1 { hiVal[j+1] = hiVal[j]; hiBar[j+1] = hiBar[j]; } hiVal[1] = hiVal[0]; hiBar[1] = hiBar[0]; hiVal[0] = H; hiBar[0] = 0; loVal[0] = L; loBar[0] = 0; date11 = date[loBar[1]]; //추세선 시작일. 전저점의 날짜 time11 = stime[loBar[1]]; //추세선 시작시간 Value11 = loVal[1]; //추세선 시작가격 date12 = date[hiBar[1]]; //추세선 종료일. 전고점의 날짜 time12 = stime[hiBar[1]]; //추세선 종료시간 Value12 = hiVal[1]; //추세선 종료가격 //TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,red); TL_SetSize(TL1,선굵기); } if trnd[1] == dnTr and trnd == dnTr and hiVal[1] < hiVal[0] and hiVal[0]-전환포인트 > L then { hiVal[1] = hiVal[0]; hiBar[1] = hiBar[0]; hiVal[0] = H; hiBar[0] = 0; loVal[0] = L; loBar[0] = 0; date12 = date[hiBar[1]]; //추세선 종료일 time12 = stime[hiBar[1]]; Value12 = hiVal[1]; TL_SetEnd(TL1, date12,time12,Value12); } if trnd[1] == dnTr and trnd == upTr then { //BUY(); TL2 = TL_New(sdate,stime,999999999,sdate,stime,0); TL_SetColor(TL2,red); TL_SetSize(TL2,선굵기); for j = 8 downto 1 { loVal[j+1] = loVal[j]; loBar[j+1] = loBar[j]; } loVal[1] = loVal[0]; loBar[1] = loBar[0]; loVal[0] = L; loBar[0] = 0; hiVal[0] = H; hiBar[0] = 0; date11 = date[hiBar[1]]; time11 = stime[hiBar[1]]; Value11 = hiVal[1]; date12 = date[loBar[1]]; time12 = stime[loBar[1]]; Value12 = loVal[1]; //TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,blue); TL_SetSize(TL1,선굵기); } if trnd[1] == upTr and trnd == upTr and loVal[1] > loVal[0] and loVal[0]+전환포인트 < H then { loVal[1] = loVal[0]; loBar[1] = loBar[0]; loVal[0] = L; loBar[0] = 0; hiVal[0] = H; hiBar[0] = 0; date12 = date[loBar[1]]; time12 = stime[loBar[1]]; Value12 = loVal[1]; TL_SetEnd(TL1, date12,time12,Value12); } 즐거운 하루되세요 > 유로파54 님이 쓴 글입니다. > 제목 : 부탁드립니다 > 안녕하세요? 아래 수식은 일전에 도움받아서 감사히 잘 사용하고있는 수식입니다 (* 추세선과 1P가 진행시 그자리가 표시되는 수식입니다) 헌데 여기서 추세선은 빼고 1P 자리만 표시되게 수식을 수정하고싶습니다 부탁드립니다 =========================================================================== Input:전환포인트(1),선굵기(6); Var : j(0),upTr(100),dnTr(-100),trnd(0),TL1(0),TL2(0),TL3(0); var : date11(0),date12(0),time11(0),time12(0); Array:hiVal[10](0),loVal[10](0),hiBar[10](0),loBar[10](0); for j = 1 to 9 { loBar[j] = loBar[j] + 1; hiBar[j] = hiBar[j] + 1; } if hiVal[0] <= H or hiVal[0] == 0 then { hiVal[0] = H; hiBar[0] = 0; } else { hiBar[0] = hiBar[0] + 1; } if loVal[0] >= L or loVal[0] == 0 then { loVal[0] = L; loBar[0] = 0; } else { loBar[0] = loBar[0] + 1; } if trnd != dnTr && hiVal[0] > H && hiVal[0]-전환포인트 > L then trnd = dnTr; else if trnd != upTr && loVal[0] < L && loVal[0]+전환포인트 < H then trnd = upTr; if trnd[1] == upTr and trnd == dnTr then { //SELL(); TL2 = TL_New(sdate,stime,999999999,sdate,stime,0); TL_SetColor(TL2,blue); TL_SetSize(TL2,선굵기); for j = 8 downto 1 { hiVal[j+1] = hiVal[j]; hiBar[j+1] = hiBar[j]; } hiVal[1] = hiVal[0]; hiBar[1] = hiBar[0]; hiVal[0] = H; hiBar[0] = 0; loVal[0] = L; loBar[0] = 0; date11 = date[loBar[1]]; //추세선 시작일. 전저점의 날짜 time11 = stime[loBar[1]]; //추세선 시작시간 Value11 = loVal[1]; //추세선 시작가격 date12 = date[hiBar[1]]; //추세선 종료일. 전고점의 날짜 time12 = stime[hiBar[1]]; //추세선 종료시간 Value12 = hiVal[1]; //추세선 종료가격 TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,red); TL_SetSize(TL1,선굵기); } if trnd[1] == dnTr and trnd == dnTr and hiVal[1] < hiVal[0] and hiVal[0]-전환포인트 > L then { hiVal[1] = hiVal[0]; hiBar[1] = hiBar[0]; hiVal[0] = H; hiBar[0] = 0; loVal[0] = L; loBar[0] = 0; date12 = date[hiBar[1]]; //추세선 종료일 time12 = stime[hiBar[1]]; Value12 = hiVal[1]; TL_SetEnd(TL1, date12,time12,Value12); } if trnd[1] == dnTr and trnd == upTr then { //BUY(); TL2 = TL_New(sdate,stime,999999999,sdate,stime,0); TL_SetColor(TL2,red); TL_SetSize(TL2,선굵기); for j = 8 downto 1 { loVal[j+1] = loVal[j]; loBar[j+1] = loBar[j]; } loVal[1] = loVal[0]; loBar[1] = loBar[0]; loVal[0] = L; loBar[0] = 0; hiVal[0] = H; hiBar[0] = 0; date11 = date[hiBar[1]]; time11 = stime[hiBar[1]]; Value11 = hiVal[1]; date12 = date[loBar[1]]; time12 = stime[loBar[1]]; Value12 = loVal[1]; TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,blue); TL_SetSize(TL1,선굵기); } if trnd[1] == upTr and trnd == upTr and loVal[1] > loVal[0] and loVal[0]+전환포인트 < H then { loVal[1] = loVal[0]; loBar[1] = loBar[0]; loVal[0] = L; loBar[0] = 0; hiVal[0] = H; hiBar[0] = 0; date12 = date[loBar[1]]; time12 = stime[loBar[1]]; Value12 = loVal[1]; TL_SetEnd(TL1, date12,time12,Value12); }