커뮤니티
지표 및 시스템 문의
2015-12-18 02:12:27
183
글번호 93569
한결같은 답변에 진심으로 감사드리며 남은 한해 잘 마무리 하시기 바랍니다.
현물용으로 사용할 지표와 수식 부탁드립니다.
(지표작성)
10분봉에서 가장 최근의 상한가 발생후 최고가를 기준선(기준선)을 만들고,
기준선을 아랫방향으로 N% 만큼 평행이동한 선을(1차하락선) 만들고
기준선으로 아랫방향으로 2N% 만큼 평행이동한 선을(2차하락선)을 만듬
이를 지표로 만드는 방법을 부탁드립니다.
(수식작성)
매수금액은 100만원
10분봉 현재가가 2차 하락선을 하향돌파한 후 다시 상향 돌파할 때 매수하고
(수익청산) 수익이 5% 발생시 현물 수익청산
(손절청산) 손실이 5% 발생시 현물 손절청산
매매횟수는 1회입니다.
추가)지표를 첨부물처럼 만들고 싶습니다
수고하세요~~~
- 1. 94082_문의.jpg (0.07 MB)
답변 1
예스스탁 예스스탁 답변
2015-12-18 12:57:00
안녕하세요
예스스탁입니다.
1.지표
input : N(5);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0);
var : HH(0),H1(0),H2(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 H >= 상한가 Then{
HH = H;
Condition1 = true;
}
#최근 상한가 발생 후 최고가
if Condition1 == true and H > HH Then{
HH = H;
H1 = HH*(1-N/100);
H2 = HH*(1-(N*2)/100);
}
plot1(HH);
plot2(H1);
plot3(H2);
2번 시스템
상한가 발생후에 무포지션일때
해당 조건으로 1회만 진입하게 작성했습니다.
input : N(5);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0);
var : HH(0),H1(0),H2(0),T1(0),entry(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 H >= 상한가 Then{
HH = H;
Condition1 = true;
T1 = TotalTrades;
}
if MarketPosition == 0 Then
entry = TotalTrades-T1;
Else
entry = (TotalTrades-T1)+1;
#최근 상한가 발생 후 최고가
if Condition1 == true and H > HH Then{
HH = H;
H1 = HH*(1-N/100);
H2 = HH*(1-(N*2)/100);
}
if H < H2 and Entry == 0 Then
buy("b",AtStop,H2);
SetStopProfittarget(5,PercentStop);
SetStopLoss(5,PercentStop);
즐거운 하루되세요
> 탄젠트80 님이 쓴 글입니다.
> 제목 : 지표 및 시스템 문의
> 한결같은 답변에 진심으로 감사드리며 남은 한해 잘 마무리 하시기 바랍니다.
현물용으로 사용할 지표와 수식 부탁드립니다.
(지표작성)
10분봉에서 가장 최근의 상한가 발생후 최고가를 기준선(기준선)을 만들고,
기준선을 아랫방향으로 N% 만큼 평행이동한 선을(1차하락선) 만들고
기준선으로 아랫방향으로 2N% 만큼 평행이동한 선을(2차하락선)을 만듬
이를 지표로 만드는 방법을 부탁드립니다.
(수식작성)
매수금액은 100만원
10분봉 현재가가 2차 하락선을 하향돌파한 후 다시 상향 돌파할 때 매수하고
(수익청산) 수익이 5% 발생시 현물 수익청산
(손절청산) 손실이 5% 발생시 현물 손절청산
매매횟수는 1회입니다.
추가)지표를 첨부물처럼 만들고 싶습니다
수고하세요~~~
다음글
이전글