답변완료
지표수식 부탁 드려봅니다
중최고가=최고값(고가,20);
중최저가=최저값(저가,20);
경계=(중최고가+중최저가)/2-(중최고가-중최저가)*배분1;
경계1=crossup(종가, 경계)&& 종가>시가*배분2;
경계2=crossdown(c, 경계);
기준봉=valuewhen(1, 경계1 or 경계2, 시가);
기준봉1=crossup(종가, 기준봉);
기준봉2=crossdown(종가, 기준봉);
결과기준=valuewhen(1, 기준봉1 or 기준봉2, 시가);
결과기준1=crossup(종가, 결과기준);
결과기준2=crossdown(종가, 결과기준);
valuewhen(1, 결과기준1 or 결과기준2, 시가)
조건
배분1 0.236
배분2 1.02
2024-01-05
728
글번호 175458
지표
답변완료
수식 질문합니다.
안녕하세요.
아래 수식 검증 부탁드립니다.
관련 없는 종목들이 많이 떠서요.
감사합니다.
그리고 85196 추가질문 답변 부탁드립니다.
--------------------------------------------------------------------
input: nbar(10);
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 date >= 20230125 Then
{
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;
}
Else
{
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 date >= 20230125 Then
{
If BP >= 500000 Then
상한가 = up1;
Else If BP >= 200000 Then
상한가 = iff(up2>=500000, up1, up2);
Else If BP >= 50000 Then
상한가 = iff(up3>=200000, up2, up3);
Else If BP >= 20000 Then
상한가 = iff(up4>=50000, up3, up4);
Else If BP >= 5000 Then
상한가 = iff(up5>=20000, up4, up5);
Else If BP >= 2000 Then
상한가 = iff(up5>=5000, up5, up6);
Else
상한가 = iff(up6>=2000, up6, up7);
}
Else
{
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;
}
}
var : S(0),ii(0);
if H >= 상한가 Then
{
S = (C+C[1])/2;
ii = Index;
}
if ii > 0 and Index <= ii+nbar and CrossDown(C,S) Then
Find(1);
2024-01-05
821
글번호 175456
종목검색
답변완료
수식 질문합니다.
안녕하세요.
아래 수식에서
이평선골과 마루의 이격을 세분해서 적용하고 싶은데요.
이격이
30-50% 일 때 골과 마루의 중심 돌파
50-120% 일 때 골과 마루의 1/4선 또는 중심 돌파
120% 이상 일 때 골과 마루의 1/16 또는 1/8 또는 1/4 또는 1/2 돌파
하는 종목을 검색하고 싶습니다.
감사합니다.
---------------------------------------------
input : P(240),Nper(30);
var : T(0),고점(0),저점(0);
var1 = ma(C,240);
if var1 > var1[1] Then
T = 1;
if var1 < var1[1] Then
T = -1;
#고점(이평하락전환)
if T == -1 and T != T[1] Then
{
value1 = var1[1];
value11 = value1[1];
if value1 > value11 Then
고점 = value1;
}
#저점(이평상승전환)
if T == 1 and T != T[1] Then
{
value2 = var1[1];
Value22 = Value2[1];
if Value2 < Value22 Then
저점 = Value2;
}
if 고점 > 0 and 저점 > 0 and
고점 >= 저점*(1+Nper/100) and
C > O and
(CrossUp(c,고점) or CrossUp(C,(고점+저점)/2)) Then
Find(1);
2024-01-05
577
글번호 175455
종목검색