커뮤니티

문의드립니다.

프로필 이미지
카르마다
2026-01-02 15:27:50
59
글번호 229525
답변완료

아래는 선물 청산식입니다.


if MarketPosition == 1 and

C[BarsSinceEntry]+3 > O[BarsSinceEntry]+3 and C[BarsSinceEntry]+2 > O[BarsSinceEntry]+2 and C[BarsSinceEntry]+1 > O[BarsSinceEntry]+1 and C[BarsSinceEntry] > O[BarsSinceEntry] and

C[2] < O[2] and C[1] < O[1] and C < O Then

ExitLong("매수_33",OnClose,Def,"",1,1);


매수신호 발생전 3양봉(매수신호발생까지 포함시 4양봉) 발생한 후

3양봉이 연달아 나오면 청산하는 식인데 안맞는 거 같아 확인과 수정부탁드립니다~

시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2026-01-05 09:32:47

안녕하세요 예스스탁입니다. +3과 같은 봉수가 BarsSinceEntry 뒤에 붙어야 합니다. if MarketPosition == 1 and C[BarsSinceEntry+3] > O[BarsSinceEntry+3] and C[BarsSinceEntry+2] > O[BarsSinceEntry+2] and C[BarsSinceEntry+1] > O[BarsSinceEntry+1] and C[BarsSinceEntry] > O[BarsSinceEntry] and C[2] < O[2] and C[1] < O[1] and C < O Then ExitLong("매수_33",OnClose,Def,"",1,1); 새해 복 많이 받으세요