커뮤니티
48372 재문의
2016-06-23 18:29:37
179
글번호 99440
그림 1
그림1
안녕하세요
예스스탁입니다.
첨부된 그림은 삼성전자 5분봉에 적용한 내용입니다.
추가진입부분에 %설정이 잘못되어 있어
해당부분은 수정했습니다.
var : didx(0),d1(0),d2(0),d3(0),매수수량1(0);
#날짜수 카운트
if date != date[1] Then
didx = didx+1;
#9시5분봉
#무포지션
#지정한 조건이 만족하면
#매수
if stime == 090500 and
MarketPosition == 0 and
ma(c,5) > ma(c,10) and ma(c,10) > ma(c,20) and ma(c,60) > ma(c,20) Then
buy("b1");
#매수후
if MarketPosition == 1 Then{
#첫진입의 날짜수
if CurrentContracts > CurrentContracts[1] and MaxEntries == 1 Then{
D1 = sdate;
매수수량1 = CurrentContracts;
}
#두번째 진입의 날짜수
if CurrentContracts > CurrentContracts[1] and MaxEntries == 2 Then
D2 = sdate;
#세번째 진입의 날짜수
if CurrentContracts > CurrentContracts[1] and MaxEntries == 3 Then
D3 = sdate;
#첫진입가 대비 3% 이하의 시세발생하면 매수수량1의 2배로 추가매수
buy("b2",AtLimit,EntryPrice*0.97,매수수량1*2);
#첫진입가 대비 6% 이하의 시세발생하면 매수수량1의 3배로 추가매수
buy("b3",AtLimit,EntryPrice*0.94,매수수량1*3);
#평단가 대비 3% 이상상승하면 청산
ExitLong("bx",atlimit,AvgEntryPrice*1.03);
#첫진입후 10일후 14시45분이면 첫진입(b1) 청산
if didx == d1+10 and stime == 144500 Then
exitlong("bx1",OnClose,def,"b1");
#두번째 진입후 10일후 14시45분이면 두번째진입(b2) 청산
if didx == d2+10 and stime == 144500 Then
exitlong("bx2",OnClose,def,"b2");
#세번째 진입후 10일후 14시45분이면 세번째진입(b3) 청산
if didx == d3+10 and stime == 144500 Then
exitlong("bx3",OnClose,def,"b3");
}
#진입별 10% 손절
SetStopLoss(10,PercentStop);
5분봉에서만 신호가 나오고 일봉상에서는 신호가 전혀 발생이 안됩니다
검토 부탁합니다
답변 1
예스스탁 예스스탁 답변
2016-06-23 20:44:30
> 상큼한아침 님이 쓴 글입니다.
> 제목 : 48372 재문의
> 그림 1
그림1
안녕하세요
예스스탁입니다.
첨부된 그림은 삼성전자 5분봉에 적용한 내용입니다.
추가진입부분에 %설정이 잘못되어 있어
해당부분은 수정했습니다.
var : didx(0),d1(0),d2(0),d3(0),매수수량1(0);
#날짜수 카운트
if date != date[1] Then
didx = didx+1;
#9시5분봉
#무포지션
#지정한 조건이 만족하면
#매수
if stime == 090500 and
MarketPosition == 0 and
ma(c,5) > ma(c,10) and ma(c,10) > ma(c,20) and ma(c,60) > ma(c,20) Then
buy("b1");
#매수후
if MarketPosition == 1 Then{
#첫진입의 날짜수
if CurrentContracts > CurrentContracts[1] and MaxEntries == 1 Then{
D1 = sdate;
매수수량1 = CurrentContracts;
}
#두번째 진입의 날짜수
if CurrentContracts > CurrentContracts[1] and MaxEntries == 2 Then
D2 = sdate;
#세번째 진입의 날짜수
if CurrentContracts > CurrentContracts[1] and MaxEntries == 3 Then
D3 = sdate;
#첫진입가 대비 3% 이하의 시세발생하면 매수수량1의 2배로 추가매수
buy("b2",AtLimit,EntryPrice*0.97,매수수량1*2);
#첫진입가 대비 6% 이하의 시세발생하면 매수수량1의 3배로 추가매수
buy("b3",AtLimit,EntryPrice*0.94,매수수량1*3);
#평단가 대비 3% 이상상승하면 청산
ExitLong("bx",atlimit,AvgEntryPrice*1.03);
#첫진입후 10일후 14시45분이면 첫진입(b1) 청산
if didx == d1+10 and stime == 144500 Then
exitlong("bx1",OnClose,def,"b1");
#두번째 진입후 10일후 14시45분이면 두번째진입(b2) 청산
if didx == d2+10 and stime == 144500 Then
exitlong("bx2",OnClose,def,"b2");
#세번째 진입후 10일후 14시45분이면 세번째진입(b3) 청산
if didx == d3+10 and stime == 144500 Then
exitlong("bx3",OnClose,def,"b3");
}
#진입별 10% 손절
SetStopLoss(10,PercentStop);
5분봉에서만 신호가 나오고 일봉상에서는 신호가 전혀 발생이 안됩니다
검토 부탁합니다