커뮤니티
문의드립니다.
2016-08-17 19:16:07
116
글번호 101120
수정하여 주셨던 수식을 적용하였으나 전일 매수, 당일 매도 후 당일 b1,b2 재매수가 이루어집니다.
1. 매매횟수 제한이 이루어지지 않습니다.
2. 매도 당일 이전에 매수신호가 나온 b1,b2를 인식하지 못합니다. 따라서 당일 매도가 이루어져도, 당일은 매수신호 b1이 나오지 않았기 때문에 count < N 가 성립하여 매수가 되는 듯 합니다.
3. 매수가 언재 이루어지던지, 당일 매도가 나온 경우에는 당일 매수하지 않는 방법을 찾고자 합니다.
감사합니다.
이전 문의 및 답변내용
---------------------------
안녕하세요
예스스탁입니다.
b2는 추가진입식인에 신호타입이 atlimit으로 되어 있습니다.
완성봉에서 value4값을 셋팅하고 다음봉에서
해당 값 이하의 시세가 발생하면 즉시신호가 발생합니다.
수식에서 포지션등은 신호발생후 봉이 완성이 되어야 인지됩니다.
청산과 b2진입이 동시 셋팅되므로
b2조건에 청산조건이 만족하지 않은 봉에서만
셋팅되게 아래와 같이 조건을 추가하셔야 합니다.
input : N(1);
var : AA(0),BB(0),CC(0);
var : TF(0),VV(0),VH(0),VH1(0),upv(0);
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 20{
if sdate ==EntryDate(cnt) Then
count = count+1;
}
AA = (highest(H,5760)+lowest(L,5760))/2;
BB = Highest(H,1800);
var1 = NthHighestBar(1,H,1800);
CC = lowest(L,var1);
value1 = (((BB-AA)/5)*0)+AA;
value2 = (((BB-AA)/5)*1.5)+CC;
Value5 = AA-(((BB-AA)/5)*3);
TF = dayindex%15;
if date != date[1] then{
VV = 0;
VH = 0;
VH1 = VH[1];
}
if (TF < TF[1] and date == date[1]) Then
VV = 0;
VV = VV +V;
if VV > VH Then
VH = VV;
if stime < 091500 Then
value3 = VH;
value4 = AA-(((BB-AA)/5)*1);
if (stime >= 090300 and value3 <= VH1) or (stime >= 141500) then{
if MarketPosition == 0 and CrossDown(c,value1) and count < N Then
if ((dayopen > DayClose(1)*0.98) or (dayopen <= DayClose(1)*0.98 and stime >= 141500)) then
buy("b1");
if MarketPosition == 1 and MaxEntries == 1 and
!Crossup(c,value2) and
!CrossDown(c,value5) and
!((c<Value5) and (stime < 090300 or stime>=144800)) Then
buy("b2",atlimit,value4);
}
if crossup(c,value2) Then
ExitLong();
if CrossDown(c,Value5) Then
ExitLong("bx1",onclose,def,"b1");
if (c<Value5) and (stime < 090300 or stime>=144800) Then
ExitLong("bx2",onclose,def,"b2");
즐거운 하루되세요
> 사과쥬스 님이 쓴 글입니다.
> 제목 : 매매횟수 제한 검토 부탁드립니다.
> 아래수식에 당일 매수,매도 횟수가 1회로 제한하는 수식이 포함된 것으로 아는데
시스템 적용시 당일 매도후 다시 매수하는 경우가 생깁니다.
검토 부탁드립니다~
-아래-
input : N(1);
var : AA(0),BB(0),CC(0);
var : TF(0),VV(0),VH(0),VH1(0),upv(0);
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 20{
if sdate ==EntryDate(cnt) Then
count = count+1;
}
AA = (highest(H,5760)+lowest(L,5760))/2;
BB = Highest(H,1800);
var1 = NthHighestBar(1,H,1800);
CC = lowest(L,var1);
value1 = (((BB-AA)/5)*0)+AA;
value2 = (((BB-AA)/5)*1.5)+CC;
Value5 = AA-(((BB-AA)/5)*3);
TF = dayindex%15;
if date != date[1] then{
VV = 0;
VH = 0;
VH1 = VH[1];
}
if (TF < TF[1] and date == date[1]) Then
VV = 0;
VV = VV +V;
if VV > VH Then
VH = VV;
if stime < 091500 Then
value3 = VH;
value4 = AA-(((BB-AA)/5)*1);
if (stime >= 090300 and value3 <= VH1) or (stime >= 141500) then{
if MarketPosition == 0 and CrossDown(c,value1) and count < N Then if ((dayopen > DayClose(1)*0.98) or (dayopen <= DayClose(1)*0.98 and stime >= 141500)) then
buy("b1");
if MarketPosition == 1 and MaxEntries == 1 Then
buy("b2",atlimit,value4);
}
if crossup(c,value2) Then
ExitLong();
if CrossDown(c,Value5) Then
ExitLong("bx1",onclose,def,"b1");
if (c<Value5) and (stime < 090300 or stime>=144800) Then
ExitLong("bx2",onclose,def,"b2");
답변 1
예스스탁 예스스탁 답변
2016-08-18 09:56:34
안녕하세요
예스스탁입니다.
작성해 드린 수식은 당일의 진입신호 발생횟수를 제한하는 식입니다.
당일 청산횟수기준으로 변경해 드립니다.
input : N(1);
var : AA(0),BB(0),CC(0);
var : TF(0),VV(0),VH(0),VH1(0),upv(0);
var : cnt(0),count(0);
count = 0;
for cnt = 1 to 20{
if sdate ==ExitDate(cnt) Then
count = count+1;
}
AA = (highest(H,5760)+lowest(L,5760))/2;
BB = Highest(H,1800);
var1 = NthHighestBar(1,H,1800);
CC = lowest(L,var1);
value1 = (((BB-AA)/5)*0)+AA;
value2 = (((BB-AA)/5)*1.5)+CC;
Value5 = AA-(((BB-AA)/5)*3);
TF = dayindex%15;
if date != date[1] then{
VV = 0;
VH = 0;
VH1 = VH[1];
}
if (TF < TF[1] and date == date[1]) Then
VV = 0;
VV = VV +V;
if VV > VH Then
VH = VV;
if stime < 091500 Then
value3 = VH;
value4 = AA-(((BB-AA)/5)*1);
if (stime >= 090300 and value3 <= VH1) or (stime >= 141500) then{
if MarketPosition == 0 and CrossDown(c,value1) and count < N Then
if ((dayopen > DayClose(1)*0.98) or (dayopen <= DayClose(1)*0.98 and stime >= 141500)) then
buy("b1");
if MarketPosition == 1 and MaxEntries == 1 and
!Crossup(c,value2) and
!CrossDown(c,value5) and
!((c<Value5) and (stime < 090300 or stime>=144800)) Then
buy("b2",atlimit,value4);
}
if crossup(c,value2) Then
ExitLong();
if CrossDown(c,Value5) Then
ExitLong("bx1",onclose,def,"b1");
if (c<Value5) and (stime < 090300 or stime>=144800) Then
ExitLong("bx2",onclose,def,"b2");
즐거운 하루되세요
> 사과쥬스 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 수정하여 주셨던 수식을 적용하였으나 전일 매수, 당일 매도 후 당일 b1,b2 재매수가 이루어집니다.
1. 매매횟수 제한이 이루어지지 않습니다.
2. 매도 당일 이전에 매수신호가 나온 b1,b2를 인식하지 못합니다. 따라서 당일 매도가 이루어져도, 당일은 매수신호 b1이 나오지 않았기 때문에 count < N 가 성립하여 매수가 되는 듯 합니다.
3. 매수가 언재 이루어지던지, 당일 매도가 나온 경우에는 당일 매수하지 않는 방법을 찾고자 합니다.
감사합니다.
이전 문의 및 답변내용
---------------------------
안녕하세요
예스스탁입니다.
b2는 추가진입식인에 신호타입이 atlimit으로 되어 있습니다.
완성봉에서 value4값을 셋팅하고 다음봉에서
해당 값 이하의 시세가 발생하면 즉시신호가 발생합니다.
수식에서 포지션등은 신호발생후 봉이 완성이 되어야 인지됩니다.
청산과 b2진입이 동시 셋팅되므로
b2조건에 청산조건이 만족하지 않은 봉에서만
셋팅되게 아래와 같이 조건을 추가하셔야 합니다.
input : N(1);
var : AA(0),BB(0),CC(0);
var : TF(0),VV(0),VH(0),VH1(0),upv(0);
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 20{
if sdate ==EntryDate(cnt) Then
count = count+1;
}
AA = (highest(H,5760)+lowest(L,5760))/2;
BB = Highest(H,1800);
var1 = NthHighestBar(1,H,1800);
CC = lowest(L,var1);
value1 = (((BB-AA)/5)*0)+AA;
value2 = (((BB-AA)/5)*1.5)+CC;
Value5 = AA-(((BB-AA)/5)*3);
TF = dayindex%15;
if date != date[1] then{
VV = 0;
VH = 0;
VH1 = VH[1];
}
if (TF < TF[1] and date == date[1]) Then
VV = 0;
VV = VV +V;
if VV > VH Then
VH = VV;
if stime < 091500 Then
value3 = VH;
value4 = AA-(((BB-AA)/5)*1);
if (stime >= 090300 and value3 <= VH1) or (stime >= 141500) then{
if MarketPosition == 0 and CrossDown(c,value1) and count < N Then
if ((dayopen > DayClose(1)*0.98) or (dayopen <= DayClose(1)*0.98 and stime >= 141500)) then
buy("b1");
if MarketPosition == 1 and MaxEntries == 1 and
!Crossup(c,value2) and
!CrossDown(c,value5) and
!((c<Value5) and (stime < 090300 or stime>=144800)) Then
buy("b2",atlimit,value4);
}
if crossup(c,value2) Then
ExitLong();
if CrossDown(c,Value5) Then
ExitLong("bx1",onclose,def,"b1");
if (c<Value5) and (stime < 090300 or stime>=144800) Then
ExitLong("bx2",onclose,def,"b2");
즐거운 하루되세요
> 사과쥬스 님이 쓴 글입니다.
> 제목 : 매매횟수 제한 검토 부탁드립니다.
> 아래수식에 당일 매수,매도 횟수가 1회로 제한하는 수식이 포함된 것으로 아는데
시스템 적용시 당일 매도후 다시 매수하는 경우가 생깁니다.
검토 부탁드립니다~
-아래-
input : N(1);
var : AA(0),BB(0),CC(0);
var : TF(0),VV(0),VH(0),VH1(0),upv(0);
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 20{
if sdate ==EntryDate(cnt) Then
count = count+1;
}
AA = (highest(H,5760)+lowest(L,5760))/2;
BB = Highest(H,1800);
var1 = NthHighestBar(1,H,1800);
CC = lowest(L,var1);
value1 = (((BB-AA)/5)*0)+AA;
value2 = (((BB-AA)/5)*1.5)+CC;
Value5 = AA-(((BB-AA)/5)*3);
TF = dayindex%15;
if date != date[1] then{
VV = 0;
VH = 0;
VH1 = VH[1];
}
if (TF < TF[1] and date == date[1]) Then
VV = 0;
VV = VV +V;
if VV > VH Then
VH = VV;
if stime < 091500 Then
value3 = VH;
value4 = AA-(((BB-AA)/5)*1);
if (stime >= 090300 and value3 <= VH1) or (stime >= 141500) then{
if MarketPosition == 0 and CrossDown(c,value1) and count < N Then if ((dayopen > DayClose(1)*0.98) or (dayopen <= DayClose(1)*0.98 and stime >= 141500)) then
buy("b1");
if MarketPosition == 1 and MaxEntries == 1 Then
buy("b2",atlimit,value4);
}
if crossup(c,value2) Then
ExitLong();
if CrossDown(c,Value5) Then
ExitLong("bx1",onclose,def,"b1");
if (c<Value5) and (stime < 090300 or stime>=144800) Then
ExitLong("bx2",onclose,def,"b2");
다음글
이전글