커뮤니티

문의드림니다

프로필 이미지
mao
2012-12-27 13:12:19
268
글번호 57628
답변완료
아래 수식을 참조데이타(data2) 로 변환 부탁드림니다 (주차트는 2분봉 참조차트는 5분봉 을 사용) 즉 참조데이타(5분봉)에서 봉의종가가 20 이평을 상향돌파 하면 이 시점 으로 부터 주차트(2분봉)에서 5개봉의 최고가를 entryprice로 저장하여 주차트에서 5개봉 최고가를 atstop으로 돌파시 매수진입하는 수식을 작성하고 싶은데 아래수식을 그대로 data2로 변환하면 atstop 매수를 data2와 같이 사용할 수 없기 때문에 이점을 고려하여 변환 부탁드림니다 vars: entryprice(0),count(-999); if date != date[1] Then{ Condition1 = False; } if crossup( C,ma(c,20) ) and index > 1 then { entryprice = highest(h,5)[1]; count = Index; Condition1 = true; } If marketposition== 0 and Condition1 and index < count + 5 then{ buy ("b",AtStop, entryprice); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-12-27 14:49:13

안녕하세요 예스스탁입니다. atstop이나 atlimit은 지정한 가격과 주종목의 시세만을 비교합니다 참조데이터를 이용하실 때는 if문 안에 가격조건 비교식을 넣어주셔야 합니다. var : Cond1(false,data2),Eprice(0,data2),count(-999,data2); if data2(date != date[1]) Then{ Cond1 = False; } if data2(crossup( C,ma(c,20) ) and index > 1) then { Eprice = data2(highest(h,5)[1]); count = data2(Index); Cond1 = true; } If marketposition== 0 and Cond1 == true and data2(index) < count + 5 and data2(H >= Eprice) then buy ("b"); 참조데이터 data2가 주종목과 같은 종목이시면 아래와 같이 atstop을 사용하셔도 됩니다. var : Cond1(false,data2),Eprice(0,data2),count(-999,data2); if data2(date != date[1]) Then{ Cond1 = False; } if data2(crossup( C,ma(c,20) ) and index > 1) then { Eprice = data2(highest(h,5)[1]); count = data2(Index); Cond1 = true; } If marketposition== 0 and Cond1 == true and data2(index) < count + 5 then buy ("b",AtStop,Eprice); 즐거운 하루되세요 > mao 님이 쓴 글입니다. > 제목 : 문의드림니다 > 아래 수식을 참조데이타(data2) 로 변환 부탁드림니다 (주차트는 2분봉 참조차트는 5분봉 을 사용) 즉 참조데이타(5분봉)에서 봉의종가가 20 이평을 상향돌파 하면 이 시점 으로 부터 주차트(2분봉)에서 5개봉의 최고가를 entryprice로 저장하여 주차트에서 5개봉 최고가를 atstop으로 돌파시 매수진입하는 수식을 작성하고 싶은데 아래수식을 그대로 data2로 변환하면 atstop 매수를 data2와 같이 사용할 수 없기 때문에 이점을 고려하여 변환 부탁드림니다 vars: entryprice(0),count(-999); if date != date[1] Then{ Condition1 = False; } if crossup( C,ma(c,20) ) and index > 1 then { entryprice = highest(h,5)[1]; count = Index; Condition1 = true; } If marketposition== 0 and Condition1 and index < count + 5 then{ buy ("b",AtStop, entryprice); }