답변완료
지그재그 수식 추가
항상 수고하십니다.내년에 복 받으시길~
지그재그 수식입니다.저번에 고쳐주셔서 지그재그에 고점 저점에 상승 또는 하락폭 및 고저지수를 표시 할수 있게 해주셨는데요 거기에다가 더해서 몇프로 인지 % 하고 날짜까지
표시될수 있게 할수 있을까요?
미리 감사합니다.
input:length(12);
Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),TL2(0),TL3(0),Text1(0),처리구분(""),
TL_Val1(0),TL_Val2(0);
Array:고점[10,2](0),저점[10,2](0);
처리구분 = "";
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
}
Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리";
Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
{
For j = 10 DownTo 2
{
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
}
}
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
{
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
If 고점[3,1][1] < 고점[2,1][1] and 고점[2,1][1] > 고점[1,1][1] and 저점[2,1][1] < 저점[1,1][1] Then
TL_Delete(TL2);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1]),2)+NewLine+NumToStr(고점[1,1],2));
Text_SetStyle(Text1, 2, 1);
If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then
{
sBar = Index - 저점[2,2];
eBar = Index - 저점[1,2];
TL2 = TL_New(sDate[sBar],sTime[sBar],저점[2,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL_SetColor(TL2,BLUE);
}
}
}
If 처리구분 == "저점처리" Then
{
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
{
For j = 10 DownTo 2
{
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
}
}
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
{
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
If 저점[2,1][1] < 저점[1,1][1] and 저점[2,1][1] < 저점[3,1][1] and 고점[2,1][1] > 고점[1,1][1] Then
TL_Delete(TL3);
}
TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1]),2)+NewLine+NumToStr(저점[1,1],2));
Text_SetStyle(Text1, 2, 0);
If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then
{
sBar = Index - 고점[2,2];
eBar = Index - 고점[1,2];
TL3 = TL_New(sDate[sBar],sTime[sBar],고점[2,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL_SetColor(TL3,RED);
}
}
}
TL_SetSize(TL1,1);
TL_SetColor(TL1,Rgb(51,102,255));
TL_SetSize(TL2,1);
TL_SetSize(TL3,1);
TL_Val1 = 0; TL_Val2 = 0;
If 고점[2,1] > 고점[1,1] and 고점[2,1] > 고점[3,1] Then
{
If 고점[1,2] < 저점[1,2] and 저점[3,1] < 저점[2,1] Then
TL_Val1 = (저점[2,1]-저점[3,1])/(저점[2,2]-저점[3,2]) * (Index-저점[3,2])+저점[3,1];
If 저점[1,2] < 고점[1,2] and 저점[2,1] < 저점[1,1] Then
TL_Val1 = (저점[1,1]-저점[2,1])/(저점[1,2]-저점[2,2]) * (Index-저점[2,2])+저점[2,1];
}
If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] Then
{
If 저점[1,2] < 고점[1,2] and 고점[3,1] > 고점[2,1] Then
TL_Val2 = (고점[2,1]-고점[3,1])/(고점[2,2]-고점[3,2]) * (Index-고점[3,2])+고점[3,1];
If 고점[1,2] < 저점[1,2] and 고점[2,1] > 고점[1,1] Then
TL_Val2 = (고점[1,1]-고점[2,1])/(고점[1,2]-고점[2,2]) * (Index-고점[2,2])+고점[2,1];
}
If TL_Val1 > 0 Then Plot1(TL_Val1,"추세선1",BLUE); //점그래프
If TL_Val2 > 0 Then Plot2(TL_Val2,"추세선2",RED); //점그래프
2024-12-16
512
글번호 186321
지표
답변완료
종목 검색식 부탁드립니다
항상 친절하고 자상한 답변에 감사드립니다.
아래 신호수식을 에스트레이더 종목검색식으로 부탁드립니다.
1.
a=Sum(if(H-H(1)>0&&H-H(1)>L(1)-L,1,0),14);
b=Sum(if(L(1)-L>0&&H-H(1)<L(1)-L,1,0),14);
d=eavg(a,5)-eavg(b,5);
d<=-5
2.
기준=Valuewhen(1, CrossUp(시간,091459),C(1));
고점=Max(기준, Dayopen());
최종=
CrossUp(C,고점) &&
C>Predayhigh() &&
Dayhigh() > Predayclose()*1.02&& V>3000
3.
A1=Dayopen() < C and O < C;
A=BarsSince(CrossUp(C, Dayopen()));
B= Countsince(CrossUp(C, Dayopen()),A >1 and A1(1) and A1);
B==1 and A >1 and A1(1) and A1
4.
A1=Predayhigh() < C and O < C;
A=BarsSince(CrossUp(C, Predayhigh()));
B= Countsince(CrossUp(C, Predayhigh()),A >1 and A1(1) and A1);
B==1 and A >1 and A1(1) and A1
5.
A=Shift(C,-25+1);
B=Ma(C,25);
CrossUp(A,B)
6.
M=floor(date/100);
S=Sum(1);
HH=Sum(H);
S1=S-Valuewhen(1, M!=M(1),S(1));
H1=HH-Valuewhen(1,M!=M(1),HH(1));
S2=S-Valuewhen(2,M!=M(1),S(1))-S1;
H2=HH-Valuewhen(2,M!=M(1),HH(1))-H1;
A=H2/S2;
CrossUp(C,A)
7.
B1=if(eavg(C,12)-eavg(C,26) > eavg(eavg(C,12)-eavg(C,26),9), 1,-1);
B2=if(C > avg(C, 20), 1, -1);
B3=if((C - C(12)) / C(12) * 100 > 0, 1, -1);
B4=if(eavg((C-Lowest(L, 5)) / (Highest(H, 5) - Lowest(L, 5)) * 100, 3)>50, 1, -1);
B5=If(CCI(20) > 0,1,-1);
B6=If(C > SAR(0.02,0.2),1,-1);
B7=If((eavg(Sum(((C -L)-(H- C))/ (H-L)*V), 3)-eavg(Sum(((C -L)-(H- C))/(H-L)*V), 10))>0,1,-1);
A=B1+B2+B3+B4+B5+B6+B7;
BB=eavg(A,9);
BB1=(BB-Lowest(BB,20))/(Highest(BB,20)-Lowest(BB,20))*100;
A=LinearRegressionValue(C,50,0);
A1=LinearRegressionValue(A,50,0);
eq= A-A1;
z =A+eq;
Z1=(Z-Lowest(Z,20))/(Highest(Z,20)-Lowest(Z,20))*100;
BB1(1)<=20 && Z1(1)<=20 && (CrossUp(BB1,20) OR CrossUp(Z1,20) OR CrossUp(BB1,Z1))
8.
cnt = Countsince (date==date(1) &&
date ==date(2) &&
date!= date(3), C > Dayopen() &&
C(1) < Dayopen());
S = Countsince(date!=date(1),
C < Dayopen());
cnt==1 && cnt(1)==0 && C >1
9.
A=(H+L+O+C)/4*V/100000000;
B=Sum(A);
D=ValueWhen(1, Date(1) != Date, B(1));
E=B-D;
CrossUp(E,1500)
10.
A=Trix(12);
B=eavg(A,9);
D=CCI(9);
E=MACD(12,26)-eavg(MACD(12,26),9);
G=Stochasticsslow(12,5);
F=eavg(G,3);
CrossUp(A,B)&&
Sum(CrossUp(D(1),200),10) >=1 &&
Sum(CrossUp(E(1),0),10) >=1 &&
Sum(CrossUp(G(1),F(1)),10) >=1
2024-12-16
681
글번호 186318
종목검색
답변완료
추세 3파 전환
Input : af(0.02), maxAF(0.2);
var : T(0),B(0),S(0),tx(0),txx(0),HH(0),LL(0),box(0),B1(0),S1(0),B2(0),S2(0),H1(0),L1(0),H2(0),L2(0),TL(0);
var1 = CSar(af,maxAF);
plot1(var1, "CSAR",IFF(c>var1,Red,Blue));
if CrossUp(C,var1) Then
{
T = 1;
B = var1;
B1 = B[1];
B2 = B1[1];
HH = H;
H1 = HH[1];
H2 = H1[1];
Condition1 = False;
}
if CrossDown(C,var1) Then
{
T = -1;
S = var1;
S1 = S[1];
S2 = S1[1];
LL = L;
L1 = LL[1];
L2 = L1[1];
Condition1 = False;
}
Else
{
if T == 1 Then
{
if H > HH Then
HH = H;
if B1 > 0 and B > B1 and H > H1 and B1 > B2 and H1 > H2 and Condition1 == False Then
{
Condition1 = true;
txx = Text_New(sdate,sTime,HH+0.1,"●");
Text_SetStyle(txx,2,2);
Text_SetColor(txx,Green);
Text_SetSize(txx,20);
}
}
if T == -1 Then
{
if L < LL Then
LL = L;
if S1 > 0 and S < S1 and L < L1 and S1 < S2 and L1 < L2 and Condition1 == False Then
{
Condition1 = true;
txx = Text_New(sdate,sTime,LL-0.1,"●");
Text_SetStyle(txx,2,2);
Text_SetColor(txx,Magenta);
Text_SetSize(txx,20);
}
}
}
수식 중에 동그라미 표시되는 수식이 3파입니다.
동그라미 표시 직후 양전환되거나 음전환되면 세로선. 감사합니다.
2024-12-16
546
글번호 186317
지표