커뮤니티

파일첨부합니다.

프로필 이미지
팽구
2016-03-30 09:04:07
164
글번호 96684
답변완료

첨부 이미지

첨부그림처럼 분봉에서는 작동하지않습니다. 일봉에서만 되구요.. 그리고 일봉에서도 16년 1월의 경우엔 3번째 금요일이 들어간 주를 인식 못하는 문제점도 보입니다.(4번째주를 인식함) 한투증권이네요.. 그리고, 매달 만기일이 3번째 수요일인경우, 같은주의 월요일부터 수요일까지 진입금지하는 수식도 부탁드립니다. ///////////////////////////////// 안녕하세요 예스스탁입니다. 수정한 식입니다. 2번째 금요일 다음날인 토요일부터 적용이 되어 월요일부터 적용되게 수정했습니다. 1번식은 지표식입니다. 진입가능한 날은 1, 아니면 0으로 표시됩니다. 1번 지표 var : Friday (0),Month(0),Week(0),entry(true); Month = Floor(FracPortion(sdate/10000)*100); Week = DayOfWeek(sdate); if date > date[1]+30 Then{ Friday = 0; entry = true; } if Week == 5 or (Week >= 5 and week[1] < 5 and Month == Month[1]) or (Week < 5 and week[1] < 5 and week < week[1] and Month == Month[1] ) Then Friday = Friday +1; #금요일이 2번째 나온 구간이고 요일값이 1(월요일)이상이면 entry는 false if Month%1 == 0 and date != date[1] and Friday == 2 and week < week[1] Then//옵션이면 Month%3 == 0 삭제 entry = false; #금요일이 3번재 나온 구간이고 금요일 다음날이면 true if Month%1 == 0 and date != date[1] and Friday == 3 and Friday == Friday[1] Then//옵션이면 Month%3 == 0 삭제 entry = true; if entry == true Then var1 = 1; Else var1 = 0; plot1(var1); 2번 시스템 var : Friday (0),Month(0),Week(0),entry(true); Month = Floor(FracPortion(sdate/10000)*100); Week = DayOfWeek(sdate); if date > date[1]+30 Then{ Friday = 0; entry = true; } if Week == 5 or (Week >= 5 and week[1] < 5 and Month == Month[1]) or (Week < 5 and week[1] < 5 and week < week[1] and Month == Month[1] ) Then Friday = Friday +1; #금요일이 2번째 나온 구간이고 요일값이 1(월요일)이상이면 entry는 false if Month%1 == 0 and date != date[1] and Friday == 2 and (week < week[1]) Then//옵션이면 Month%3 == 0 삭제 entry = false; #금요일이 3번재 나온 구간이고 금요일 다음날이면 true if Month%1 == 0 and date != date[1] and Friday == 3 and Friday == Friday[1] Then//옵션이면 Month%3 == 0 삭제 entry = true; if entry == true Then{ if C > O Then buy(); if C < O Then sell(); } 즐거운 하루되세요 > 팽구 님이 쓴 글입니다. > 제목 : 수정부탁드려요.. > 아래수식은 매달 만기일이 3번째 금요일인경우, 같은주의 월요일부터 금요일까지 진입금지하는 수식인데요, 유달 60분봉으로 확인결과 작동하지 않습니다. 수정부탁드림미다.. var : Friday (0),Month(0),Week(0),entry(true); Month = Floor(FracPortion(sdate/10000)*100); Week = DayOfWeek(sdate); if date > date[1]+30 Then{ Friday = 0; entry = true; } if Week == 5 or (Week >= 5 and week[1] < 5 and Month == Month[1]) or (Week < 5 and week[1] < 5 and week < week[1] and Month == Month[1] ) Then Friday = Friday +1; #금요일이 2번째 나온 구간이고 요일값이 1(월요일)이상이면 entry는 false if Month%1 == 0 and date != date[1] and Friday == 2 and week >= 1 Then//옵션이면 Month%3 == 0 삭제 entry = false; #금요일이 3번재 나온 구간이고 금요일 다음날이면 true if Month%1 == 0 and date != date[1] and Friday == 3 and Friday == Friday[1] Then//옵션이면 Month%3 == 0 삭제 entry = true; if entry == true Then{ if C > O Then buy(); if C < O Then sell(); }
지표
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2016-03-30 10:20:09

안녕하세요 예스스탁입니다. 분봉에서 연속으로 체크되는 문제가 있어 수정했습니다. 1-1 지표 var : Friday(0),Month(0),nday(0),ndate(0),Week(0),entry(true); Month = Floor(FracPortion(sdate/10000)*100); Week = DayOfWeek(sdate); nday = sdate%100; #월 첫봉 if date > date[1]+30 Then{ Friday = 0; entry = true; ndate = 0; if nday >= 4 Then Friday = 1; } #월 거래일수 if date != date[1] Then ndate = ndate+1; #월 2번째 거래일부터 if ndate >= 2 and date != date[1] and (Week == 5 or (Week >= 5 and week[1] < 5 and Month == Month[1]) or (Week < 5 and week[1] < 5 and week < week[1] and Month == Month[1] )) Then Friday = Friday+1; #금요일이 2번째 나온 구간이고 요일값이 1(월요일)이상이면 entry는 false if Month%1 == 0 and date != date[1] and Friday == 2 and week < week[1] Then//옵션이면 Month%3 == 0 삭제 entry = false; #금요일이 3번재 나온 구간이고 금요일 다음날이면 true if Month%1 == 0 and date != date[1] and Friday == 3 and Friday == Friday[1] Then//옵션이면 Month%3 == 0 삭제 entry = true; if entry == true Then var1 = 1; Else var1 = 0; plot1(var1); 1-2 시스템 var : Friday(0),Month(0),nday(0),ndate(0),Week(0),entry(true); Month = Floor(FracPortion(sdate/10000)*100); Week = DayOfWeek(sdate); nday = sdate%100; #월 첫봉 if date > date[1]+30 Then{ Friday = 0; entry = true; ndate = 0; if nday >= 4 Then Friday = 1; } #월 거래일수 if date != date[1] Then ndate = ndate+1; #월 2번째 거래일부터 if ndate >= 2 and date != date[1] and (Week == 5 or (Week >= 5 and week[1] < 5 and Month == Month[1]) or (Week < 5 and week[1] < 5 and week < week[1] and Month == Month[1] )) Then Friday = Friday+1; #금요일이 2번째 나온 구간이고 요일값이 1(월요일)이상이면 entry는 false if Month%1 == 0 and date != date[1] and Friday == 2 and week < week[1] Then//옵션이면 Month%3 == 0 삭제 entry = false; #금요일이 3번재 나온 구간이고 금요일 다음날이면 true if Month%1 == 0 and date != date[1] and Friday == 3 and Friday == Friday[1] Then//옵션이면 Month%3 == 0 삭제 entry = true; if entry == true Then{ if C > O Then buy(); if C < O Then sell(); } 2-1 var : Wednesday (0),Month(0),nday(0),ndate(0),Week(0),entry(true); Month = Floor(FracPortion(sdate/10000)*100); Week = DayOfWeek(sdate); nday = sdate%100; #월 첫봉 if date > date[1]+30 Then{ Wednesday = 0; entry = true; ndate = 0; if nday >= 6 Then Wednesday = 1; } #월 거래일수 if date != date[1] Then ndate = ndate+1; #월 2번째 거래일부터 if ndate >= 2 and date != date[1] and (Week == 3 or (Week >= 3 and week[1] < 3 and Month == Month[1]) or (Week < 3 and week[1] < 3 and week < week[1] and Month == Month[1] )) Then Wednesday = Wednesday +1; if entry == true and Month%1 == 0 and date != date[1] and Wednesday == 2 and week < week[1] Then//옵션이면 Month%3 == 0 삭제 entry = false; if Month%1 == 0 and date != date[1] and Wednesday == 3 and Wednesday == Wednesday [1] Then//옵션이면 Month%3 == 0 삭제 entry = true; if entry == true Then var1 = 1; Else var1 = 0; plot1(var1); 2-2 var : Wednesday (0),Month(0),nday(0),ndate(0),Week(0),entry(true); Month = Floor(FracPortion(sdate/10000)*100); Week = DayOfWeek(sdate); nday = sdate%100; #월 첫봉 if date > date[1]+30 Then{ Wednesday = 0; entry = true; ndate = 0; if nday >= 6 Then Wednesday = 1; } #월 거래일수 if date != date[1] Then ndate = ndate+1; #월 2번째 거래일부터 if ndate >= 2 and date != date[1] and (Week == 3 or (Week >= 3 and week[1] < 3 and Month == Month[1]) or (Week < 3 and week[1] < 3 and week < week[1] and Month == Month[1] )) Then Wednesday = Wednesday +1; if entry == true and Month%1 == 0 and date != date[1] and Wednesday == 2 and week < week[1] Then//옵션이면 Month%3 == 0 삭제 entry = false; if Month%1 == 0 and date != date[1] and Wednesday == 3 and Wednesday == Wednesday [1] Then//옵션이면 Month%3 == 0 삭제 entry = true; if entry == true Then{ if C > O Then buy(); if C < O Then sell(); } 즐거운 하루되세요 > 팽구 님이 쓴 글입니다. > 제목 : 파일첨부합니다. > 첨부그림처럼 분봉에서는 작동하지않습니다. 일봉에서만 되구요.. 그리고 일봉에서도 16년 1월의 경우엔 3번째 금요일이 들어간 주를 인식 못하는 문제점도 보입니다.(4번째주를 인식함) 한투증권이네요.. 그리고, 매달 만기일이 3번째 수요일인경우, 같은주의 월요일부터 수요일까지 진입금지하는 수식도 부탁드립니다. ///////////////////////////////// 안녕하세요 예스스탁입니다. 수정한 식입니다. 2번째 금요일 다음날인 토요일부터 적용이 되어 월요일부터 적용되게 수정했습니다. 1번식은 지표식입니다. 진입가능한 날은 1, 아니면 0으로 표시됩니다. 1번 지표 var : Friday (0),Month(0),Week(0),entry(true); Month = Floor(FracPortion(sdate/10000)*100); Week = DayOfWeek(sdate); if date > date[1]+30 Then{ Friday = 0; entry = true; } if Week == 5 or (Week >= 5 and week[1] < 5 and Month == Month[1]) or (Week < 5 and week[1] < 5 and week < week[1] and Month == Month[1] ) Then Friday = Friday +1; #금요일이 2번째 나온 구간이고 요일값이 1(월요일)이상이면 entry는 false if Month%1 == 0 and date != date[1] and Friday == 2 and week < week[1] Then//옵션이면 Month%3 == 0 삭제 entry = false; #금요일이 3번재 나온 구간이고 금요일 다음날이면 true if Month%1 == 0 and date != date[1] and Friday == 3 and Friday == Friday[1] Then//옵션이면 Month%3 == 0 삭제 entry = true; if entry == true Then var1 = 1; Else var1 = 0; plot1(var1); 2번 시스템 var : Friday (0),Month(0),Week(0),entry(true); Month = Floor(FracPortion(sdate/10000)*100); Week = DayOfWeek(sdate); if date > date[1]+30 Then{ Friday = 0; entry = true; } if Week == 5 or (Week >= 5 and week[1] < 5 and Month == Month[1]) or (Week < 5 and week[1] < 5 and week < week[1] and Month == Month[1] ) Then Friday = Friday +1; #금요일이 2번째 나온 구간이고 요일값이 1(월요일)이상이면 entry는 false if Month%1 == 0 and date != date[1] and Friday == 2 and (week < week[1]) Then//옵션이면 Month%3 == 0 삭제 entry = false; #금요일이 3번재 나온 구간이고 금요일 다음날이면 true if Month%1 == 0 and date != date[1] and Friday == 3 and Friday == Friday[1] Then//옵션이면 Month%3 == 0 삭제 entry = true; if entry == true Then{ if C > O Then buy(); if C < O Then sell(); } 즐거운 하루되세요 > 팽구 님이 쓴 글입니다. > 제목 : 수정부탁드려요.. > 아래수식은 매달 만기일이 3번째 금요일인경우, 같은주의 월요일부터 금요일까지 진입금지하는 수식인데요, 유달 60분봉으로 확인결과 작동하지 않습니다. 수정부탁드림미다.. var : Friday (0),Month(0),Week(0),entry(true); Month = Floor(FracPortion(sdate/10000)*100); Week = DayOfWeek(sdate); if date > date[1]+30 Then{ Friday = 0; entry = true; } if Week == 5 or (Week >= 5 and week[1] < 5 and Month == Month[1]) or (Week < 5 and week[1] < 5 and week < week[1] and Month == Month[1] ) Then Friday = Friday +1; #금요일이 2번째 나온 구간이고 요일값이 1(월요일)이상이면 entry는 false if Month%1 == 0 and date != date[1] and Friday == 2 and week >= 1 Then//옵션이면 Month%3 == 0 삭제 entry = false; #금요일이 3번재 나온 구간이고 금요일 다음날이면 true if Month%1 == 0 and date != date[1] and Friday == 3 and Friday == Friday[1] Then//옵션이면 Month%3 == 0 삭제 entry = true; if entry == true Then{ if C > O Then buy(); if C < O Then sell(); }
프로필 이미지

팽구

2016-03-30 12:29:43

여전히 16년 1월의 경우엔 3번째 수요일이나 금요일이 들어간 주를 인식 못하는 문제점이 보입니다.(4번째주를 인식함) 11일에 진입금지가 시작되야하는데 18일부터 진입금지가됨요.. 수정부탁드려요..