커뮤니티
문의
2016-07-07 03:56:33
97
글번호 99826
안녕 하세요
input : P(5),금액(500000);//50만원
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if dayindex < P Then
var1 = AccumN(V,dayindex+1)/dayindex+1;
Else
var1 = ma(V,5);
#첫매수, 거래량이평 돌파
if MarketPosition == 0 and crossup(V,var1) and count < 1 Then{
buy("매수1",OnClose,def,floor(금액/C));
}
if MarketPosition == 1 then{
#1차 진입후 3%이상 하락후 거래량이평 돌파하면 추가매수
if MaxEntries == 1 and C < EntryPrice*0.97 and crossup(v,var1) Then
buy("매수2",OnClose,def,floor(금액/C));
#추가진입 후 평단가 대비 3% 하락하면 손절
if MaxEntries == 2 Then
ExitLong("손절청산",AtStop,AvgEntryPrice*0.97);//평균진입가격(현재푀지션에서 청산되지 않은거래포함
}
위식에 추가식 부탁합니다
1.시가가 전일종가보다 10%이내 진입
2.매수가대비 4% 이상 이익시 최고가대비 3%하락하면 청산
3.매수가대비 8% 이상 이익시 최고가대비 4%하락하면 청산
4.매수가대비 10% 이상 이익시 최고가대비 5%하락하면 청산
답변 1
예스스탁 예스스탁 답변
2016-07-07 11:27:33
안녕하세요
예스스탁입니다.
input : P(5),금액(500000);//50만원
var : cnt(0),count(0),HH(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if dayindex < P Then
var1 = AccumN(V,dayindex+1)/dayindex+1;
Else
var1 = ma(V,5);
#첫매수, 거래량이평 돌파
if MarketPosition == 0 and crossup(V,var1) and count < 1 and
dayopen < DayClose(1)*1.10 and dayopen > DayClose(1)*0.90 Then{
buy("매수1",OnClose,def,floor(금액/C));
}
if MarketPosition == 1 then{
#1차 진입후 3%이상 하락후 거래량이평 돌파하면 추가매수
if MaxEntries == 1 and C < EntryPrice*0.97 and crossup(v,var1) Then
buy("매수2",OnClose,def,floor(금액/C));
#추가진입 후 평단가 대비 3% 하락하면 손절
if MaxEntries == 2 Then
ExitLong("손절청산",AtStop,AvgEntryPrice*0.97);//평균진입가격(현재푀지션에서 청산되지 않은거래포함
if CurrentContracts > CurrentContracts[1] Then
HH = H;
if H > HH Then
HH = H;
if HH >= avgEntryPrice*1.04 and HH < AvgEntryPrice*1.08 Then
exitlong("bx1",AtStop,HH*0.97);
if HH >= avgEntryPrice*1.08 and HH < AvgEntryPrice*1.10 Then
exitlong("bx2",AtStop,HH*0.96);
if HH >= avgEntryPrice*1.10 Then
exitlong("bx3",AtStop,HH*0.95);
}
즐거운 하루되세요
> 청심 님이 쓴 글입니다.
> 제목 : 문의
> 안녕 하세요
input : P(5),금액(500000);//50만원
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if dayindex < P Then
var1 = AccumN(V,dayindex+1)/dayindex+1;
Else
var1 = ma(V,5);
#첫매수, 거래량이평 돌파
if MarketPosition == 0 and crossup(V,var1) and count < 1 Then{
buy("매수1",OnClose,def,floor(금액/C));
}
if MarketPosition == 1 then{
#1차 진입후 3%이상 하락후 거래량이평 돌파하면 추가매수
if MaxEntries == 1 and C < EntryPrice*0.97 and crossup(v,var1) Then
buy("매수2",OnClose,def,floor(금액/C));
#추가진입 후 평단가 대비 3% 하락하면 손절
if MaxEntries == 2 Then
ExitLong("손절청산",AtStop,AvgEntryPrice*0.97);//평균진입가격(현재푀지션에서 청산되지 않은거래포함
}
위식에 추가식 부탁합니다
1.시가가 전일종가보다 10%이내 진입
2.매수가대비 4% 이상 이익시 최고가대비 3%하락하면 청산
3.매수가대비 8% 이상 이익시 최고가대비 4%하락하면 청산
4.매수가대비 10% 이상 이익시 최고가대비 5%하락하면 청산
이전글