커뮤니티
재문의
2016-06-23 16:00:26
187
글번호 99426
> 상큼한아침 님이 쓴 글입니다.
> 제목 : 수식부탁합니다
> # 매수조건 : ma(c,5) > ma(c,10) and ma(c,10) > ma(c,20)and ma(c,60) > ma(c,20)이면
1). 9시5분에 1차매수
2). 1차매수가격에서 -3% 이면 1차매수수량*2 으로 2차매수
1차매수가격에서 -6% 이면 1차매수수량*3 으로 3차매수
3). 매도일에는 매수금지
# 매도조건 :1). 1차매수에서 1차매수가격의 +3% 이면 익절
2). 1차매수 와 2차매수가격의 평균합이 +3% 이거나 1,2,3차매수가격의
평균합이 +3% 이면 익절
3). 1,2,3차매수가격의 -10% 이면 손절
4). 1,2,3차매수일 이후 각각 공히 10거래일이내에 매도조건에 이르지못하면
매도
# 화살표 신호 위 아래에 수량,매수,익절,손절 표시
input : 매수수량1(10);
var : didx(0),d1(0),d2(0),d3(0);
if date != date[1] Then
didx = didx+1;
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",OnClose,def,매수수량1);
if MarketPosition == 1 Then{
if CurrentContracts > CurrentContracts[1] and MaxEntries == 1 Then
D1 = sdate;
if CurrentContracts > CurrentContracts[1] and MaxEntries == 2 Then
D2 = sdate;
if CurrentContracts > CurrentContracts[1] and MaxEntries == 3 Then
D3 = sdate;
buy("b2",AtLimit,EntryPrice-0.97,매수수량1*2);
buy("b3",AtLimit,EntryPrice-0.94,매수수량1*3);
ExitLong("bx",atlimit,AvgEntryPrice*1.03);
if didx == d1+10 and stime == 144500 Then
exitlong("bx1",OnClose,def,"b1");
if didx == d2+10 and stime == 144500 Then
exitlong("bx2",OnClose,def,"b2");
if didx == d3+10 and stime == 144500 Then
exitlong("bx3",OnClose,def,"b3");
}
SetStopLoss(10,PercentStop);
주석 부탁하구요
신호가 나오질 않네요~~ 어디가 잘못됬을까요??
그리고 매수수량은 프로그램에서 제가 조정할겁니다
여기로직에서는 삭제 부탁합니다
답변 3
예스스탁 예스스탁 답변
2016-06-23 17:51:44
안녕하세요
예스스탁입니다.
첨부된 그림은 삼성전자 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);
즐거운 하루되세요
> 상큼한아침 님이 쓴 글입니다.
> 제목 : 재문의
> > 상큼한아침 님이 쓴 글입니다.
> 제목 : 수식부탁합니다
> # 매수조건 : ma(c,5) > ma(c,10) and ma(c,10) > ma(c,20)and ma(c,60) > ma(c,20)이면
1). 9시5분에 1차매수
2). 1차매수가격에서 -3% 이면 1차매수수량*2 으로 2차매수
1차매수가격에서 -6% 이면 1차매수수량*3 으로 3차매수
3). 매도일에는 매수금지
# 매도조건 :1). 1차매수에서 1차매수가격의 +3% 이면 익절
2). 1차매수 와 2차매수가격의 평균합이 +3% 이거나 1,2,3차매수가격의
평균합이 +3% 이면 익절
3). 1,2,3차매수가격의 -10% 이면 손절
4). 1,2,3차매수일 이후 각각 공히 10거래일이내에 매도조건에 이르지못하면
매도
# 화살표 신호 위 아래에 수량,매수,익절,손절 표시
input : 매수수량1(10);
var : didx(0),d1(0),d2(0),d3(0);
if date != date[1] Then
didx = didx+1;
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",OnClose,def,매수수량1);
if MarketPosition == 1 Then{
if CurrentContracts > CurrentContracts[1] and MaxEntries == 1 Then
D1 = sdate;
if CurrentContracts > CurrentContracts[1] and MaxEntries == 2 Then
D2 = sdate;
if CurrentContracts > CurrentContracts[1] and MaxEntries == 3 Then
D3 = sdate;
buy("b2",AtLimit,EntryPrice-0.97,매수수량1*2);
buy("b3",AtLimit,EntryPrice-0.94,매수수량1*3);
ExitLong("bx",atlimit,AvgEntryPrice*1.03);
if didx == d1+10 and stime == 144500 Then
exitlong("bx1",OnClose,def,"b1");
if didx == d2+10 and stime == 144500 Then
exitlong("bx2",OnClose,def,"b2");
if didx == d3+10 and stime == 144500 Then
exitlong("bx3",OnClose,def,"b3");
}
SetStopLoss(10,PercentStop);
주석 부탁하구요
신호가 나오질 않네요~~ 어디가 잘못됬을까요??
그리고 매수수량은 프로그램에서 제가 조정할겁니다
여기로직에서는 삭제 부탁합니다
상큼한아침
2016-06-23 18:26:50
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 재문의
> 안녕하세요
예스스탁입니다.
첨부된 그림은 삼성전자 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);
즐거운 하루되세요
> 상큼한아침 님이 쓴 글입니다.
> 제목 : 재문의
> > 상큼한아침 님이 쓴 글입니다.
> 제목 : 수식부탁합니다
> # 매수조건 : ma(c,5) > ma(c,10) and ma(c,10) > ma(c,20)and ma(c,60) > ma(c,20)이면
1). 9시5분에 1차매수
2). 1차매수가격에서 -3% 이면 1차매수수량*2 으로 2차매수
1차매수가격에서 -6% 이면 1차매수수량*3 으로 3차매수
3). 매도일에는 매수금지
# 매도조건 :1). 1차매수에서 1차매수가격의 +3% 이면 익절
2). 1차매수 와 2차매수가격의 평균합이 +3% 이거나 1,2,3차매수가격의
평균합이 +3% 이면 익절
3). 1,2,3차매수가격의 -10% 이면 손절
4). 1,2,3차매수일 이후 각각 공히 10거래일이내에 매도조건에 이르지못하면
매도
# 화살표 신호 위 아래에 수량,매수,익절,손절 표시
input : 매수수량1(10);
var : didx(0),d1(0),d2(0),d3(0);
if date != date[1] Then
didx = didx+1;
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",OnClose,def,매수수량1);
if MarketPosition == 1 Then{
if CurrentContracts > CurrentContracts[1] and MaxEntries == 1 Then
D1 = sdate;
if CurrentContracts > CurrentContracts[1] and MaxEntries == 2 Then
D2 = sdate;
if CurrentContracts > CurrentContracts[1] and MaxEntries == 3 Then
D3 = sdate;
buy("b2",AtLimit,EntryPrice-0.97,매수수량1*2);
buy("b3",AtLimit,EntryPrice-0.94,매수수량1*3);
ExitLong("bx",atlimit,AvgEntryPrice*1.03);
if didx == d1+10 and stime == 144500 Then
exitlong("bx1",OnClose,def,"b1");
if didx == d2+10 and stime == 144500 Then
exitlong("bx2",OnClose,def,"b2");
if didx == d3+10 and stime == 144500 Then
exitlong("bx3",OnClose,def,"b3");
}
SetStopLoss(10,PercentStop);
주석 부탁하구요
신호가 나오질 않네요~~ 어디가 잘못됬을까요??
그리고 매수수량은 프로그램에서 제가 조정할겁니다
여기로직에서는 삭제 부탁합니다
5분봉에서만 신호가 나오고 일봉상에는 신호가 전혀 안나옵니다
검토 부탁합니다
예스스탁 예스스탁 답변
2016-06-23 20:44:22
> 상큼한아침 님이 쓴 글입니다.
> 제목 : Re : Re : 재문의
>
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 재문의
> 안녕하세요
예스스탁입니다.
첨부된 그림은 삼성전자 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);
즐거운 하루되세요
> 상큼한아침 님이 쓴 글입니다.
> 제목 : 재문의
> > 상큼한아침 님이 쓴 글입니다.
> 제목 : 수식부탁합니다
> # 매수조건 : ma(c,5) > ma(c,10) and ma(c,10) > ma(c,20)and ma(c,60) > ma(c,20)이면
1). 9시5분에 1차매수
2). 1차매수가격에서 -3% 이면 1차매수수량*2 으로 2차매수
1차매수가격에서 -6% 이면 1차매수수량*3 으로 3차매수
3). 매도일에는 매수금지
# 매도조건 :1). 1차매수에서 1차매수가격의 +3% 이면 익절
2). 1차매수 와 2차매수가격의 평균합이 +3% 이거나 1,2,3차매수가격의
평균합이 +3% 이면 익절
3). 1,2,3차매수가격의 -10% 이면 손절
4). 1,2,3차매수일 이후 각각 공히 10거래일이내에 매도조건에 이르지못하면
매도
# 화살표 신호 위 아래에 수량,매수,익절,손절 표시
input : 매수수량1(10);
var : didx(0),d1(0),d2(0),d3(0);
if date != date[1] Then
didx = didx+1;
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",OnClose,def,매수수량1);
if MarketPosition == 1 Then{
if CurrentContracts > CurrentContracts[1] and MaxEntries == 1 Then
D1 = sdate;
if CurrentContracts > CurrentContracts[1] and MaxEntries == 2 Then
D2 = sdate;
if CurrentContracts > CurrentContracts[1] and MaxEntries == 3 Then
D3 = sdate;
buy("b2",AtLimit,EntryPrice-0.97,매수수량1*2);
buy("b3",AtLimit,EntryPrice-0.94,매수수량1*3);
ExitLong("bx",atlimit,AvgEntryPrice*1.03);
if didx == d1+10 and stime == 144500 Then
exitlong("bx1",OnClose,def,"b1");
if didx == d2+10 and stime == 144500 Then
exitlong("bx2",OnClose,def,"b2");
if didx == d3+10 and stime == 144500 Then
exitlong("bx3",OnClose,def,"b3");
}
SetStopLoss(10,PercentStop);
주석 부탁하구요
신호가 나오질 않네요~~ 어디가 잘못됬을까요??
그리고 매수수량은 프로그램에서 제가 조정할겁니다
여기로직에서는 삭제 부탁합니다
5분봉에서만 신호가 나오고 일봉상에는 신호가 전혀 안나옵니다
검토 부탁합니다
다음글
이전글