커뮤니티

문의 드립니다.

프로필 이미지
무결점
2015-05-13 11:56:52
147
글번호 85981
답변완료
Inputs : Loss(40); If LatestExitName(1)!="BL" and MarketPosition==0 Then Buy("Buy", OnClose, DEF, 1); If LatestExitName(1)!="SL" and MarketPosition==0 Then Sell("Sell", OnClose, DEF, 1); if MarketPosition==1 Then ExitLong("BL",AtStop,LatestEntryPrice-PriceScale*Loss,"Buy"); if MarketPosition==-1 Then ExitShort("SL",AtStop,LatestEntryPrice+PriceScale*Loss,"Sell"); 위 구문은 가장 최근에 청산했던 포지션이 손절이었을때는 매수나 매도를 안하게 하는 구문인데, If LatestExitName(1)!="BL" 청산명이 BL 이 아닐때만 매수하라고 했는데 계속 매수나, 매도를 반복하는 이유는 무엇인가요?
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-05-13 13:52:57

안녕하세요 예스스탁입니다. 해당식 적용해 봤지만 정상적으로 신호가 발생합니다. LatestExitName(1)은 가장최근의 청산완료된 거래의 청산명입니다. 직전거래의 청산이 BL이면 매수는 진입하지 않고 직전거래의 청산이 SL이면 매도는 진입하지 않습니다. 반대방향으로는 진입합니다. 즐거운 하루되세요 > 무결점 님이 쓴 글입니다. > 제목 : 문의 드립니다. > Inputs : Loss(40); If LatestExitName(1)!="BL" and MarketPosition==0 Then Buy("Buy", OnClose, DEF, 1); If LatestExitName(1)!="SL" and MarketPosition==0 Then Sell("Sell", OnClose, DEF, 1); if MarketPosition==1 Then ExitLong("BL",AtStop,LatestEntryPrice-PriceScale*Loss,"Buy"); if MarketPosition==-1 Then ExitShort("SL",AtStop,LatestEntryPrice+PriceScale*Loss,"Sell"); 위 구문은 가장 최근에 청산했던 포지션이 손절이었을때는 매수나 매도를 안하게 하는 구문인데, If LatestExitName(1)!="BL" 청산명이 BL 이 아닐때만 매수하라고 했는데 계속 매수나, 매도를 반복하는 이유는 무엇인가요?