답변완료
종목검색 수식 보완 부탁드립니다.
ㄱ.종목검색
input : Period(20),Period1(5),Period2(20),A(0);
var1 = ma(C,Period);
Var2 = ma(C,Period2);
Var3 = (ma(c,Period1)-Var2)/C*100;
if Crossup(C,Var1) and Var2 > Var2[1] and Var2[1] < Var2[2] and
CrossUp(Var3,A) Then Find(1);
위의 1,2번 수식신호가 1봉 안에서 동시에 나타나거나, OR 1번신호가 나타나고 2번신호가 이후3봉 안에서 나타나는 종목들을 검색하고 싶습니다.
ㄴ.시스템수식도 변화가 있으면 수정부탁드립니다.
input : Period(20),Period1(5),Period2(20),A(0);
var1 = ma(C,Period);
Var2 = ma(C,Period2);
Var3 = (ma(c,Period1)-Var2)/C*100;
if Crossup(C,Var1) and Var2 > Var2[1] and Var2[1] < Var2[2] and
CrossUp(Var3,A) Then
buy();
input : 익절(15),손절(2);
var1 = ma(C,Period);
Var2 = ma(C,Period2);
Var3 = (ma(c,Period1)-Var2)/C*100;
if Crossup(C,Var1) and Var2 > Var2[1] and Var2[1] < Var2[2] and
CrossUp(Var3,A) Then
buy();
SetStopProfittarget(익절,PercentStop);
SetStopLoss(손절,PercentStop);
ㄷ.검색식 변화가 있으면 수정 부탁드립니다.
input : Period(20),Period1(5),Period2(20),A(0);
var1 = ma(C,Period);
Var2 = ma(C,Period2);
Var3 = (ma(c,Period1)-Var2)/C*100;
if Crossup(C,Var1) and Var2 > Var2[1] and Var2[1] < Var2[2] and
CrossUp(Var3,A) Then
Plot1(H,"검색",Magenta);
바쁘시겠지만 부탁드립니다.
2022-07-13
1437
글번호 160698
종목검색
답변완료
수식 확인 부탁드립니다.
안녕하십니까
작성하여 주신 수식 검토 부탁드립니다.
-------------------------------------------------------------------------
input : P(20),이평기간(5);
var : cnt(0),sum1(0),mav1(0),sum2(0),mav2(0),t(0),count(0);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0);
Array : 상[100](False);
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 Bdate != Bdate[1] Then
{
For cnt = 99 DownTo 1
{
상[cnt] = 상[cnt-1];
}
}
if C == 상한가 Then
상[0] = true;
Else
상[0] = False;
count = 0;
For cnt = 0 to P-1
{
if 상[cnt] == true Then
count = count+1;
}
sum1 = 0;
sum2 = NextBarOpen;
For cnt = 0 to 이평기간-1
{
sum1 = sum1 + DayClose(cnt);
if cnt < P-1 Then
sum2 = sum2 + DayClose(cnt);
}
mav1 = sum1/이평기간;
mav2 = sum2/이평기간;
if NextBarSdate != sDate Then
{
T = 0;
if C <= mav1*1.15 and C >= mav1*0.85 and count >= 1 Then
{
T = 1;
if NextBarOpen < mav2 Then
{
T = 2;
Buy("b11",AtMarket);
}
Else
{
T = 3;
Buy("b12",AtLimit,mav2);
}
}
Condition1 = False;
}
Else
{
if L <= mav1 Then
Condition1 = true;
if Condition1 == False and T == 3 Then
Buy("b2",AtLimit,mav2);
}
SetStopEndofday(151800);
SetStopLoss(5,PercentStop);
#ㅇ 매수
# 1. 최근 20거래일 중 종가 상한가
# 2. 일봉 상 가격 형성이 5일선 기준 +-15% 이내
# 3. 당일 시가가 일봉기준 5일선 위에서 시작하면 당일 일봉 상 5일 이동평균선에 닿거나 하향하면 바로 매수
# 4. 당일 시가가 일봉기준 5일선 아래에서 시작하면 시가로 매수 주문
#매수 주문은 시가가 전일종가 대비 +-20 이내에서 형성될때만 나갈수있게 부탁드립니다.
#ㅇ 매도
#오후 3시 18분 전량매도
검토 요청
5일선 위에서 시가가 형성되어도 시가로 매수 주문이 발생 합니다.
확인 부탁드립니다.,
감사합니다.
2022-07-13
1464
글번호 160693
시스템
답변완료
수식 부탁드립니다
수고하십니다.
늘 감사드립니다.
아래 수식은 Data2 30분봉 기준값 수식으로 현재값이 기준에 도달하면 매매되는
시스템으로 이 현재값을 5ma이동평균값으로 변경 가능한지요
수식부탁드립니다
input : 익절(40),손절(20),k(5),k1(5);
Value1=Data2(C-PriceScale*k);
Value2=Data2(C+PriceScale*k1);
if sTime >= 93000 and NextBarSdate == sDate Then
{
if c > value1 Then
Buy("b",AtLimit, Value1);
if c < Value2 Then
Sell("s",AtLimit,Value2);
}
SetStopProfittarget(익절,PointStop);
SetStopLoss(손절,PointStop);
2022-07-13
1495
글번호 160692
시스템