커뮤니티

청산식

프로필 이미지
mizz
2013-03-26 11:01:46
212
글번호 61227
답변완료

첨부 이미지

} mp = marketposition; if MP == 1 and MP[1] <> 1 then Begin StopPrice = low - ma(range,4)*mult; end; if MP == -1 and MP[1] <> -1 then begin StopPrice = High + ma(range,4)*mult; end; If MP == 1 then begin exitlong ("ExitLong", atstop,stopprice ); stopprice = stopprice +( low-stopprice )/Div; end; If MP == -1 then begin exitshort ("Exitshort", atstop,stopprice); stopprice = stopprice - (stopprice-high)/Div; end; setstopendofday(150400); ----------------------------------------------------------------------- 위는 어제 질문한 시스템의 청산식입니다. 어제 드렸던 질문에서 청산식은 포지션과 관련이 있어 지표로 만들수 없다 말씀하셔 이런저런 고민끝에 비슷하게라도 만들어 보자는 생각으로 매수청산식만 다음과 같이 지표로 만들어 보았습니다 ------------------------------------------------------------------------- Inputs: DiV(25), mult(5); vars: StopPrice(0), StopPrice2(0); StopPrice = low - ma(range,4)*mult; StopPrice2 = stopprice +( low-stopprice )/Div; Plot1(StopPrice, "1"); Plot2(StopPrice2, "2"); -------------------------------------------------------------------------- 이렇게하면 plot1 과 plot2가 겹치는 부분이 청산시점 아닌가요? 첨부파일을 보시면 아시겠지만 겹치는 부분이 나오지 않더군요ㅠ 엑셀로 해봐도 해당순간이든 봉완성 시점이든 겹치는 부분, 즉 두 수가 같아지는 부분이 나오질 않습니다. 뭐가 잘못된건지 알려주세요ㅠ
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-03-26 11:35:45

안녕하세요 예스스탁입니다. 청산식에 사용된 stopprice 는 if MP == 1 and MP[1] <> 1 then 이나 if MP == -1 and MP[1] <> -1 then 일때 저장되는 값입니다. mp = marketposition; MP는 marketposition으로 봉의 포지션 상태를 나타냅니다 즉 진입신호가 발생해서 매수진입 들어가거나 매도진입에 들어간 봉을 나타내게 되는데 지표식에서는 marketposition을 사용할수 없어 그 위치에서 정확히 값을 저장할수가 없습니다. 현재 작성하신 지표식에서 stopprice 는 특정(진입발생)봉의 값이 아닌 매봉 low - ma(range,4)*mult을 계산해 사용하는 식입니다. 즐거운 하루되세요 > mizz 님이 쓴 글입니다. > 제목 : 청산식 > } mp = marketposition; if MP == 1 and MP[1] <> 1 then Begin StopPrice = low - ma(range,4)*mult; end; if MP == -1 and MP[1] <> -1 then begin StopPrice = High + ma(range,4)*mult; end; If MP == 1 then begin exitlong ("ExitLong", atstop,stopprice ); stopprice = stopprice +( low-stopprice )/Div; end; If MP == -1 then begin exitshort ("Exitshort", atstop,stopprice); stopprice = stopprice - (stopprice-high)/Div; end; setstopendofday(150400); ----------------------------------------------------------------------- 위는 어제 질문한 시스템의 청산식입니다. 어제 드렸던 질문에서 청산식은 포지션과 관련이 있어 지표로 만들수 없다 말씀하셔 이런저런 고민끝에 비슷하게라도 만들어 보자는 생각으로 매수청산식만 다음과 같이 지표로 만들어 보았습니다 ------------------------------------------------------------------------- Inputs: DiV(25), mult(5); vars: StopPrice(0), StopPrice2(0); StopPrice = low - ma(range,4)*mult; StopPrice2 = stopprice +( low-stopprice )/Div; Plot1(StopPrice, "1"); Plot2(StopPrice2, "2"); -------------------------------------------------------------------------- 이렇게하면 plot1 과 plot2가 겹치는 부분이 청산시점 아닌가요? 첨부파일을 보시면 아시겠지만 겹치는 부분이 나오지 않더군요ㅠ 엑셀로 해봐도 해당순간이든 봉완성 시점이든 겹치는 부분, 즉 두 수가 같아지는 부분이 나오질 않습니다. 뭐가 잘못된건지 알려주세요ㅠ