커뮤니티

식 약간 추가 부탁드립니다.

프로필 이미지
한걸음7
2012-01-18 15:17:18
428
글번호 46759
답변완료
피라미딩 진입 청산 잘 되는 것 같습니다. 감사합니다. 피라미딩 분할 진입하면 어떤 가격이 목표가에 도달하면 청산되는지 잘 모르겠습니다. 그래서 피라미딩 진입의 평균가격이 목표가 도달하면 청산 되도록 짜 주시면 고맙겠습니다. 그리고 지정가로 c 20개 , p 20개 손매매로 매수 한것 시스템매도로 종가 청산 주문 내어 보았는데 안되더군요. ========================================== #1분봉 if data1(stime == 150400) Then Sell("s",OnClose,def,20); =========================================== 종가 청산 하는 법도 부탁드립니다. 수고하세요. =========================================================================== var : sum(0,data1),cond(false,data1); sum = data1(C)+data2(C); if data1(stime == 091400) Then{ if MarketPosition == 0 Then Sell("s",OnClose,def,1); } if MarketPosition == -1 Then{ if CurrentContracts < 10 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then Sell("ss",OnClose,def,1); if data1(C)+data2(C) >= sum[BarsSinceEntry]*1.02 Then ExitShort("bx1"); if cond == false and data1(C)+data2(C) <= sum[BarsSinceEntry]*0.98 Then{ ExitShort("bx2"); cond = true; } } Else cond = false; SetStopEndofday(141200);
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2012-01-18 16:55:09

안녕하세요 예스스탁입니다. 1. #1분봉(아래식 거실경우 시스템 트레이딩 설정창의 당일청산은 체크를 해제하셔야 합니다) if CurrentDate == sdate and data1(stime == 150300) Then sell("s",OnClose,def,20); 2. 평균단가대비 per% 상승하면 청산하는 내용을 추가했습니다. input : per(10); var : sum(0,data1),cond(false,data1); sum = data1(C)+data2(C); if data1(stime == 091400) Then{ if MarketPosition == 0 Then Sell("s",OnClose,def,1); } if MarketPosition == -1 Then{ if CurrentContracts < 10 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then Sell("ss",OnClose,def,1); if data1(C)+data2(C) >= sum[BarsSinceEntry]*1.02 Then ExitShort("bx1"); if cond == false and data1(C)+data2(C) <= sum[BarsSinceEntry]*0.98 Then{ ExitShort("bx2"); cond = true; } } Else cond = false; if MarketPosition == -1 Then ExitShort("sx",AtLimit,AvgEntryPrice*(1+per/100)); SetStopEndofday(141200); 즐거운 하루되세요 > 한걸음7 님이 쓴 글입니다. > 제목 : 식 약간 추가 부탁드립니다. > 피라미딩 진입 청산 잘 되는 것 같습니다. 감사합니다. 피라미딩 분할 진입하면 어떤 가격이 목표가에 도달하면 청산되는지 잘 모르겠습니다. 그래서 피라미딩 진입의 평균가격이 목표가 도달하면 청산 되도록 짜 주시면 고맙겠습니다. 그리고 지정가로 c 20개 , p 20개 손매매로 매수 한것 시스템매도로 종가 청산 주문 내어 보았는데 안되더군요. ========================================== #1분봉 if data1(stime == 150400) Then Sell("s",OnClose,def,20); =========================================== 종가 청산 하는 법도 부탁드립니다. 수고하세요. =========================================================================== var : sum(0,data1),cond(false,data1); sum = data1(C)+data2(C); if data1(stime == 091400) Then{ if MarketPosition == 0 Then Sell("s",OnClose,def,1); } if MarketPosition == -1 Then{ if CurrentContracts < 10 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then Sell("ss",OnClose,def,1); if data1(C)+data2(C) >= sum[BarsSinceEntry]*1.02 Then ExitShort("bx1"); if cond == false and data1(C)+data2(C) <= sum[BarsSinceEntry]*0.98 Then{ ExitShort("bx2"); cond = true; } } Else cond = false; SetStopEndofday(141200);
프로필 이미지

예스스탁 예스스탁 답변

2012-01-18 17:23:29

안녕하세요 예스스탁입니다. 수정한 식입니다. var : cond(false,data1),AVGV(0,data1); if data1(stime == 091400) Then{ if MarketPosition == 0 Then Sell("s",OnClose,def,1); } if MarketPosition == -1 Then{ if CurrentContracts < 10 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then Sell("ss",OnClose,def,1); if CurrentEntries > CurrentEntries[1] Then AVGV = ma(data1(c)+data2(c),CurrentEntries); if data1(C)+data2(C) >= AVGV*1.02 Then ExitShort("bx1"); if cond == false and data1(C)+data2(C) <= AVGV*0.98 Then{ ExitShort("bx2"); cond = true; } } Else cond = false; SetStopEndofday(141200); 즐거운 하루되세요 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 식 약간 추가 부탁드립니다. > 안녕하세요 예스스탁입니다. 1. #1분봉(아래식 거실경우 시스템 트레이딩 설정창의 당일청산은 체크를 해제하셔야 합니다) if CurrentDate == sdate and data1(stime == 150300) Then sell("s",OnClose,def,20); 2. 평균단가대비 per% 상승하면 청산하는 내용을 추가했습니다. input : per(10); var : sum(0,data1),cond(false,data1); sum = data1(C)+data2(C); if data1(stime == 091400) Then{ if MarketPosition == 0 Then Sell("s",OnClose,def,1); } if MarketPosition == -1 Then{ if CurrentContracts < 10 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then Sell("ss",OnClose,def,1); if data1(C)+data2(C) >= sum[BarsSinceEntry]*1.02 Then ExitShort("bx1"); if cond == false and data1(C)+data2(C) <= sum[BarsSinceEntry]*0.98 Then{ ExitShort("bx2"); cond = true; } } Else cond = false; if MarketPosition == -1 Then ExitShort("sx",AtLimit,AvgEntryPrice*(1+per/100)); SetStopEndofday(141200); 즐거운 하루되세요 > 한걸음7 님이 쓴 글입니다. > 제목 : 식 약간 추가 부탁드립니다. > 피라미딩 진입 청산 잘 되는 것 같습니다. 감사합니다. 피라미딩 분할 진입하면 어떤 가격이 목표가에 도달하면 청산되는지 잘 모르겠습니다. 그래서 피라미딩 진입의 평균가격이 목표가 도달하면 청산 되도록 짜 주시면 고맙겠습니다. 그리고 지정가로 c 20개 , p 20개 손매매로 매수 한것 시스템매도로 종가 청산 주문 내어 보았는데 안되더군요. ========================================== #1분봉 if data1(stime == 150400) Then Sell("s",OnClose,def,20); =========================================== 종가 청산 하는 법도 부탁드립니다. 수고하세요. =========================================================================== var : sum(0,data1),cond(false,data1); sum = data1(C)+data2(C); if data1(stime == 091400) Then{ if MarketPosition == 0 Then Sell("s",OnClose,def,1); } if MarketPosition == -1 Then{ if CurrentContracts < 10 and countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry) < 1 Then Sell("ss",OnClose,def,1); if data1(C)+data2(C) >= sum[BarsSinceEntry]*1.02 Then ExitShort("bx1"); if cond == false and data1(C)+data2(C) <= sum[BarsSinceEntry]*0.98 Then{ ExitShort("bx2"); cond = true; } } Else cond = false; SetStopEndofday(141200);