예스스탁
예스스탁 답변
2016-03-21 17:10:43
안녕하세요
예스스탁입니다.
현재 수식에서 일간 거대대금을 계산하는데
봉수 부족으로 계산이 되지 않습니다.
해당 종목 거래가 없은 구간이 많이 있습니다.
수식에서는 차트봉만으로 당일치를 누적하므로
해당 부분때문에 일봉 데이터를 참조데이터로 추가하신 후에 식을 적용하셔야 할것 같습니다.
첨부된 그림과 같이 분봉 차트에 일간 데이터를 참조데이터로
차트에 추가하신 후에 식 적용하시기 바랍니다.
참조데이터는 차트왼쪽 상단의 종목선택 버튼 중 오른쪽 클릭하시면
선택해 추가할수 있습니다.기본종목과 같은 종목 다른주기도 적용가능합니다.
input : N(15);
Array : Cond[50](false,data1);
var : 상한가(0,data1), UpLimit(0,data1),cnt(0,data1),sumM(0,data1),avgM(0,data1);
var : up1(0,data1), up2(0,data1), up3(0,data1), up4(0,data1), up5(0,data1),up6(0,data1),Up7(0,data1);
if date != date[1] Then{
Cond[0] = false;
for cnt = 1 to 49{
Cond[cnt] = Cond[cnt-1][1];
}
}
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else if date >= 20050328 and date < 20150615 Then
UpLimit = (BP[0] * 1.15);
Else
UpLimit = (BP[0] * 1.30);
if CodeCategory() == 2 then {
if date >= 20030721 then {
up1 = int(UpLimit/100+0.00001)*100;
up2 = int(UpLimit/100+0.00001)*100;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/5+0.00001)*5;
up7 = int(UpLimit/1+0.00001)*1;
}
else {
up1 = int(UpLimit/1000+0.00001)*1000;
up2 = int(UpLimit/500+0.00001)*500;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/10+0.00001)*10;
up7 = int(UpLimit/1+0.00001)*1;
}
}
Else {
up1 = int(UpLimit/1000+0.00001)*1000;
up2 = int(UpLimit/500+0.00001)*500;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/5+0.00001)*5;
up7 = int(UpLimit/1+0.00001)*1;
}
if CodeCategory() == 1 || CodeCategory() == 2 then {
if sdate < 20101004 Then{
If BP >= 500000 Then
상한가 = up1;
Else If BP >= 100000 Then
상한가 = iff(up2>=500000, up1, up2);
Else If BP >= 50000 Then
상한가 = iff(up3>=100000, up2, up3);
Else If BP >= 10000 Then
상한가 = iff(up4>=50000, up3, up4);
Else If BP >= 5000 Then
상한가 = iff(up5>=10000, up4, up5);
Else If BP >= 1000 Then
상한가 = iff(up5>=5000, up5, up6);
Else
상한가 = iff(up6>=1000, up6, up6);
}
Else{
If BP >= 500000 Then
상한가 = up1;
Else If BP >= 100000 Then
상한가 = iff(up2>=500000, up1, up2);
Else If BP >= 50000 Then
상한가 = iff(up3>=100000, up2, up3);
Else If BP >= 10000 Then
상한가 = iff(up4>=50000, up3, up4);
Else If BP >= 5000 Then
상한가 = iff(up5>=10000, up4, up5);
Else If BP >= 1000 Then
상한가 = iff(up5>=5000, up5, up6);
Else
상한가 = iff(up6>=1000, up6, up7);
}
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
if H >= 상한가 Then
cond[0] = true;
Condition1 = false;
for cnt = 1 to N{
if Cond[cnt] == true Then
Condition1 = true;
}
if ExitDate(1) != sdate and
stime < 130000 and
data2(ma(M,N)) >= 3000000000 and
Condition1 == true and
C > dayopen and
DayVolume > DayVolume(1)*0.7 and
C <= DayClose(1)*1.10 Then
buy();
if MarketPosition == 1 Then{
ExitLong("BP1",atlimit,EntryPrice*1.05,"",floor(MaxContracts*0.5),1);
ExitLong("BP2",atlimit,EntryPrice*1.10);
if CurrentContracts < MaxContracts Then
exitlong("BP3",AtStop,EntryPrice);
ExitLong("BL",AtStop,EntryPrice*0.97);
}
SetStopEndofday(144000);
2
종목검색은 아래와 같이 작성하신후
일봉주기에서 검색하시면 됩니다.
종목검색속성에서 검색에 필요한 최소기간에 100봉이상 지정하고
검색하시기 바랍니다.
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else if date >= 20050328 and date < 20150615 Then
UpLimit = (BP[0] * 1.15);
Else
UpLimit = (BP[0] * 1.30);
if CodeCategory() == 2 then {
if date >= 20030721 then {
up1 = int(UpLimit/100+0.00001)*100;
up2 = int(UpLimit/100+0.00001)*100;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/5+0.00001)*5;
up7 = int(UpLimit/1+0.00001)*1;
}
else {
up1 = int(UpLimit/1000+0.00001)*1000;
up2 = int(UpLimit/500+0.00001)*500;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/10+0.00001)*10;
up7 = int(UpLimit/1+0.00001)*1;
}
}
Else {
up1 = int(UpLimit/1000+0.00001)*1000;
up2 = int(UpLimit/500+0.00001)*500;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/5+0.00001)*5;
up7 = int(UpLimit/1+0.00001)*1;
}
if CodeCategory() == 1 || CodeCategory() == 2 then {
if sdate < 20101004 Then{
If BP >= 500000 Then
상한가 = up1;
Else If BP >= 100000 Then
상한가 = iff(up2>=500000, up1, up2);
Else If BP >= 50000 Then
상한가 = iff(up3>=100000, up2, up3);
Else If BP >= 10000 Then
상한가 = iff(up4>=50000, up3, up4);
Else If BP >= 5000 Then
상한가 = iff(up5>=10000, up4, up5);
Else If BP >= 1000 Then
상한가 = iff(up5>=5000, up5, up6);
Else
상한가 = iff(up6>=1000, up6, up6);
}
Else{
If BP >= 500000 Then
상한가 = up1;
Else If BP >= 100000 Then
상한가 = iff(up2>=500000, up1, up2);
Else If BP >= 50000 Then
상한가 = iff(up3>=100000, up2, up3);
Else If BP >= 10000 Then
상한가 = iff(up4>=50000, up3, up4);
Else If BP >= 5000 Then
상한가 = iff(up5>=10000, up4, up5);
Else If BP >= 1000 Then
상한가 = iff(up5>=5000, up5, up6);
Else
상한가 = iff(up6>=1000, up6, up7);
}
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
if countif(H >= 상한가,90) >= 1 and ma(V,15) >= 3000000000 Then
find(1);
즐거운 하루되세요
> 하루4% 님이 쓴 글입니다.
> 제목 : 시스템 검증
> 밑에 리플로 달았는데 못보신것 같아서 다시 올립니다.
만들어 주신 시스템으로 시험적용 해봐도 해당사항이 되는데 안뜨네요.
예를 들어 코데즈컴바인047770 3월16일에 떠야하는데 안뜹니다. 1분봉 적용
input : N(15);
Array : DM[50](0),Cond[50](false);
var : 상한가(0), UpLimit(0),cnt(0),sumM(0),avgM(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0);
if date != date[1] Then{
Cond[0] = false;
DM[0] = 0;
for cnt = 1 to 49{
DM[cnt] = DM[cnt-1][1];
Cond[cnt] = Cond[cnt-1][1];
}
}
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else if date >= 20050328 and date < 20150615 Then
UpLimit = (BP[0] * 1.15);
Else
UpLimit = (BP[0] * 1.30);
if CodeCategory() == 2 then {
if date >= 20030721 then {
up1 = int(UpLimit/100+0.00001)*100;
up2 = int(UpLimit/100+0.00001)*100;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/5+0.00001)*5;
up7 = int(UpLimit/1+0.00001)*1;
}
else {
up1 = int(UpLimit/1000+0.00001)*1000;
up2 = int(UpLimit/500+0.00001)*500;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/10+0.00001)*10;
up7 = int(UpLimit/1+0.00001)*1;
}
}
Else {
up1 = int(UpLimit/1000+0.00001)*1000;
up2 = int(UpLimit/500+0.00001)*500;
up3 = int(UpLimit/100+0.00001)*100;
up4 = int(UpLimit/50+0.00001)*50;
up5 = int(UpLimit/10+0.00001)*10;
up6 = int(UpLimit/5+0.00001)*5;
up7 = int(UpLimit/1+0.00001)*1;
}
if CodeCategory() == 1 || CodeCategory() == 2 then {
if sdate < 20101004 Then{
If BP >= 500000 Then
상한가 = up1;
Else If BP >= 100000 Then
상한가 = iff(up2>=500000, up1, up2);
Else If BP >= 50000 Then
상한가 = iff(up3>=100000, up2, up3);
Else If BP >= 10000 Then
상한가 = iff(up4>=50000, up3, up4);
Else If BP >= 5000 Then
상한가 = iff(up5>=10000, up4, up5);
Else If BP >= 1000 Then
상한가 = iff(up5>=5000, up5, up6);
Else
상한가 = iff(up6>=1000, up6, up6);
}
Else{
If BP >= 500000 Then
상한가 = up1;
Else If BP >= 100000 Then
상한가 = iff(up2>=500000, up1, up2);
Else If BP >= 50000 Then
상한가 = iff(up3>=100000, up2, up3);
Else If BP >= 10000 Then
상한가 = iff(up4>=50000, up3, up4);
Else If BP >= 5000 Then
상한가 = iff(up5>=10000, up4, up5);
Else If BP >= 1000 Then
상한가 = iff(up5>=5000, up5, up6);
Else
상한가 = iff(up6>=1000, up6, up7);
}
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
if H >= 상한가 Then
cond[0] = true;
DM[0] = DM[0]+M;
if DM[N] > 0 Then{
sumM = 0;
Condition1 = false;
for cnt = 1 to N{
sumM = sumM + DM[N];
if Cond[cnt] == true Then
Condition1 = false;
}
avgM = sumM/15;
if ExitDate(1) != sdate and
stime < 130000 and
avgM >= 3000000000 and
Condition1 == true and
C > dayopen and
DayVolume > DayVolume(1)*0.7 and
C <= DayClose(1)*0.9 Then
buy();
}
if MarketPosition == 1 Then{
ExitLong("BP1",atlimit,EntryPrice*1.05);
ExitLong("BP2",atlimit,EntryPrice*1.10);
ExitLong("BL",atlimit,EntryPrice*0.97);
}
SetStopEndofday(144000);
아 그리고 90일중 상한가가 포함되어있고 최근
15일 평균 거래대금 30억 이상 종목을 검색하고 싶은데
위에 포함된 수식이 있는데 검색추가해도 잘 안되네요.
초보라 죄송합니다. 제가 잘못 추가했나본데 자세히 설명해주시면 감사합니다.