커뮤니티

식 수정좀 해주세요..

프로필 이미지
강동원
2012-03-30 11:21:48
286
글번호 49519
답변완료
if MarketPosition != 1 Thenif MarketPosition == 1 Then{ if CurrentContracts == MaxContracts Then ExitLong("1차이익",atlimit,AvgEntryPrice*1.04,"",int(CurrentContracts*0.5),1); cond = false; if CurrentContracts < MaxContracts Then{ exitlong("1차당이익2",atlimit,AvgEntryPrice*1.04,"",int(CurrentContracts*0.5),1) If stime == 143000 and C < dayopen Then exitlong("2차이익"); } 1. 평균 단가가 +4% 되면 절반 매도 (1차이익) -일부밖에 매도되지 않으면 1번에 해당되는 수량만 2시20분 전량 시장가 매도 2. 1번이 실행된날 2시30분에 그날 일봉이 양봉이면 잔량 매도 없음 3. 1번이 실행된날 2시30분에 그날 일봉이 음봉이면 전량 매도 (1차당이익) 4. 1번은 하루에 최초 신호 발생된 한번만 실행되고 (현재 중복실행이 되어 문제임) 5. 2번과 같이 잔량이 남을시 다음날부터 2시30분에 그날 일봉이 음봉이면 전량매도 (2차이익) 부탁 드립니다.. 오늘로 휴가 끝입니다.. 흑. 고생하시고. 감사합니다.. ^-^
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-03-30 15:39:12

안녕하세요 예스스탁입니다. if MarketPosition != 1 Then{ if MarketPosition == 1 Then{ if CurrentContracts == MaxContracts and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then{ ExitLong("1차이익",atlimit,AvgEntryPrice*1.04,"",int(CurrentContracts*0.5),1); var1 = sdate; } if CurrentContracts < MaxContracts Then{ exitlong("1차당이익2",atlimit,AvgEntryPrice*1.04,"",int(CurrentContracts*0.5),1); If sdate >= var1 and CurrentContracts < MaxContracts and stime == 143000 and C < dayopen Then exitlong("2차이익"); } } } 즐거운 하루되세요 > 강동원 님이 쓴 글입니다. > 제목 : 식 수정좀 해주세요.. > if MarketPosition != 1 Thenif MarketPosition == 1 Then{ if CurrentContracts == MaxContracts Then ExitLong("1차이익",atlimit,AvgEntryPrice*1.04,"",int(CurrentContracts*0.5),1); cond = false; if CurrentContracts < MaxContracts Then{ exitlong("1차당이익2",atlimit,AvgEntryPrice*1.04,"",int(CurrentContracts*0.5),1) If stime == 143000 and C < dayopen Then exitlong("2차이익"); } 1. 평균 단가가 +4% 되면 절반 매도 (1차이익) -일부밖에 매도되지 않으면 1번에 해당되는 수량만 2시20분 전량 시장가 매도 2. 1번이 실행된날 2시30분에 그날 일봉이 양봉이면 잔량 매도 없음 3. 1번이 실행된날 2시30분에 그날 일봉이 음봉이면 전량 매도 (1차당이익) 4. 1번은 하루에 최초 신호 발생된 한번만 실행되고 (현재 중복실행이 되어 문제임) 5. 2번과 같이 잔량이 남을시 다음날부터 2시30분에 그날 일봉이 음봉이면 전량매도 (2차이익) 부탁 드립니다.. 오늘로 휴가 끝입니다.. 흑. 고생하시고. 감사합니다.. ^-^