커뮤니티

수식 요청 수정 부탁드립니다

프로필 이미지
회원
2007-07-18 03:48:55
1064
글번호 13086
답변완료
안녕하세요 수식 짜는데 힘드네요 수정부탁합니다 답변은 yang12133 @ empal.com 으로 해주세요 감사합니다 연결선물 7분차트 에서 [내용] input:전환가격(0.5); var:j(0),꺾은선(0),기준고(0),기준저(0),방향(0),상승(100),하락(-100),구분(0),매도(-1),매수(1); array:고[10](0),저[10](0); if 기준고 <= c or 기준고 == 0 then 기준고 = c; if 기준저 >= c or 기준저 == 0 then 기준저 = c; if 기준저[1] + 전환가격 >= c[1] and 기준저[1] + 전환가격 < c then 방향 = 상승; else if 기준고[1] - 전환가격 <= c[1] and 기준고[1] - 전환가격 > c then 방향 = 하락; if 방향[1] == 하락 and 방향 == 상승 then { for j = 8 downto 0 { 저[j+1] = 저[j]; } 저[0] = 기준저; 꺾은선 = 기준저; 기준저 = c; 기준고 = c; if 저[1] > 저[0] then 구분 = 매도; } if 방향[1] == 상승 and 방향 == 하락 then { for j = 8 downto 0 { 고[j+1] = 고[j]; } 고[0] = 기준고; 꺾은선 = 기준고; 기준고 = c; 기준저 = c; if 고[1] < 고[0] then 구분 = 매수; } if 꺾은선[1] != 꺾은선 then { // 여기서부터 수정 부탁합니다 검증은 되지만 신호 없네요 //plot1(꺾은선,"꺾은선",iff(구분==매수,red,blue)); } if marketposition() == 0 and marketposition() == 1 then { if 기준고[1] <= 0 buy(); } if 기준저[1] >= 0 sell(); } } if marketposition(1) == -1 and marketposition() == 0 then{ if 기준고[1] > 0 buy(); } } if marketposition(1) == 1 and marketposition() == 0 then{ if 기준저[1] < 0 sell(); } } if marketposition() == 1 then{ if 기준저[1] <= 0 exitlong(); } } if marketposition() == -1 then{ if 기준고[1] >= 0 exitshort(); } } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2007-07-18 10:19:02

> CJ_yang1130 님이 쓴 글입니다. > 제목 : 수식 요청 수정 부탁드립니다 > 안녕하세요 수식 짜는데 힘드네요 수정부탁합니다 답변은 yang12133 @ empal.com 으로 해주세요 감사합니다 연결선물 7분차트 에서 [내용] input:전환가격(0.5); var:j(0),꺾은선(0),기준고(0),기준저(0),방향(0),상승(100),하락(-100),구분(0),매도(-1),매수(1); array:고[10](0),저[10](0); if 기준고 <= c or 기준고 == 0 then 기준고 = c; if 기준저 >= c or 기준저 == 0 then 기준저 = c; if 기준저[1] + 전환가격 >= c[1] and 기준저[1] + 전환가격 < c then 방향 = 상승; else if 기준고[1] - 전환가격 <= c[1] and 기준고[1] - 전환가격 > c then 방향 = 하락; if 방향[1] == 하락 and 방향 == 상승 then { for j = 8 downto 0 { 저[j+1] = 저[j]; } 저[0] = 기준저; 꺾은선 = 기준저; 기준저 = c; 기준고 = c; if 저[1] > 저[0] then 구분 = 매도; } if 방향[1] == 상승 and 방향 == 하락 then { for j = 8 downto 0 { 고[j+1] = 고[j]; } 고[0] = 기준고; 꺾은선 = 기준고; 기준고 = c; 기준저 = c; if 고[1] < 고[0] then 구분 = 매수; } if 꺾은선[1] != 꺾은선 then { // 여기서부터 수정 부탁합니다 검증은 되지만 신호 없네요 //plot1(꺾은선,"꺾은선",iff(구분==매수,red,blue)); } if marketposition() == 0 and marketposition() == 1 then { if 기준고[1] <= 0 buy(); } if 기준저[1] >= 0 sell(); } } if marketposition(1) == -1 and marketposition() == 0 then{ if 기준고[1] > 0 buy(); } } if marketposition(1) == 1 and marketposition() == 0 then{ if 기준저[1] < 0 sell(); } } if marketposition() == 1 then{ if 기준저[1] <= 0 exitlong(); } } if marketposition() == -1 then{ if 기준고[1] >= 0 exitshort(); } } }