커뮤니티
질문있습니다
2012-07-26 09:24:04
336
글번호 53281
변수지정에 관한 질문입니다
시가1포인트 상향시점을 기억했다가 그 지점을 0.5포인트 하향하거나
상승후 고점대비 1포인트 하락시 진입하지 않고 전상향돌파지점대비1포인트 상향돌파시에만 진입하도록할때
if marketposition==0 and cnt==0 and crossup(c, dayopen+1) then{
bcond=1;
value=c;
bindex=index;
cnt=cnt+1;
}
if bcond==1 and crossdown(c, value-0.5) then bcond=100;
if bcond==1 and crossdown(c, highest(c, index-bindex+1)[1]-1) then bcond=100;
if bcond==1 and marketposition==0 and entriestoday==0 and crossup(c, value+1) then buy();
1분봉시뮬레이션을 돌려보면 시가1포인트 돌파이후 0.5포인트 하락했는데도 전상향지점1포인트 돌파시 진입하는 경우가 발생하는 것을 확인했습니다
다른방식의 식표현말고 위 식에서 잘못된 부분을 설명부탁드립니다
답변 3
예스스탁 예스스탁 답변
2012-07-26 11:55:52
안녕하세요
예스스탁입니다.
올려주신 식 내용만으로는 정확히 판단할수가 없습니다.
변수의 초기화는 언제하는지 알수가 없습니다.
단순 당일 첫번째봉에서 초기화하게 하면
지정한 조건 위배되게 진입하는 것을 찾지 못하겠습니다.
var : cnt(0),bcond(0),bindex(0),value(0);
if date != date[1] then{
cnt = 0;
bcond = 0;
}
if marketposition==0 and cnt==0 and crossup(c, dayopen+1) then{
bcond=1;
value=c;
bindex=index;
cnt=cnt+1;
}
if bcond==1 and crossdown(c, value-0.5) then
bcond=100;
if bcond==1 and crossdown(c, highest(c, index-bindex+1)[1]-1) then
bcond=100;
if bcond==1 and marketposition==0 and entriestoday(sdate)==0 and crossup(c, value+1) then
buy();
신호가 잘못나온 곳이 차트를 캡쳐하셔서 첨부해서 올려주시기 바랍니다.
수식내용도 변수 초기화 부분도 같이 올려주시기 바랍니다.
즐거운 하루되세요
> 공부중 님이 쓴 글입니다.
> 제목 : 질문있습니다
> 변수지정에 관한 질문입니다
시가1포인트 상향시점을 기억했다가 그 지점을 0.5포인트 하향하거나
상승후 고점대비 1포인트 하락시 진입하지 않고 전상향돌파지점대비1포인트 상향돌파시에만 진입하도록할때
if marketposition==0 and cnt==0 and crossup(c, dayopen+1) then{
bcond=1;
value=c;
bindex=index;
cnt=cnt+1;
}
if bcond==1 and crossdown(c, value-0.5) then bcond=100;
if bcond==1 and crossdown(c, highest(c, index-bindex+1)[1]-1) then bcond=100;
if bcond==1 and marketposition==0 and entriestoday==0 and crossup(c, value+1) then buy();
1분봉시뮬레이션을 돌려보면 시가1포인트 돌파이후 0.5포인트 하락했는데도 전상향지점1포인트 돌파시 진입하는 경우가 발생하는 것을 확인했습니다
다른방식의 식표현말고 위 식에서 잘못된 부분을 설명부탁드립니다
공부중
2012-07-26 12:22:38
공부중 님에 의해 삭제된 답변입니다.
예스스탁 예스스탁 답변
2012-07-26 13:28:01
> 공부중 님이 쓴 글입니다.
> 제목 : Re : Re : 질문있습니다
>
변수초기화부분은 답변에 쓰신바와 동일합니다
2011.11.4일자를 캡쳐하여 보내드립니다
청산은 진입가보다 0.5포인트 낮을때 손절만 있습니다
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 질문있습니다
> 안녕하세요
예스스탁입니다.
올려주신 식 내용만으로는 정확히 판단할수가 없습니다.
변수의 초기화는 언제하는지 알수가 없습니다.
단순 당일 첫번째봉에서 초기화하게 하면
지정한 조건 위배되게 진입하는 것을 찾지 못하겠습니다.
var : cnt(0),bcond(0),bindex(0),value(0);
if date != date[1] then{
cnt = 0;
bcond = 0;
}
if marketposition==0 and cnt==0 and crossup(c, dayopen+1) then{
bcond=1;
value=c;
bindex=index;
cnt=cnt+1;
}
if bcond==1 and crossdown(c, value-0.5) then
bcond=100;
if bcond==1 and crossdown(c, highest(c, index-bindex+1)[1]-1) then
bcond=100;
if bcond==1 and marketposition==0 and entriestoday(sdate)==0 and crossup(c, value+1) then
buy();
신호가 잘못나온 곳이 차트를 캡쳐하셔서 첨부해서 올려주시기 바랍니다.
수식내용도 변수 초기화 부분도 같이 올려주시기 바랍니다.
즐거운 하루되세요
> 공부중 님이 쓴 글입니다.
> 제목 : 질문있습니다
> 변수지정에 관한 질문입니다
시가1포인트 상향시점을 기억했다가 그 지점을 0.5포인트 하향하거나
상승후 고점대비 1포인트 하락시 진입하지 않고 전상향돌파지점대비1포인트 상향돌파시에만 진입하도록할때
if marketposition==0 and cnt==0 and crossup(c, dayopen+1) then{
bcond=1;
value=c;
bindex=index;
cnt=cnt+1;
}
if bcond==1 and crossdown(c, value-0.5) then bcond=100;
if bcond==1 and crossdown(c, highest(c, index-bindex+1)[1]-1) then bcond=100;
if bcond==1 and marketposition==0 and entriestoday==0 and crossup(c, value+1) then buy();
1분봉시뮬레이션을 돌려보면 시가1포인트 돌파이후 0.5포인트 하락했는데도 전상향지점1포인트 돌파시 진입하는 경우가 발생하는 것을 확인했습니다
다른방식의 식표현말고 위 식에서 잘못된 부분을 설명부탁드립니다
다음글
이전글