커뮤니티
수정부탁합니다
2013-04-01 13:59:10
247
글번호 61457
안녕하십니까~~
1.하루에 한번 들어가는 식으로 해주세요 하루에 한번매수후 매도하였으면 다시집입금지
다음날 다시 감시
2.2번째 매도시점에서 음봉일때종가로 매도 했는데 일봉시점으로 주가가
종가시점(2시 40분정도)5일선 이탈시 매도
3. 주가가 일봉기준 90일선 위에서만 진입 가능하게 해주세요
input : 투입금액(1000000);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),entryVol(0),Xvol(0);
#kospi
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
entryVol = int(int(투입금액/C)/10)*10;
Else #5만원 이상
entryVol = int(투입금액/C);
}
#kosdoq
if CodeCategory == 2 Then
entryVol = int(투입금액/C);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else
UpLimit = (BP[0] * 1.15);
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;
}
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;
}
}
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;
}
if CodeCategory() == 1 || CodeCategory() == 2 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
상한가 = iff(up6>=5000, up5, up6);
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
if MarketPosition == 0 Then
buy("b",AtStop,상한가*0.99,entryVol);
if MarketPosition == 1 Then{
#청산수량 50% 계산
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
Xvol = int(int(MaxContracts*0.5)/10)*10;
Else #5만원 이상
Xvol = int(MaxContracts*0.5);
}
if CodeCategory == 2 Then
Xvol = int(MaxContracts*0.5);
if CurrentContracts == MaxContracts Then
exitlong("bx1",AtLimit,EntryPrice*1.06,"",Xvol,1);
if CurrentContracts < MaxContracts and stime == 150000 and C < DayOpen Then
exitlong("bx2");
}
SetStopLoss(1,PercentStop);
답변 4
예스스탁 예스스탁 답변
2013-04-01 14:58:28
안녕하세요? 예스스탁입니다.
2번 내용은 말씀하신 의도를 이해하지 못했습니다. 다시 올려주시면 추가 답변드리겠습니다.
1번과 3번 추가된 내용으로 답변드립니다.(참고로 1번의 진입횟수 1일 1회 제한은 아래 사용자 함수가 작성되어 있어야 합니다.)
[사용자함수:entriestoday]
Input : nDate(Numeric);
Var : Count(0);
Count = 0 ;
For Value1 = 0 To 10 {
If EntryDate(Value1) == nDate Then
Count = Count + 1;
}
EntriesToday = Count;
[시스템식]
input : 투입금액(1000000);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),entryVol(0),Xvol(0);
#kospi
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
entryVol = int(int(투입금액/C)/10)*10;
Else #5만원 이상
entryVol = int(투입금액/C);
}
#kosdoq
if CodeCategory == 2 Then
entryVol = int(투입금액/C);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else
UpLimit = (BP[0] * 1.15);
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;
}
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;
}
}
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;
}
if CodeCategory() == 1 || CodeCategory() == 2 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
상한가 = iff(up6>=5000, up5, up6);
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
input : P1(90);
var : sumV(0), maV(0), count(0);
sumV = 0;
for count = 0 to P1-1 {
sumV = sumV+DayClose(count);
}
maV = sumV / P1;
if MarketPosition == 0 and EntriesToday(date) < 1 and C > maV Then
buy("b",AtStop,상한가*0.99,entryVol);
if MarketPosition == 1 Then{
#청산수량 50% 계산
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
Xvol = int(int(MaxContracts*0.5)/10)*10;
Else #5만원 이상
Xvol = int(MaxContracts*0.5);
}
if CodeCategory == 2 Then
Xvol = int(MaxContracts*0.5);
if CurrentContracts == MaxContracts Then
exitlong("bx1",AtLimit,EntryPrice*1.06,"",Xvol,1);
if CurrentContracts < MaxContracts and stime == 150000 and C < DayOpen Then
exitlong("bx2");
}
SetStopLoss(1,PercentStop);
> HI_jht7469 님이 쓴 글입니다.
> 제목 : 수정부탁합니다
> 안녕하십니까~~
1.하루에 한번 들어가는 식으로 해주세요 하루에 한번매수후 매도하였으면 다시집입금지
다음날 다시 감시
2.2번째 매도시점에서 음봉일때종가로 매도 했는데 일봉시점으로 주가가
종가시점(2시 40분정도)5일선 이탈시 매도
3. 주가가 일봉기준 90일선 위에서만 진입 가능하게 해주세요
input : 투입금액(1000000);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),entryVol(0),Xvol(0);
#kospi
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
entryVol = int(int(투입금액/C)/10)*10;
Else #5만원 이상
entryVol = int(투입금액/C);
}
#kosdoq
if CodeCategory == 2 Then
entryVol = int(투입금액/C);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else
UpLimit = (BP[0] * 1.15);
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;
}
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;
}
}
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;
}
if CodeCategory() == 1 || CodeCategory() == 2 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
상한가 = iff(up6>=5000, up5, up6);
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
if MarketPosition == 0 Then
buy("b",AtStop,상한가*0.99,entryVol);
if MarketPosition == 1 Then{
#청산수량 50% 계산
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
Xvol = int(int(MaxContracts*0.5)/10)*10;
Else #5만원 이상
Xvol = int(MaxContracts*0.5);
}
if CodeCategory == 2 Then
Xvol = int(MaxContracts*0.5);
if CurrentContracts == MaxContracts Then
exitlong("bx1",AtLimit,EntryPrice*1.06,"",Xvol,1);
if CurrentContracts < MaxContracts and stime == 150000 and C < DayOpen Then
exitlong("bx2");
}
SetStopLoss(1,PercentStop);
회원
2013-04-01 15:25:54
수고하십니다
3번은 보통 일봉 차트보면은 주식이 5일선 20일선 있잖아요
주가가 90일선 위에 있을경우 매수가능하게 해주세요
주가가 하락할때 90일선 밑에 있을경우 매수 금지 하고 위에 있을경우 매수요
사용자 함수 작성되어있어야 한다는 말이 먼가요? 제가 일일이 써야 한나든건가요?
잘몰라서 다시 질문드립니다 ,자동으로 자기가 감시하게 해주세요
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 수정부탁합니다
> 안녕하세요? 예스스탁입니다.
2번 내용은 말씀하신 의도를 이해하지 못했습니다. 다시 올려주시면 추가 답변드리겠습니다.
1번과 3번 추가된 내용으로 답변드립니다.(참고로 1번의 진입횟수 1일 1회 제한은 아래 사용자 함수가 작성되어 있어야 합니다.)
[사용자함수:entriestoday]
Input : nDate(Numeric);
Var : Count(0);
Count = 0 ;
For Value1 = 0 To 10 {
If EntryDate(Value1) == nDate Then
Count = Count + 1;
}
EntriesToday = Count;
[시스템식]
input : 투입금액(1000000);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),entryVol(0),Xvol(0);
#kospi
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
entryVol = int(int(투입금액/C)/10)*10;
Else #5만원 이상
entryVol = int(투입금액/C);
}
#kosdoq
if CodeCategory == 2 Then
entryVol = int(투입금액/C);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else
UpLimit = (BP[0] * 1.15);
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;
}
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;
}
}
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;
}
if CodeCategory() == 1 || CodeCategory() == 2 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
상한가 = iff(up6>=5000, up5, up6);
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
input : P1(90);
var : sumV(0), maV(0), count(0);
sumV = 0;
for count = 0 to P1-1 {
sumV = sumV+DayClose(count);
}
maV = sumV / P1;
if MarketPosition == 0 and EntriesToday(date) < 1 and C > maV Then
buy("b",AtStop,상한가*0.99,entryVol);
if MarketPosition == 1 Then{
#청산수량 50% 계산
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
Xvol = int(int(MaxContracts*0.5)/10)*10;
Else #5만원 이상
Xvol = int(MaxContracts*0.5);
}
if CodeCategory == 2 Then
Xvol = int(MaxContracts*0.5);
if CurrentContracts == MaxContracts Then
exitlong("bx1",AtLimit,EntryPrice*1.06,"",Xvol,1);
if CurrentContracts < MaxContracts and stime == 150000 and C < DayOpen Then
exitlong("bx2");
}
SetStopLoss(1,PercentStop);
> HI_jht7469 님이 쓴 글입니다.
> 제목 : 수정부탁합니다
> 안녕하십니까~~
1.하루에 한번 들어가는 식으로 해주세요 하루에 한번매수후 매도하였으면 다시집입금지
다음날 다시 감시
2.2번째 매도시점에서 음봉일때종가로 매도 했는데 일봉시점으로 주가가
종가시점(2시 40분정도)5일선 이탈시 매도
3. 주가가 일봉기준 90일선 위에서만 진입 가능하게 해주세요
input : 투입금액(1000000);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),entryVol(0),Xvol(0);
#kospi
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
entryVol = int(int(투입금액/C)/10)*10;
Else #5만원 이상
entryVol = int(투입금액/C);
}
#kosdoq
if CodeCategory == 2 Then
entryVol = int(투입금액/C);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else
UpLimit = (BP[0] * 1.15);
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;
}
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;
}
}
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;
}
if CodeCategory() == 1 || CodeCategory() == 2 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
상한가 = iff(up6>=5000, up5, up6);
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
if MarketPosition == 0 Then
buy("b",AtStop,상한가*0.99,entryVol);
if MarketPosition == 1 Then{
#청산수량 50% 계산
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
Xvol = int(int(MaxContracts*0.5)/10)*10;
Else #5만원 이상
Xvol = int(MaxContracts*0.5);
}
if CodeCategory == 2 Then
Xvol = int(MaxContracts*0.5);
if CurrentContracts == MaxContracts Then
exitlong("bx1",AtLimit,EntryPrice*1.06,"",Xvol,1);
if CurrentContracts < MaxContracts and stime == 150000 and C < DayOpen Then
exitlong("bx2");
}
SetStopLoss(1,PercentStop);
예스스탁 예스스탁 답변
2013-04-01 15:32:07
3번 내용은 작성되었습니다.
2번 내용이 이해되지 않은 내용입니다.
사용자함수는 YesLanguage편집기 창에 보시면 사용자함수가 있는데,
먼저 [사용자함수]로 되어 있는 내용을 사용자함수식에 작성해야 된다는 내용입니다.
사용자함수 작성하실때 이름은 'entriestoday'로 입력하시고 작성해 드린 사용자함수식을 그래도 복사하여서 내용 입력해 주시면 됩니다.
> HI_jht7469 님이 쓴 글입니다.
> 제목 : Re : Re : 수정부탁합니다
> 수고하십니다
3번은 보통 일봉 차트보면은 주식이 5일선 20일선 있잖아요
주가가 90일선 위에 있을경우 매수가능하게 해주세요
주가가 하락할때 90일선 밑에 있을경우 매수 금지 하고 위에 있을경우 매수요
사용자 함수 작성되어있어야 한다는 말이 먼가요? 제가 일일이 써야 한나든건가요?
잘몰라서 다시 질문드립니다 ,자동으로 자기가 감시하게 해주세요
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 수정부탁합니다
> 안녕하세요? 예스스탁입니다.
2번 내용은 말씀하신 의도를 이해하지 못했습니다. 다시 올려주시면 추가 답변드리겠습니다.
1번과 3번 추가된 내용으로 답변드립니다.(참고로 1번의 진입횟수 1일 1회 제한은 아래 사용자 함수가 작성되어 있어야 합니다.)
[사용자함수:entriestoday]
Input : nDate(Numeric);
Var : Count(0);
Count = 0 ;
For Value1 = 0 To 10 {
If EntryDate(Value1) == nDate Then
Count = Count + 1;
}
EntriesToday = Count;
[시스템식]
input : 투입금액(1000000);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),entryVol(0),Xvol(0);
#kospi
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
entryVol = int(int(투입금액/C)/10)*10;
Else #5만원 이상
entryVol = int(투입금액/C);
}
#kosdoq
if CodeCategory == 2 Then
entryVol = int(투입금액/C);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else
UpLimit = (BP[0] * 1.15);
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;
}
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;
}
}
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;
}
if CodeCategory() == 1 || CodeCategory() == 2 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
상한가 = iff(up6>=5000, up5, up6);
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
input : P1(90);
var : sumV(0), maV(0), count(0);
sumV = 0;
for count = 0 to P1-1 {
sumV = sumV+DayClose(count);
}
maV = sumV / P1;
if MarketPosition == 0 and EntriesToday(date) < 1 and C > maV Then
buy("b",AtStop,상한가*0.99,entryVol);
if MarketPosition == 1 Then{
#청산수량 50% 계산
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
Xvol = int(int(MaxContracts*0.5)/10)*10;
Else #5만원 이상
Xvol = int(MaxContracts*0.5);
}
if CodeCategory == 2 Then
Xvol = int(MaxContracts*0.5);
if CurrentContracts == MaxContracts Then
exitlong("bx1",AtLimit,EntryPrice*1.06,"",Xvol,1);
if CurrentContracts < MaxContracts and stime == 150000 and C < DayOpen Then
exitlong("bx2");
}
SetStopLoss(1,PercentStop);
> HI_jht7469 님이 쓴 글입니다.
> 제목 : 수정부탁합니다
> 안녕하십니까~~
1.하루에 한번 들어가는 식으로 해주세요 하루에 한번매수후 매도하였으면 다시집입금지
다음날 다시 감시
2.2번째 매도시점에서 음봉일때종가로 매도 했는데 일봉시점으로 주가가
종가시점(2시 40분정도)5일선 이탈시 매도
3. 주가가 일봉기준 90일선 위에서만 진입 가능하게 해주세요
input : 투입금액(1000000);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),entryVol(0),Xvol(0);
#kospi
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
entryVol = int(int(투입금액/C)/10)*10;
Else #5만원 이상
entryVol = int(투입금액/C);
}
#kosdoq
if CodeCategory == 2 Then
entryVol = int(투입금액/C);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else
UpLimit = (BP[0] * 1.15);
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;
}
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;
}
}
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;
}
if CodeCategory() == 1 || CodeCategory() == 2 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
상한가 = iff(up6>=5000, up5, up6);
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
if MarketPosition == 0 Then
buy("b",AtStop,상한가*0.99,entryVol);
if MarketPosition == 1 Then{
#청산수량 50% 계산
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
Xvol = int(int(MaxContracts*0.5)/10)*10;
Else #5만원 이상
Xvol = int(MaxContracts*0.5);
}
if CodeCategory == 2 Then
Xvol = int(MaxContracts*0.5);
if CurrentContracts == MaxContracts Then
exitlong("bx1",AtLimit,EntryPrice*1.06,"",Xvol,1);
if CurrentContracts < MaxContracts and stime == 150000 and C < DayOpen Then
exitlong("bx2");
}
SetStopLoss(1,PercentStop);
회원
2013-04-01 15:55:24
네 2번요 ㅋ 죄송요
일봉차트에서 5일선이 있잖아요 주가가 그5일선을 아래로 이탈시 장중 9시~14시30분까지
이탈하여도 매도 안하구요 2시30분넘어서도 주가가 5일선 밑에 있을경우 매도 하는식으로 해주세요 . 주가 상승시 5프로 이상일때 매도 하구 나머지는 음봉일때 매도로 되어있는데요 음봉일때 매도는 지우고요 5일선 이탈시 매도로 바구어주세요
최종적으로요- 5프로상승시 절반 매도 절반은 5일선 이탈시 매도, 매수가 대비 -1프로 빠질경우 무조건 매도
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : Re : Re : 수정부탁합니다
> 3번 내용은 작성되었습니다.
2번 내용이 이해되지 않은 내용입니다.
사용자함수는 YesLanguage편집기 창에 보시면 사용자함수가 있는데,
먼저 [사용자함수]로 되어 있는 내용을 사용자함수식에 작성해야 된다는 내용입니다.
사용자함수 작성하실때 이름은 'entriestoday'로 입력하시고 작성해 드린 사용자함수식을 그래도 복사하여서 내용 입력해 주시면 됩니다.
> HI_jht7469 님이 쓴 글입니다.
> 제목 : Re : Re : 수정부탁합니다
> 수고하십니다
3번은 보통 일봉 차트보면은 주식이 5일선 20일선 있잖아요
주가가 90일선 위에 있을경우 매수가능하게 해주세요
주가가 하락할때 90일선 밑에 있을경우 매수 금지 하고 위에 있을경우 매수요
사용자 함수 작성되어있어야 한다는 말이 먼가요? 제가 일일이 써야 한나든건가요?
잘몰라서 다시 질문드립니다 ,자동으로 자기가 감시하게 해주세요
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 수정부탁합니다
> 안녕하세요? 예스스탁입니다.
2번 내용은 말씀하신 의도를 이해하지 못했습니다. 다시 올려주시면 추가 답변드리겠습니다.
1번과 3번 추가된 내용으로 답변드립니다.(참고로 1번의 진입횟수 1일 1회 제한은 아래 사용자 함수가 작성되어 있어야 합니다.)
[사용자함수:entriestoday]
Input : nDate(Numeric);
Var : Count(0);
Count = 0 ;
For Value1 = 0 To 10 {
If EntryDate(Value1) == nDate Then
Count = Count + 1;
}
EntriesToday = Count;
[시스템식]
input : 투입금액(1000000);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),entryVol(0),Xvol(0);
#kospi
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
entryVol = int(int(투입금액/C)/10)*10;
Else #5만원 이상
entryVol = int(투입금액/C);
}
#kosdoq
if CodeCategory == 2 Then
entryVol = int(투입금액/C);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else
UpLimit = (BP[0] * 1.15);
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;
}
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;
}
}
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;
}
if CodeCategory() == 1 || CodeCategory() == 2 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
상한가 = iff(up6>=5000, up5, up6);
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
input : P1(90);
var : sumV(0), maV(0), count(0);
sumV = 0;
for count = 0 to P1-1 {
sumV = sumV+DayClose(count);
}
maV = sumV / P1;
if MarketPosition == 0 and EntriesToday(date) < 1 and C > maV Then
buy("b",AtStop,상한가*0.99,entryVol);
if MarketPosition == 1 Then{
#청산수량 50% 계산
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
Xvol = int(int(MaxContracts*0.5)/10)*10;
Else #5만원 이상
Xvol = int(MaxContracts*0.5);
}
if CodeCategory == 2 Then
Xvol = int(MaxContracts*0.5);
if CurrentContracts == MaxContracts Then
exitlong("bx1",AtLimit,EntryPrice*1.06,"",Xvol,1);
if CurrentContracts < MaxContracts and stime == 150000 and C < DayOpen Then
exitlong("bx2");
}
SetStopLoss(1,PercentStop);
> HI_jht7469 님이 쓴 글입니다.
> 제목 : 수정부탁합니다
> 안녕하십니까~~
1.하루에 한번 들어가는 식으로 해주세요 하루에 한번매수후 매도하였으면 다시집입금지
다음날 다시 감시
2.2번째 매도시점에서 음봉일때종가로 매도 했는데 일봉시점으로 주가가
종가시점(2시 40분정도)5일선 이탈시 매도
3. 주가가 일봉기준 90일선 위에서만 진입 가능하게 해주세요
input : 투입금액(1000000);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),entryVol(0),Xvol(0);
#kospi
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
entryVol = int(int(투입금액/C)/10)*10;
Else #5만원 이상
entryVol = int(투입금액/C);
}
#kosdoq
if CodeCategory == 2 Then
entryVol = int(투입금액/C);
if date >= 19981207 then {
if date < 20050328 && CodeCategory() == 2 then
UpLimit = (BP[0] * 1.12);
Else
UpLimit = (BP[0] * 1.15);
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;
}
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;
}
}
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;
}
if CodeCategory() == 1 || CodeCategory() == 2 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
상한가 = iff(up6>=5000, up5, up6);
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
if MarketPosition == 0 Then
buy("b",AtStop,상한가*0.99,entryVol);
if MarketPosition == 1 Then{
#청산수량 50% 계산
if CodeCategory == 1 Then{
if BasePrice < 50000 Then #기준가 5만원 미만
Xvol = int(int(MaxContracts*0.5)/10)*10;
Else #5만원 이상
Xvol = int(MaxContracts*0.5);
}
if CodeCategory == 2 Then
Xvol = int(MaxContracts*0.5);
if CurrentContracts == MaxContracts Then
exitlong("bx1",AtLimit,EntryPrice*1.06,"",Xvol,1);
if CurrentContracts < MaxContracts and stime == 150000 and C < DayOpen Then
exitlong("bx2");
}
SetStopLoss(1,PercentStop);