커뮤니티

질문드립니다.

프로필 이미지
yanartas
2015-09-30 18:23:29
116
글번호 90811
답변완료
시스템식 질문드립니다. 예를들어 진입식이 input : m1(10); if marketposition == 0 and crossup(c, m1) then { buy("b", atmarket, def, 1); } 있다고 가정하고, 청산식이 input : m2(20); if marketposition == 1 and crossdown(c, m2) then { exitlong("x", atmarket);} if marketposition <> 0 and crossdown(c, m2) then { exitlong("x", atmarket); } if crossdown(c, m2) then { exitlong("x", atmarket); } 이 세 청산식이 구체적으로 어떻게 다른지 궁금합니다. 즉 marketposition == 1 과 marketposition <> 0 의 차이점은 무었인지 궁금하고, marketposition을 설정하는 경우와 안하는 경우에 차이점이 있는지 궁금합니다. 청산시점이나 청산가격에 차이점을 구체적으로 알고 싶습니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-10-01 09:08:14

안녕하세요 예스스탁입니다. input : m2(20); #1) #매수포지션 진입중 종가가 m2를 상향돌파하는 봉이 완성되면 다음봉 시가에 청산 if marketposition == 1 and crossdown(c, m2) then { exitlong("x", atmarket);} #2) #무포지션이 아니면(매수나 매도로 진입중) #종가가 m2를 상향돌파하는 봉이 완성되면 다음봉 시가에 청산 if marketposition <> 0 and crossdown(c, m2) then { exitlong("x", atmarket); } #3) #종가가 m2를 상향돌파하는 봉이 완성되면 다음봉 시가에 청산 if crossdown(c, m2) then { exitlong("x", atmarket); } 3개식 차이점은 없습니다. 단지 조건문에 매수진입중이라는 조건을 있느냐 없느냐의 차이인데 매수포지션 청산함수는 매수진입신호가 있어야 발생(marketposition ==1)하므로 해당식에서 marketposition == 1나 marketposition <> 0가 있어도 되고 없어도 됩니다. 마찬가지로 marketposition <> 0는 무포지션이 아니라는 내용인데 exitlong이 매수진입중에만 발생하므로 marketposition == 1과 같습니다. 현재 식이 진입(crossup(c, m1))과 청산(crossdown(c, m1))이 반대 조건입니다. 동시에 한봉에서 만족할수 없습니다. 만약 하나에 봉에 진입과 청산조건이 동시에 만족할 경우도 내용이면 진입은 crossup(c, m1) 청산은 crossdown(C,m1과 다른값) marketposition == 1나 marketposition <> 0이 있으면 청산은 진입신호가 발생한봉에서 나오지 못합니다. marketposition == 1나 marketposition <> 0이 없으면 진입봉에서 청산도 나올수 있습니다. 즉 청산조건식에 marketposition을 쓰는 것은 진입된것을 확인하고 라는 의미이고 진입봉에서 나오지 못하게 제어하는 것입니다. 즐거운 하루되세요 > yanartas 님이 쓴 글입니다. > 제목 : 질문드립니다. > 시스템식 질문드립니다. 예를들어 진입식이 input : m1(10); if marketposition == 0 and crossup(c, m1) then { buy("b", atmarket, def, 1); } 있다고 가정하고, 청산식이 input : m2(20); if marketposition == 1 and crossdown(c, m2) then { exitlong("x", atmarket);} if marketposition <> 0 and crossdown(c, m2) then { exitlong("x", atmarket); } if crossdown(c, m2) then { exitlong("x", atmarket); } 이 세 청산식이 구체적으로 어떻게 다른지 궁금합니다. 즉 marketposition == 1 과 marketposition <> 0 의 차이점은 무었인지 궁금하고, marketposition을 설정하는 경우와 안하는 경우에 차이점이 있는지 궁금합니다. 청산시점이나 청산가격에 차이점을 구체적으로 알고 싶습니다. 감사합니다.