커뮤니티

질문이여~ ^^

프로필 이미지
하느을
2007-01-12 13:35:50
1225
글번호 11694
답변완료
항상 친절한 답변에 감사드립니다. 같은것으로 여러번 질문드려서 죄송합니다. 식을 수정한 결과 추격매도는 실행이 되는데 조건을 만족하지않는 시점에 실행되고 있습니다. 제 의도는 이전 최저점을 하향 이탈하면 다시 매도하려는것인데 엉뚱한 시점에서 추격 매도가 나오고 있습니다. 답변주시면 감사하겠습니다. 그리고 MinutesToTime() 가 어떤 함수인지 궁금합니다. 어떤상황에 사용하는지 모르겠습니다. 수고하십시오.. 시스템식 /* 1.차트속성 -적용종목 : 연결선물지수 -사용주기 : 5분 -수정주가 : 적용안함 2.시스템설정 -강제청산시점: 조건만족시즉시 -강제청산 : 최대허용손실 0.3p -당일청산여부 : 당일청산적용 ( 14:50 ) 3. 매매전략 -매수 : 당일시가에서 전일 변동폭(고가-저가)의 일정수준( default : 전일 변동폭의 35%로 시뮬레이션)을 상향돌파할 경우 매수 -매도 : 당일시가에서 전일 변동폭(고가-저가)의 일정수준( default : 전일 변동폭의 35%로 시뮬레이션)을 하향돌파할 경우 매도 -주문가격 : OnClose -강제청산 적용후 다시 고저가 돌파시 추격매수 */ input : default(0.35); var : range(0), scnt(0),bcnt(0); range= (dayhigh(1)-daylow(1))*default; if date!=date[1] then { scnt=0; bcnt=0; } #매수 if stime<1440000 then { if bcnt==0 and crossup (c, dayopen()+range) then { buy ("매수") ; bcnt=bcnt+1; } } #매도 if stime<1440000 then{ if scnt==0 and crossdown (c, dayopen()-range) then { sell ("매도") ; scnt=scnt+1; } } #추격매수 if stime<1440000 then{ if bcnt != 0 and crossup(c,timeHigh(090000,stime[1])) then { buy ("추격매수") ; bcnt=bcnt+1 ; } } #추격매도 if stime<1440000 then { if scnt !=0 and crossdown(c,timelow(090000,stime[1])) then { sell ("추격매도") ; scnt=scnt+1 ; } } #강제청산 setstoploss (0.3,pointstop); #당일청산 setstopendofday (145000);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2007-01-12 14:26:43

안녕하세요 예스스탁입니다. 식을 수정했습니다. 시간 함수에 이전값 참조가 되어 잘못된 계산값을 가지고 왔습니다. input : default(0.35); var : range(0), scnt(0),bcnt(0); range= (dayhigh(1)-daylow(1))*default; if date!=date[1] then { scnt=0; bcnt=0; } #매수 if stime<1440000 then { if bcnt==0 and crossup (c, dayopen()+range) then { buy ("매수") ; bcnt=bcnt+1; } } #매도 if stime<1440000 then{ if scnt==0 and crossdown (c, dayopen()-range) then { sell ("매도") ; scnt=scnt+1; } } #추격매수 if stime<1440000 then{ if bcnt != 0 and crossup(c,timelow(090000,stime)[1]) then { buy ("추격매수") ; bcnt=bcnt+1 ; } } #추격매도 if stime<1440000 then { if scnt !=0 and crossdown(c,timelow(090000,stime)[1]) then { sell ("추격매도") ; scnt=scnt+1 ; } } #강제청산 setstoploss (0.3,pointstop); #당일청산 setstopendofday (145000); ################################## timelow(090000,stime)[1] 대신에 daylow()[1] timehigh(090000,stime)[1] 대신에 dayhigh()[1] 를 사용하셔도 됩니다. > 하느을 님이 쓴 글입니다. > 제목 : 질문이여~ ^^ > 항상 친절한 답변에 감사드립니다. 같은것으로 여러번 질문드려서 죄송합니다. 식을 수정한 결과 추격매도는 실행이 되는데 조건을 만족하지않는 시점에 실행되고 있습니다. 제 의도는 이전 최저점을 하향 이탈하면 다시 매도하려는것인데 엉뚱한 시점에서 추격 매도가 나오고 있습니다. 답변주시면 감사하겠습니다. 그리고 MinutesToTime() 가 어떤 함수인지 궁금합니다. 어떤상황에 사용하는지 모르겠습니다. 수고하십시오.. 시스템식 /* 1.차트속성 -적용종목 : 연결선물지수 -사용주기 : 5분 -수정주가 : 적용안함 2.시스템설정 -강제청산시점: 조건만족시즉시 -강제청산 : 최대허용손실 0.3p -당일청산여부 : 당일청산적용 ( 14:50 ) 3. 매매전략 -매수 : 당일시가에서 전일 변동폭(고가-저가)의 일정수준( default : 전일 변동폭의 35%로 시뮬레이션)을 상향돌파할 경우 매수 -매도 : 당일시가에서 전일 변동폭(고가-저가)의 일정수준( default : 전일 변동폭의 35%로 시뮬레이션)을 하향돌파할 경우 매도 -주문가격 : OnClose -강제청산 적용후 다시 고저가 돌파시 추격매수 */ input : default(0.35); var : range(0), scnt(0),bcnt(0); range= (dayhigh(1)-daylow(1))*default; if date!=date[1] then { scnt=0; bcnt=0; } #매수 if stime<1440000 then { if bcnt==0 and crossup (c, dayopen()+range) then { buy ("매수") ; bcnt=bcnt+1; } } #매도 if stime<1440000 then{ if scnt==0 and crossdown (c, dayopen()-range) then { sell ("매도") ; scnt=scnt+1; } } #추격매수 if stime<1440000 then{ if bcnt != 0 and crossup(c,timeHigh(090000,stime[1])) then { buy ("추격매수") ; bcnt=bcnt+1 ; } } #추격매도 if stime<1440000 then { if scnt !=0 and crossdown(c,timelow(090000,stime[1])) then { sell ("추격매도") ; scnt=scnt+1 ; } } #강제청산 setstoploss (0.3,pointstop); #당일청산 setstopendofday (145000);