커뮤니티
매수청산포지션후 재진입
2004-06-21 12:35:08
1185
글번호 4167
매수포지션후 매수청산 규칙에 의해 청산 했으나, 매수 청산 신호를 잘못된 신호로
간주하고 최근 10개봉의 최고가를 돌파하면 재진입하는 식을 만들고 싶습니다.
var:currentPosition(0), ReLEntrycount(0);
currentPosition=MarketPosition(0);
if CurrentPosition == 0 and CurrentPosition[1] == 1 then ReLEntrycount=1;
if MarketPosition(0)==0 and MarketPosition(1)==1 and ReLEntryCount<10 then
ReLEntrycount=ReLEntrycount + 1;
if c>=highest(h, 10) and ReLEntrycount < 10 then buy("재매수");
논리적으로 오류가 없다고 생각하는데...실행시켜보면 재매수 신호가
매수청산이후 발생하는게 아니라 최초 신호로 발생하는 등의 오류가 있어서...
그럼 부탁 드립니다.
답변 1
회원
2004-06-22 12:14:17
매수포지션후 매수청산 규칙에 의해 청산 했으나, 매수 청산 신호를 잘못된 신호로
간주하고 최근 10개봉의 최고가를 돌파하면 재진입하는 식을 만들고 싶습니다.
여기에 매수 청산후 15개 봉까지만 유효한 조건을 첨가하고 싶습니다.
그리고 최근 10개봉은 현재봉 이전봉을 기준으로 10개이니깐
c>=highest(h, 10) 이 부분도 c>=highest(h, 10)[1] 이렇게 고쳐야 하나요?
var:currentPosition(0), ReLEntrycount(0);
currentPosition=MarketPosition(0);
if CurrentPosition == 0 and CurrentPosition[1] == 1 then ReLEntrycount=1;
if MarketPosition(0)==0 and MarketPosition(1)==1 and ReLEntryCount<15 then
ReLEntrycount=ReLEntrycount + 1;
if c>=highest(h, 10) and ReLEntrycount < 10 then buy("재매수");
> HH_bebored 님이 쓴 글입니다.
> 제목 : 매수청산포지션후 재진입
> 매수포지션후 매수청산 규칙에 의해 청산 했으나, 매수 청산 신호를 잘못된 신호로
간주하고 최근 10개봉의 최고가를 돌파하면 재진입하는 식을 만들고 싶습니다.
var:currentPosition(0), ReLEntrycount(0);
currentPosition=MarketPosition(0);
if CurrentPosition == 0 and CurrentPosition[1] == 1 then ReLEntrycount=1;
if MarketPosition(0)==0 and MarketPosition(1)==1 and ReLEntryCount<10 then
ReLEntrycount=ReLEntrycount + 1;
if c>=highest(h, 10) and ReLEntrycount < 10 then buy("재매수");
논리적으로 오류가 없다고 생각하는데...실행시켜보면 재매수 신호가
매수청산이후 발생하는게 아니라 최초 신호로 발생하는 등의 오류가 있어서...
그럼 부탁 드립니다.
이전글