커뮤니티
다시 질문드립니다. ^^
2007-01-10 16:45:17
1315
글번호 11684
안녕하세요. ^^
지난번 답변 너무 감사드립니다.
질문을 알기 어렵게 드린것 같아서 다시한번 식 전체를 올립니다.
문제는 매수/매도 한후 청산한 다음에 bcnt==0 ,scnt==0 조건을 만족하지도 않는데, 계속해서 매수/매도 만 실행되고 추격매수/추격매도는 실행되지 안습니다.(첨부파일 참조)
어느부분이 잘못된것인지 알려주시면 감사하겠습니다.
시스템식은 다음과 같이 입력했습니다.
/*
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;
scnt=0;
bcnt=0;
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;}
#강제청산
setstoploss (0.3,pointstop);
#추격매수
if stime<1440000 then{
if bcnt!=0 and crossup(c,timeHighEX(090000,stime[1])) then {
buy ("추격매수") ;
bcnt=bcnt+1 ;
} }
#추격매도
if stime<1440000 then {
if scnt!=0 and crossdown(c,timeloWEX(090000,stime[1])) then {
sell ("추격매도") ;
scnt=scnt+1 ;
} }
#당일청산
setstopendofday (145000);
- 1. 11827_차트.jpg (0.04 MB)
답변 1
예스스탁 예스스탁 답변
2007-01-11 17:14:11
안녕하세요
예스스탁입니다.
bcnt = 0;
scnt = 0;
부분때문에 추격부분이 신호가 나오지 않았습니다.
bcnt = 0;
scnt = 0;
와 같은 경우 매봉 bcnt,scnt 값을 0으로 만듭니다.
수정해서 올려드립니다.
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);
즐거운 하루되세요
> 하느을 님이 쓴 글입니다.
> 제목 : 다시 질문드립니다. ^^
> 안녕하세요. ^^
지난번 답변 너무 감사드립니다.
질문을 알기 어렵게 드린것 같아서 다시한번 식 전체를 올립니다.
문제는 매수/매도 한후 청산한 다음에 bcnt==0 ,scnt==0 조건을 만족하지도 않는데, 계속해서 매수/매도 만 실행되고 추격매수/추격매도는 실행되지 안습니다.(첨부파일 참조)
어느부분이 잘못된것인지 알려주시면 감사하겠습니다.
시스템식은 다음과 같이 입력했습니다.
/*
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;
scnt=0;
bcnt=0;
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;}
#강제청산
setstoploss (0.3,pointstop);
#추격매수
if stime<1440000 then{
if bcnt!=0 and crossup(c,timeHighEX(090000,stime[1])) then {
buy ("추격매수") ;
bcnt=bcnt+1 ;
} }
#추격매도
if stime<1440000 then {
if scnt!=0 and crossdown(c,timeloWEX(090000,stime[1])) then {
sell ("추격매도") ;
scnt=scnt+1 ;
} }
#당일청산
setstopendofday (145000);
다음글