커뮤니티

재문의

프로필 이미지
오이도인
2008-12-09 13:31:49
1069
글번호 18651
답변완료
빠른 답변 감사합니다.. 1] 시가 위 일정 범위 돌파시마다 진입하여 진입수량 4개까지 피라미딩 가능한 식으로 아래와 같이 만들어봤는데.. [나중엔 최대 10개까지로 하려고 생각중입니다] 조금 이상합니다..원하는대로 안들어가네요.. 수정 부탁드립니다... 2] 일최대진입수량은 11개로 제한하여면 어떤 구문을 추가해야하나요..? 아래 "일최대진입횟수"가 진입 수량을 제한하는게 아니라..피라미딩 횟수를 나타내는 것 같네요.. 3] 또,손절이나 익절의 경우 Isentryname("ba") 처럼 지정하여.. 진입명이 ba 인 진입만 처리할수는 없는건가요? if isentryname("ba") then exitlong("baCS",AtStop,entryBA-1,"",1,1); 이런 식으론 안되는건지요? 수고하세요.. ########################################################################## var: countN(0),cntN(0); vars : entryBA(0),entryBB(0),entryBC(0),entryBD(0); input : 일최대진입횟수(5); input : entrystime(090000),entryftimeB(143000) ; input : pyramidgap(0.5) ; countN = 0; for cntN = 0 to 10 { if sdate == EntryDate(cntN) Then countN = countN+1; } ## BA if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 0 and C> dayOpen() and countN <일최대진입횟수 Then { if crossup(C,dayopen()+pyramidgap) Then{ //pyramidgap 돌파시 buy("ba"); entryBA = C; //ba의 진입가 } } ## BB if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 1 and CurrentEntries() == 1 and countN <일최대진입횟수-1 and accumn(iff(CurrentEntries == 2,1,0),BarsSinceEntry()+1) < 1 Then { if crossup(C,dayopen()+pyramidgap*2) Then{ //pyramidgap 돌파시 buy("bb"); entryBB = C; //bb의 진입가 } } ## BC if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 1 and CurrentEntries() == 2 and countN <일최대진입횟수-2 and accumn(iff(CurrentEntries == 3,1,0),BarsSinceEntry()+1) < 2 Then { if crossup(C,dayopen()+pyramidgap*3) Then{ //pyramidgap 돌파시 buy("bc"); entryBC = C; //bc의 진입가 } } ## BD if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 1 and CurrentEntries() == 3 and countN <일최대진입횟수-3 and accumn(iff(CurrentEntries == 4,1,0),BarsSinceEntry()+1) < 3 Then { if crossup(C,dayopen()+pyramidgap*3) Then{ //pyramidgap 돌파시 buy("bd"); entryBD = C; //bd의 진입가 } } ########################################################################## input : CSlen(1.5),TSplen(1.9),returnTSlen(0.8) ; ## BA매수만 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() == 1 then { exitlong("baCS",AtStop,entryBA-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBA+TSplen Then exitlong("baTS",AtStop,highest(C,BarsSinceEntry)-returnTSlen,"",1,1); } ## BA와 BB 2개 진입이 피라미딩으로 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() == 2 then { exitlong("bbCS",AtStop,entryBB-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBB+TSplen Then exitlong("bbTS",AtStop,highest(H,BarsSinceEntry)-returnTSlen,"",1,1); } ## BA,BB & BC 3개 진입이 피라미딩으로 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() >= 3 then { exitlong("bcCS",AtStop,entryBC-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBC+TSplen Then exitlong("bcTS",AtStop,highest(H,BarsSinceEntry)-returnTSlen,"",1,1); } ## BA,BB,BC & BD 4개 진입이 피라미딩으로 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() >= 4 then { exitlong("bdCS",AtStop,entryBD-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBD+TSplen Then exitlong("bdTS",AtStop,highest(H,BarsSinceEntry)-returnTSlen,"",1,1); } SetStopEndofday(1500);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2008-12-10 13:56:34

안녕하세요 예스스탁입니다. 1. countN은 일일 진입횟수입니다. 피라미딩상 진입은 하나의 진입으로 체킹합니다. 또한 countN <일최대진입횟수-1 과 같이 작성하시면 일일 진입이 4미만일때 무조건 진입하라는 내용이므로 2번 연속 발생할 수 있습니다. 2. 피라미딩상 최대 진입 수량은 시스템 트레이딩 설정창의 주문수량란에 설정하시면 해당 주문수량 이상으로 피라미딩되지 않습니다. 3. 진입명은 피라미딩상 첫진입명만을 인지합니다. 청산식은 기존에 것을 사용하셔도 될 것 같습니다. CurrentEntries함수를 사용하시면 피라미딩일때 진입횟수를 사용하실 수 있습니다. var: countN(0),cntN(0); vars : entryBA(0),entryBB(0),entryBC(0),entryBD(0); input : 일최대진입횟수(5); input : entrystime(090000),entryftimeB(143000) ; input : pyramidgap(0.5) ; countN = 0; for cntN = 0 to 10 { if sdate == EntryDate(cntN) Then countN = countN+1; } ## BA if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 0 and C> dayOpen() and CurrentEntries == 0 Then { if crossup(C,dayopen()+pyramidgap*1) Then{ //pyramidgap 돌파시 buy("ba"); entryBA = C; //ba의 진입가 } } ## BB if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 1 and CurrentEntries() == 1 and CurrentEntries == 1 and accumn(iff(CurrentEntries == 2,1,0),BarsSinceEntry()+1) < 1 Then { if crossup(C,dayopen()+pyramidgap*2) Then{ //pyramidgap 돌파시 buy("bb"); entryBB = C; //bb의 진입가 } } ## BC if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 1 and CurrentEntries() == 2 and CurrentEntries == 2 and accumn(iff(CurrentEntries == 3,1,0),BarsSinceEntry()+1) < 2 Then { if crossup(C,dayopen()+pyramidgap*3) Then{ //pyramidgap 돌파시 buy("bc"); entryBC = C; //bc의 진입가 } } ## BD if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 1 and CurrentEntries() == 3 and CurrentEntries == 3 and accumn(iff(CurrentEntries == 4,1,0),BarsSinceEntry()+1) < 3 Then { if crossup(C,dayopen()+pyramidgap*3) Then{ //pyramidgap 돌파시 buy("bd"); entryBD = C; //bd의 진입가 } } ########################################################################## input : CSlen(1.5),TSplen(1.9),returnTSlen(0.8) ; ## BA매수만 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() == 1 then { exitlong("baCS",AtStop,entryBA-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBA+TSplen Then exitlong("baTS",AtStop,highest(C,BarsSinceEntry)-returnTSlen,"",1,1); } ## BA와 BB 2개 진입이 피라미딩으로 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() == 2 then { exitlong("bbCS",AtStop,entryBB-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBB+TSplen Then exitlong("bbTS",AtStop,highest(H,BarsSinceEntry)-returnTSlen,"",1,1); } ## BA,BB & BC 3개 진입이 피라미딩으로 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() >= 3 then { exitlong("bcCS",AtStop,entryBC-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBC+TSplen Then exitlong("bcTS",AtStop,highest(H,BarsSinceEntry)-returnTSlen,"",1,1); } ## BA,BB,BC & BD 4개 진입이 피라미딩으로 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() >= 4 then { exitlong("bdCS",AtStop,entryBD-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBD+TSplen Then exitlong("bdTS",AtStop,highest(H,BarsSinceEntry)-returnTSlen,"",1,1); } SetStopEndofday(1500); 즐거운 하루되세요 > 오이도인 님이 쓴 글입니다. > 제목 : 재문의 > 빠른 답변 감사합니다.. 1] 시가 위 일정 범위 돌파시마다 진입하여 진입수량 4개까지 피라미딩 가능한 식으로 아래와 같이 만들어봤는데.. [나중엔 최대 10개까지로 하려고 생각중입니다] 조금 이상합니다..원하는대로 안들어가네요.. 수정 부탁드립니다... 2] 일최대진입수량은 11개로 제한하여면 어떤 구문을 추가해야하나요..? 아래 "일최대진입횟수"가 진입 수량을 제한하는게 아니라..피라미딩 횟수를 나타내는 것 같네요.. 3] 또,손절이나 익절의 경우 Isentryname("ba") 처럼 지정하여.. 진입명이 ba 인 진입만 처리할수는 없는건가요? if isentryname("ba") then exitlong("baCS",AtStop,entryBA-1,"",1,1); 이런 식으론 안되는건지요? 수고하세요.. ########################################################################## var: countN(0),cntN(0); vars : entryBA(0),entryBB(0),entryBC(0),entryBD(0); input : 일최대진입횟수(5); input : entrystime(090000),entryftimeB(143000) ; input : pyramidgap(0.5) ; countN = 0; for cntN = 0 to 10 { if sdate == EntryDate(cntN) Then countN = countN+1; } ## BA if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 0 and C> dayOpen() and countN <일최대진입횟수 Then { if crossup(C,dayopen()+pyramidgap) Then{ //pyramidgap 돌파시 buy("ba"); entryBA = C; //ba의 진입가 } } ## BB if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 1 and CurrentEntries() == 1 and countN <일최대진입횟수-1 and accumn(iff(CurrentEntries == 2,1,0),BarsSinceEntry()+1) < 1 Then { if crossup(C,dayopen()+pyramidgap*2) Then{ //pyramidgap 돌파시 buy("bb"); entryBB = C; //bb의 진입가 } } ## BC if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 1 and CurrentEntries() == 2 and countN <일최대진입횟수-2 and accumn(iff(CurrentEntries == 3,1,0),BarsSinceEntry()+1) < 2 Then { if crossup(C,dayopen()+pyramidgap*3) Then{ //pyramidgap 돌파시 buy("bc"); entryBC = C; //bc의 진입가 } } ## BD if stime>entrystime and stime < entryftimeB Then if MarketPosition() == 1 and CurrentEntries() == 3 and countN <일최대진입횟수-3 and accumn(iff(CurrentEntries == 4,1,0),BarsSinceEntry()+1) < 3 Then { if crossup(C,dayopen()+pyramidgap*3) Then{ //pyramidgap 돌파시 buy("bd"); entryBD = C; //bd의 진입가 } } ########################################################################## input : CSlen(1.5),TSplen(1.9),returnTSlen(0.8) ; ## BA매수만 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() == 1 then { exitlong("baCS",AtStop,entryBA-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBA+TSplen Then exitlong("baTS",AtStop,highest(C,BarsSinceEntry)-returnTSlen,"",1,1); } ## BA와 BB 2개 진입이 피라미딩으로 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() == 2 then { exitlong("bbCS",AtStop,entryBB-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBB+TSplen Then exitlong("bbTS",AtStop,highest(H,BarsSinceEntry)-returnTSlen,"",1,1); } ## BA,BB & BC 3개 진입이 피라미딩으로 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() >= 3 then { exitlong("bcCS",AtStop,entryBC-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBC+TSplen Then exitlong("bcTS",AtStop,highest(H,BarsSinceEntry)-returnTSlen,"",1,1); } ## BA,BB,BC & BD 4개 진입이 피라미딩으로 진입했을 경우 if MarketPosition() == 1 and CurrentEntries() >= 4 then { exitlong("bdCS",AtStop,entryBD-CSlen,"",1,1); if highest(C,BarsSinceEntry) >= entryBD+TSplen Then exitlong("bdTS",AtStop,highest(H,BarsSinceEntry)-returnTSlen,"",1,1); } SetStopEndofday(1500);