커뮤니티
검토 부탁드립니다.
2015-01-18 20:47:02
154
글번호 82353
진입 조건을 봐주십시요.
-시초가가 전일 종가대비 -1~+5%이하이면, 피봇 기준선 +3틱에서 매수가 되어야 하는데...
시초가가 +1%인데도, 전일 종가를 하향할 때 매수가 되어버립니다.
=========================
<진입조건>
-진입시간 09:00~09:30
-진입 1일 1회로 제한(하루에 2번 진입 안되게)
-주가는 시초가 대비 +4%이상 상승하지 않아야 함
-시초가가 전일 종가대비 -1%~+5%이하이면, "피봇기준선 +3틱"이하로 하락시, 이후 첫봉에 진입
-시초가가 전일 종가대비 +5%초과이면, 전일 종가보다 하락시, 이후 첫봉에 진입
var : cnt(0),count(0);
Var : Pivot(0),R1(0),R2(0),S1(0),S2(0);
var : xVol1(0),xvol2(0);
Pivot = (DayHigh(1)+DayLow(1)+DayClose(1))/3;
R1 = 2*Pivot-DayLow(1);
R2 = Pivot+DayHigh(1)-DayLow(1);
S1 = 2*Pivot-DayHigh(1);
S2 = Pivot-DayHigh(1)+DayLow(1);
count = 0;
for cnt = 0 to 20{
if EntryDate(cnt) == sdate Then
count = count+1;
}
if stime >= 090000 and stime < 093000 and ExitDate(1) != sdate and dayhigh < dayopen*1.04 Then{
if dayopen >= DayClose(1)*0.99 and dayopen < DayClose(1)*1.05 Then
buy("b1",AtStop,Pivot+PriceScale*3);
if dayopen >= DayClose(1)*1.05 Then
buy("b2",AtStop,DayClose(1));
}
if MarketPosition == 1 Then{
if CodeCategoryEx == 11 and BasePrice < 50000 Then{
xvol1 = int(int(CurrentContracts*(1/3))/10)*10;
xvol2 = int(int(CurrentContracts*(1/2))/10)*10;
}
Else{
xvol1 = int(CurrentContracts*(1/3));
xvol2 = int(CurrentContracts*(1/2));
}
exitlong("bp1",atlimit,EntryPrice*1.06,"",Xvol1,1);
exitlong("bp2",atlimit,EntryPrice*1.07,"",Xvol2,1);
exitlong("bp3",atlimit,EntryPrice*1.08);
if Highest(H,BarsSinceEntry) >= EntryPrice*1.05 Then
exitlong("btr",AtStop,highest(H,BarsSinceEntry)-(highestSetStopEndofday(140000);
(H,BarsSinceEntry)-EntryPrice)*0.3);
exitlong("bl",AtStop,EntryPrice*0.955);
if stime == 100000 and DayVolume >= DayVolume(1)*0.8 Then
ExitLong("bx");
}
SetStopEndofday(140000);
답변 1
예스스탁 예스스탁 답변
2015-01-19 15:49:13
안녕하세요
예스스탁입니다.
식을 수정했습니다.
기존의 식은 지정된 가격의 이상의 시세가 있으면 신호가 발생되게 되어 있었습니다.
지정된 값 이하의 시세가 발생하면 진입하게 수정했습니다.
var : cnt(0),count(0);
Var : Pivot(0),R1(0),R2(0),S1(0),S2(0);
var : xVol1(0),xvol2(0);
Pivot = (DayHigh(1)+DayLow(1)+DayClose(1))/3;
R1 = 2*Pivot-DayLow(1);
R2 = Pivot+DayHigh(1)-DayLow(1);
S1 = 2*Pivot-DayHigh(1);
S2 = Pivot-DayHigh(1)+DayLow(1);
count = 0;
for cnt = 0 to 20{
if EntryDate(cnt) == sdate Then
count = count+1;
}
if stime >= 090000 and stime < 093000 and count < 1 and dayhigh < dayopen*1.04 Then{
if dayopen >= DayClose(1)*0.99 and dayopen < DayClose(1)*1.05 Then
buy("b1",AtLimit,Pivot+PriceScale*3);
if dayopen >= DayClose(1)*1.05 Then
buy("b2",atlimit,DayClose(1));
}
즐거운 하루되세요
> 쌀사비팔 님이 쓴 글입니다.
> 제목 : 검토 부탁드립니다.
> 진입 조건을 봐주십시요.
-시초가가 전일 종가대비 -1~+5%이하이면, 피봇 기준선 +3틱에서 매수가 되어야 하는데...
시초가가 +1%인데도, 전일 종가를 하향할 때 매수가 되어버립니다.
=========================
<진입조건>
-진입시간 09:00~09:30
-진입 1일 1회로 제한(하루에 2번 진입 안되게)
-주가는 시초가 대비 +4%이상 상승하지 않아야 함
-시초가가 전일 종가대비 -1%~+5%이하이면, "피봇기준선 +3틱"이하로 하락시, 이후 첫봉에 진입
-시초가가 전일 종가대비 +5%초과이면, 전일 종가보다 하락시, 이후 첫봉에 진입
var : cnt(0),count(0);
Var : Pivot(0),R1(0),R2(0),S1(0),S2(0);
var : xVol1(0),xvol2(0);
Pivot = (DayHigh(1)+DayLow(1)+DayClose(1))/3;
R1 = 2*Pivot-DayLow(1);
R2 = Pivot+DayHigh(1)-DayLow(1);
S1 = 2*Pivot-DayHigh(1);
S2 = Pivot-DayHigh(1)+DayLow(1);
count = 0;
for cnt = 0 to 20{
if EntryDate(cnt) == sdate Then
count = count+1;
}
if stime >= 090000 and stime < 093000 and ExitDate(1) != sdate and dayhigh < dayopen*1.04 Then{
if dayopen >= DayClose(1)*0.99 and dayopen < DayClose(1)*1.05 Then
buy("b1",AtStop,Pivot+PriceScale*3);
if dayopen >= DayClose(1)*1.05 Then
buy("b2",AtStop,DayClose(1));
}
if MarketPosition == 1 Then{
if CodeCategoryEx == 11 and BasePrice < 50000 Then{
xvol1 = int(int(CurrentContracts*(1/3))/10)*10;
xvol2 = int(int(CurrentContracts*(1/2))/10)*10;
}
Else{
xvol1 = int(CurrentContracts*(1/3));
xvol2 = int(CurrentContracts*(1/2));
}
exitlong("bp1",atlimit,EntryPrice*1.06,"",Xvol1,1);
exitlong("bp2",atlimit,EntryPrice*1.07,"",Xvol2,1);
exitlong("bp3",atlimit,EntryPrice*1.08);
if Highest(H,BarsSinceEntry) >= EntryPrice*1.05 Then
exitlong("btr",AtStop,highest(H,BarsSinceEntry)-(highestSetStopEndofday(140000);
(H,BarsSinceEntry)-EntryPrice)*0.3);
exitlong("bl",AtStop,EntryPrice*0.955);
if stime == 100000 and DayVolume >= DayVolume(1)*0.8 Then
ExitLong("bx");
}
SetStopEndofday(140000);