커뮤니티

부탁 드립니다.

프로필 이미지
고운무지개
2013-12-04 12:46:26
106
글번호 70110
답변완료
33473 질문에 주신 답 중 이해를 못하는 부분이 있어서 문의 드립니다. 일부청산 후 본절을 위한 수식과 btr, str의 수식에 대해 설명 좀 부탁드립니다. btr과 str이 어떻게 작동되는지 이해를 하고 싶습니다. 첫 진입 후 매도일부청산1 이나 매수일부청산1 이 나오면 btr, str 작동하게 수식을 바꿔봤는데 안되더라구요. 수식 수정도 부탁 드립니다. #일부 청산 후 본절을 위한 수식 Condition1 = EntryDate(4) == sdate and (IsEntryName("sb4",4) == true or IsEntryName("bs4",4) == true) and (IsEntryName("sb4",3) == true or IsEntryName("bs4",3) == true) And (IsEntryName("sb4",2) == true or IsEntryName("bs4",2) == true) And (IsEntryName("sb4",1) == true or IsEntryName("bs4",1) == true); if MarketPosition == 1 and (IsEntryName("sb1",0) == true or IsEntryName("sb2",0) == true or IsEntryName("sb3",0) == true or IsEntryName("sb4",0) == true) And countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) >= 1 Then ExitLong("btr",AtStop,EntryPrice); if MarketPosition == -1 and (IsEntryName("bs1",0) == true or IsEntryName("bs2",0) == true or IsEntryName("bs3",0) == true or IsEntryName("bs4",0) == true) And countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) >= 1 Then ExitShort("str",AtStop,EntryPrice);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-12-04 15:24:11

안녕하세요 예스스탁입니다. 주석으로 설명을 남겨드립니다. btr이나 str청산과는 관계가 없습니다. 청산 if 문에 condition1 변수가 사용되지 않습니다. #일부 청산 후 본절을 위한 수식 #당일 직전에 4번이상 거래가 있고 #4번의 거래의 진입명이 sb4나 bs4이면 #condition1은 true 아니면 false Condition1 = EntryDate(4) == sdate and (IsEntryName("sb4",4) == true or IsEntryName("bs4",4) == true) and (IsEntryName("sb4",3) == true or IsEntryName("bs4",3) == true) And (IsEntryName("sb4",2) == true or IsEntryName("bs4",2) == true) And (IsEntryName("sb4",1) == true or IsEntryName("bs4",1) == true); #매수포지션 상태이고 #진입명이 Sb1,sb2,sb3,sb4 중 하나이고 #일부 청산이 한번이상 발생하고(진입이후에 분할로 한번 청산이 발생한 이후) #진입가 이하의 시세가 발생하면 매수청산 if MarketPosition == 1 and (IsEntryName("sb1",0) == true or IsEntryName("sb2",0) == true or IsEntryName("sb3",0) == true or IsEntryName("sb4",0) == true) And countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) >= 1 Then ExitLong("btr",AtStop,EntryPrice); #매도포지션 상태이고 #진입명이 bs1,bs2,bs3,bs4 중 하나이고 #일부 청산이 한번이상 발생하고(진입이후에 분할로 한번 청산이 발생한 이후) #진입가 이상의 시세가 발생하면 매도청산 if MarketPosition == -1 and (IsEntryName("bs1",0) == true or IsEntryName("bs2",0) == true or IsEntryName("bs3",0) == true or IsEntryName("bs4",0) == true) And countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) >= 1 Then ExitShort("str",AtStop,EntryPrice); 즐거운 하루되세요 > 고운무지개 님이 쓴 글입니다. > 제목 : 부탁 드립니다. > 33473 질문에 주신 답 중 이해를 못하는 부분이 있어서 문의 드립니다. 일부청산 후 본절을 위한 수식과 btr, str의 수식에 대해 설명 좀 부탁드립니다. btr과 str이 어떻게 작동되는지 이해를 하고 싶습니다. 첫 진입 후 매도일부청산1 이나 매수일부청산1 이 나오면 btr, str 작동하게 수식을 바꿔봤는데 안되더라구요. 수식 수정도 부탁 드립니다. #일부 청산 후 본절을 위한 수식 Condition1 = EntryDate(4) == sdate and (IsEntryName("sb4",4) == true or IsEntryName("bs4",4) == true) and (IsEntryName("sb4",3) == true or IsEntryName("bs4",3) == true) And (IsEntryName("sb4",2) == true or IsEntryName("bs4",2) == true) And (IsEntryName("sb4",1) == true or IsEntryName("bs4",1) == true); if MarketPosition == 1 and (IsEntryName("sb1",0) == true or IsEntryName("sb2",0) == true or IsEntryName("sb3",0) == true or IsEntryName("sb4",0) == true) And countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) >= 1 Then ExitLong("btr",AtStop,EntryPrice); if MarketPosition == -1 and (IsEntryName("bs1",0) == true or IsEntryName("bs2",0) == true or IsEntryName("bs3",0) == true or IsEntryName("bs4",0) == true) And countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) >= 1 Then ExitShort("str",AtStop,EntryPrice);