搜索
上市公司价值挖掘方法一年6份股票深度报告加策略MACD招募研究写手选股胜选时 顺大不如顾己
查看: 465|回复: 1

[交流讨论] 在网上下载了指标,不会用,应该不全,请老师们,帮忙整体一下

[复制链接]
发表于 2020-11-7 21:18 | 显示全部楼层

在网上下载了指标,不会用,应该不全,请老师们,帮忙整体一下

来自:MACD论坛(bbs.macd.cn) 作者:li958 浏览:465 回复:1

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
江恩画线法全部原码


画线法10波浪+趋势

{以下语句为新结构波浪}
A1:=REF(HIGH,3)=HHV(HIGH,2*3+1); B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1); D1:=FILTER(C1,3);{高点}
A2:=REF(LOW,3)=LLV(LOW,2*3+1); B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1); D2:=FILTER(C2,3);{低点}
E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2; E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
L1:=(D2 AND NOT(D1 AND E1<E2)); H2:=D1 AND NOT(D2 AND E1>=E2);
X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);{过滤后低点}
L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{过滤后高点}
DRAWLINE(LD,L,HD,H,0),COLORWHITE,LINETHICK1,POINTDOT;
DRAWLINE(HD,H,LD,L,0),COLORWHITE,LINETHICK1,POINTDOT;
J1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HD),BARSLAST(LD))+1); J2:=J1>REF(J1,1);
DRAWLINE(J2,IF(HD,H,L),ISLASTBAR,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),COLORWHITE,LINETHICK1,POINTDOT;
{以上语句为新结构波浪}

A3:=H<REF(H,REF(BARSLAST(HD),1)+1);
B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));
D3:=A3 AND B3 AND HD; E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2); HH:=E3>REF(E3,1);{找出全部长期高点}
A4:=L>REF(L,REF(BARSLAST(LD),1)+1);
B4:=REF(L,REF(BARSLAST(LD),1)+1)<REF(L,REF(BARSLAST(LD),1)+2+REF(BARSLAST(LD),REF(BARSLAST(LD),1)+2));
D4:=A4 AND B4 AND LD; E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2); LL:=E4>REF(E4,1);{找出全部长期低点}
DRAWICON(HH,H,10),ALIGN2; DRAWICON(LL,L,12),ALIGN1;
H3:=HH OR ISLASTBAR OR BARSCOUNT(C)=1; {后面进行过滤,方法同前。只是不用考虑高低点出现在同一K线}
X3:=REF(BARSLAST(H3),1)+1; F3:=BACKSET(H3 AND COUNT(LL,X3)>0,LLVBARS(IF(LL,L,POW(10,20)),X3));
G3:=F3>REF(F3,1);  I3:=BACKSET(G3,2);  LZ:=I3>REF(I3,1),LINETHICK0; {长期低点,也可供引用}
L4:=LZ OR ISLASTBAR OR BARSCOUNT(C)=1;
X4:=REF(BARSLAST(L4),1)+1; F4:=BACKSET(L4 AND COUNT(HH,X4)>0,HHVBARS(IF(HH,H,-POW(10,20)),X4));
G4:=F4>REF(F4,1);  I4:=BACKSET(G4,2);  HZ:=I4>REF(I4,1),LINETHICK0;{长期高点,也可供引用}
DRAWLINE(HZ,H,LZ,L,0),COLORGREEN,LINETHICK1;
DRAWLINE(LZ,L,HZ,H,0),COLORGREEN,LINETHICK1;{长期连线}
K1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HZ),BARSLAST(LZ))+1); K2:=K1>REF(K1,1);
DRAWLINE(K2,IF(HZ,H,L),ISLASTBAR,C,0),COLORGREEN,LINETHICK1; {最后的长期连线,连在收盘价上}

{以下是两条趋势线原码}
UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
DRAWLINE(XX,L,VV,L,1),COLORMAGENTA,LINETHICK1;
UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
DRAWLINE(XX2,H,VV2,H,1),COLORMAGENTA,LINETHICK1;

前一低:REF(L,BARSLAST(VV)),COLOR99FF66,POINTDOT,LINETHICK3;
前二低:REF(L,BARSLAST(XX)),COLORFF66FF,POINTDOT,LINETHICK3;
前一高:REF(H,BARSLAST(VV2)),COLOR99FF66,POINTDOT,LINETHICK3;
前二高:REF(H,BARSLAST(XX2)),COLORFF66FF,POINTDOT,LINETHICK3;
短高:=REF(H,BARSLAST(VV2)),LINETHICK0;
短低:=REF(L,BARSLAST(VV)),LINETHICK0;
短比: (C-短低)/(短高-短低),LINETHICK0;

{以下语句是大盘趋势叠加}
常数:=REF(INDEXC,BARSLAST(VV))/REF(C,BARSLAST(VV));
叠1:INDEXC/常数,COLORGRAY,LINETHICK0;
PARTLINE(1,叠1),COLORGRAY;
常数2:=REF(INDEXC,BARSLAST(XX))/REF(C,BARSLAST(XX));
叠2:INDEXC/常数2,COLORGRAY,LINETHICK0;
PARTLINE(1,叠2),COLORGRAY;

DRAWNUMBER(HD,1.02*H,DATEDIFF(REF(DATE,BARSLAST(LD)),DATE),0),COLORCYAN;
DRAWNUMBER(LD,0.98*L,DATEDIFF(REF(DATE,BARSLAST(HD)),DATE),0),COLORCYAN;

DRAWNUMBER(HD,H*(1+0.002),H,2),COLORBLUE,ALIGN0;
DRAWNUMBER(LD,L*(1.001-0.002),L,2),COLORBLUE,ALIGN0;
画线法11波浪结构


input:n(20),n1(7),n2(69);

A1:=REF(HIGH,3)=HHV(HIGH,2*3+1); B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1); D1:=FILTER(C1,3);{高点}
A2:=REF(LOW,3)=LLV(LOW,2*3+1); B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1); D2:=FILTER(C2,3);{低点}
E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2; E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
H2:=D1 AND NOT(D2 AND E1>=E2);
L1:=D2 AND NOT(D1 AND E1=E2);
X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,1000000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);{过滤后低点}
L2:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{过滤后高点}
DRAWLINE(LD,L,HD,H,0),COLORWHITE,LINETHICK1,POINTDOT;
DRAWLINE(HD,H,LD,L,0),COLORWHITE,LINETHICK1,POINTDOT;
J1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HD),BARSLAST(LD))+1); J2:=J1>REF(J1,1);
DRAWLINE(J2,IF(HD,H,L),BARSTATUS=2,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),COLORWHITE,LINETHICK1,POINTDOT;
A3:=H; B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));
D3:=A3 AND B3 AND HD; E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2); HH:=E3>REF(E3,1);{找出全部长期高点}
A4:=L>REF(L,REF(BARSLAST(LD),1)+1);
B4:=REF(L,REF(BARSLAST(LD),1)+1); D4:=A4 AND B4 AND LD; E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2); LL:=E4>REF(E4,1);{找出全部长期低点}
DRAWICON(HH,H,5),ALIGN1;      DRAWICON(LL,L,4),ALIGN1;
H3:=HH OR BARSTATUS=2 OR BARSCOUNT(C)=1; {后面进行过滤,方法同前。只是不用考虑高低点出现在同一K线}
X3:=REF(BARSLAST(H3),1)+1; F3:=BACKSET(H3 AND COUNT(LL,X3)>0,LLVBARS(IF(LL,L,POW(10,20)),X3));
G3:=F3>REF(F3,1);  I3:=BACKSET(G3,2);  LZ:=I3>REF(I3,1); {长期低点,也可供引用}
L4:=LZ OR BARSTATUS=2 OR BARSCOUNT(C)=1;
X4:=REF(BARSLAST(L4),1)+1; F4:=BACKSET(L4 AND COUNT(HH,X4)>0,HHVBARS(IF(HH,H,-POW(10,20)),X4));
G4:=F4>REF(F4,1);  I4:=BACKSET(G4,2);  HZ:=I4>REF(I4,1);{长期高点,也可供引用}
DRAWLINE(HZ,H,LZ,L,0),COLORGREEN,LINETHICK1;
DRAWLINE(LZ,L,HZ,H,0),COLORGREEN,LINETHICK1;{长期连线}
K1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HZ),BARSLAST(LZ))+1); K2:=K1>REF(K1,1);
DRAWLINE(K2,IF(HZ,H,L),BARSTATUS=2,C,0),COLORGREEN,LINETHICK1; {最后的长期连线,连在收盘价上}
UU:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
DRAWLINE(XX,L,VV,L,1),COLORMAGENTA,LINETHICK1;
UU2:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
DRAWLINE(XX2,H,VV2,H,1),COLORMAGENTA,LINETHICK1;
前一低:REF(L,BARSLAST(VV)),COLOR99FF66,POINTDOT,LINETHICK3;
前二低:REF(L,BARSLAST(XX)),COLORFF66FF,POINTDOT,LINETHICK3;
前一高:REF(H,BARSLAST(VV2)),COLOR99FF66,POINTDOT,LINETHICK3;
前二高:REF(H,BARSLAST(XX2)),COLORFF66FF,POINTDOT,LINETHICK3;
短高:=REF(H,BARSLAST(VV2));
短低:=REF(L,BARSLAST(VV));
短比: (C-短低)/(短高-短低),LINETHICK0;
常数:=REF(INDEXC,BARSLAST(VV))/REF(C,BARSLAST(VV));
叠1:INDEXC/常数,COLORGRAY,LINETHICK0;
PARTLINE(叠1,1),COLORGRAY;
常数2:=REF(INDEXC,BARSLAST(XX))/REF(C,BARSLAST(XX));
叠2:INDEXC/常数2,COLORGRAY,LINETHICK0;
PARTLINE(叠2,1),COLORGRAY;
{
s:=NUMTOSTRN(DAYS1970-DATETOD1970(REF( DATE,BARSLAST(LD) ) ),0 );
s1:=NUMTOSTRN(DAYS1970-DATETOD1970(REF( DATE,BARSLAST(HD) ) ),0 );
s2:=NUMTOSTRN(H,2 );
s3:=NUMTOSTRN(L,2 );
DRAWTEXT(HD,1.02*H,s),COLORCYAN;
DRAWTEXT(LD,0.98*L,s1),COLORCYAN;
DRAWTEXT(HD,H*(1+0.002),s2),COLORBLUE,ALIGN0;
DRAWTEXT(LD,L*(1.001-0.002),s3),COLORBLUE,ALIGN0;}

{以下语句为三角形部分}

底:REF(L,BARSLAST(VV)),COLORred,LINETHICK2;
顶:REF(H,BARSLAST(VV2)),COLORGreen,LINETHICK2;

{下迭三角形:藍色三角形畫完介入}
StickLine(VV,顶,底,0,0),Colorff6633,linethick3;{}
DRAWLINE(VV2,H,VV,L,0),Colorff6633,linethick3;{斜}
DRAWLINE(VV2,H,VV,顶,0),Colorff6633,linethick3;{?}

{DRAWLINE(c>0,H,VV,L,0),Colorcyan,linethick2;}{斜}
{DRAWLINE(c>1,H,VV,顶,0),Colorcyan,linethick2;}{?}
{上漲三角形:紅色三角形畫完出局}
StickLine(VV2 ,顶,底,0,0),Colorred,linethick3;{}
DRAWLINE(VV,L,VV2,H,0),Colorred,linethick3;{斜}
DRAWLINE(VV,L,VV2,底,0),Colorred,linethick3;{?};
前高:SYSPARAM(6),colorwhite;
M3: EMA(CLOSE,3);
M8: EMA(CLOSE,8),  COLORGREEN;
M13: EMA(M8,13),  COLORRED;
M62: EMA(M8,62),  COLORCYAN;
Var1:=EMA(M13,62);
M81: EMA(M62,81),  COLORYELLOW;
M144: EMA(Var1,144),LINETHICK2 , COLORRED;
M250: EMA(Var1,250),LINETHICK2 , COLORMAGENTA;
Var2:=(CLOSE+HIGH+LOW)/3;
Var3:=EMA(Var2,10);
Var4:=REF(Var3,1);
STICKLINE(Var3>Var4,Var3,Var4,15,0),  COLORYELLOW;
STICKLINE(Var3< Var4,Var3,Var4,20,0),  COLOR00ff00;
Var5:=(REF(HIGH,1)+REF(LOW,1))/2;
Var6:=MA(CLOSE,N)+2*STD(CLOSE,N);
DRAWICON(CROSS(Var5,Var6),HIGH*1.035,1);
DRAWTEXT(CROSS(Var5,Var6),HIGH*1.04,'卖出'),  COLORGREEN;
Var7:=REF(CLOSE,1);
Var8:=SMA(MAX(CLOSE-Var7,0),N1,1)/SMA(ABS(CLOSE-Var7),N1,1)*100;
Var9:=CROSS(N2,Var8);
VarA:=FILTER(Var9,4);
DRAWICON(VarA,HIGH*1.035,1);
DRAWTEXT(VarA,HIGH*1.04,'卖出'),  COLORWHITE;
VarB:=(2*CLOSE+HIGH+LOW)/4;
VarC:=LLV(LOW,34);
VarD:=HHV(HIGH,34);
VarE:=EMA((VarB-Var1)/(Var5-Var1)*100,7);
VarF:=EMA(0.667*REF(VarE,1)+0.333*VarE,5);
DRAWTEXT(IF(COUNT(CLOSE< REF(CLOSE,1),8)/8>0.6 AND VOL>=1.5*MA(VOL,5) AND COUNT(VarE>=VarF,3) AND REF(LOW,1)<=LLV(LOW,120),1,0),LOW,'●买进'),  colorred;
DRAWTEXT(IF(COUNT(CLOSE< REF(CLOSE,1),13)/13>0.6 AND COUNT(VarE>VarF,6) AND REF(LOW,5)=LLV(LOW,120) AND REF(CLOSE>=OPEN,4) AND REF(CLOSE>OPEN,3) AND REF(CLOSE>OPEN,2) AND REF(OPEN>CLOSE,1) AND OPEN>REF(CLOSE,1),1,0),LOW,'●买进'),  COLORYELLOW;
Var10:=MA(CLOSE,80)-MA(CLOSE,10)/3;
DRAWTEXT(IF(CLOSE< Var10 AND VOL/240>MA(VOL,5)/240 AND CLOSE>REF(CLOSE,1)*1.08 AND CLOSE< MA(CLOSE,13)*1.3,1,0),LOW,'●抄底'),  COLORRED;

画线法12大鲨鱼形态-画线预警


SFF:=H/REF(H,1)<1 AND REF(h,1)/REF(h,2)<1  AND L/REF(L,1)>1 and REF(L,1)/REF(L,2)>1 ;
STICKLINE(BACKSET(SFF,3),C,O,7,1),COLORYELLOW;
DRAWTEXT(SFF,L*0.97,'大鲨鱼'),COLORYELLOW;
w:=barslast(FILTER(BACKSET(SFF,3),3));
预警:cross(c,ref(h,w))LINETHICK0;
DRAWLINE(FILTER(BACKSET(SFF,3),3),h,cross(c,ref(h,w)),ref(h,w),0);


//顶底画线
DRAWLINE(l=sysparam(5),l,barpos=SYSPARAM(3)-1,l,1),Colorgreen;
DRAWLINE(h=sysparam(4),h,barpos=SYSPARAM(3)-1,h,1),Coloryellow;

x:=ma(c,5);
n1:=sysparam(3);
n:=n1-sysparam(2)+1;
hh:=hhv(x,n);
ll:=llv(x,n);
tsh:=hhvbars(x,n);
tsl:=llvbars(x,n);
最高:hh[n1],POINTDOT;
最低:ll[n1],POINTDOT;
drawicon(barpos=n1-tsh[n1],l,5);
drawicon(barpos=n1-tsl[n1],l,4);
drawtext(barpos=n1-tsh[n1],h*1.02,'大顶')colorred;
drawtext(barpos=n1
画线法4奇妙撑压


INPUT:N(13,1,100),P(3,1,10),Q(3,1,35);
X1:=REF(C,1);
X2:=SMA(MAX(C-X1,0),N,1)/SMA(ABS(C-X1),N,1)*100;
X3:=((3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*SMA(SMA((C-LLV
(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1)-50)*1.032+50);
X4:=(X2+X3)/2;
奇妙线:C+(X4/50-1)*(MA(C,30)/20)*P,COLORFFEEBB;

AA1:=EMA(C,2);          { 短指数平滑移动平均线 }
BB1:=EMA(AA1,2);        { 平滑 }
A:=MA(BB1,3);           { 平均 }
AA2:=EMA((H+C+O)/3,18); { 长指数平滑移动平均线 }
DD3:=A>=AA2 AND C>AA2;  { 短>长,且收>长 }
DD4:=A<AA2 ;   { 短<长 }
DD5:=A>AA2 ;   { 短>长 }
STICKLINE((DD4 OR DD5)AND O<=C,C,O,6,0),COLORFF88CC;      {跌势阳线}
STICKLINE((DD4 OR DD5)AND O<=C,H,L,0.5,0),COLORFF88CC;    {跌势阳线}
STICKLINE((DD4 OR DD5)AND O>=C,C,O,6,0),COLORCYAN;        {跌势阴线}
STICKLINE((DD4 OR DD5)AND O>=C,H,L,0.5,0),COLORCYAN;      {跌势阴线}
STICKLINE((DD3 OR C>AA2)AND O<=C,C,O,6,0),COLORRED;       {涨势阳线}
STICKLINE((DD3 OR C>AA2)AND O<=C,H,L,0.5,0),COLORRED;     {涨势阳线}
STICKLINE((DD3 OR C>AA2)AND O>=C,C,O,6,0),COLOR00CC99;    {涨势阴线}
STICKLINE((DD3 OR C>AA2)AND O>=C,H,L,0.5,0),COLOR00CC99;  {涨势阴线};
RSV1:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
KK:=SMA(RSV1,3,1);
DD:=SMA(KK,3,1);
JJ:=3*KK-2*DD;
M:=BARSLAST(CROSS(DD,JJ));
警示线:REF(H,M),POINTDOT,COLORYELLOW;{进场; 止赢; 止损; 黄}
STICKLINE(警示线,警示线,警示线,3.8,1),COLORYELLOW;

A1:=BACKSET(REF(H,2)=HHV(H,5),3);
A2:=BACKSET(REF(L,2)=LLV(L,5),3);
A3:=CROSS(A1,0.9);
A4:=CROSS(A2,0.9);
上沿:REF(H,BARSLAST(A3)),POINTDOT,COLORFF8918;
STICKLINE(C,REF(H,BARSLAST(A3)),REF(H,BARSLAST(A3)),5,1),COLORFF8918;
下沿:REF(L,BARSLAST(A4)),POINTDOT,COLORMAGENTA;
STICKLINE(C,REF(L,BARSLAST(A4)),REF(L,BARSLAST(A4)),5,1),COLORMAGENTA

画线法45画线趋势


{--画线趋势---------------------------------------------------------}

N:=p1;{原码 N:=3;}
A1:=向前引用(最高价,N)=最高值(最高价,2*N+1); B1:=信号过滤(A1,N); C1:=向前赋值(B1,N+1);

D1:=信号过滤(C1,N);{高点}
A2:=向前引用(最低价,N)=最低值(最低价,2*N+1); B2:=信号过滤(A2,N); C2:=向前赋值(B2,N+1);

D2:=信号过滤(C2,N);{低点}
E1:=(向前引用(最低值(最低价,2*N),1)+向前引用(最高值(最高价,2*N),1))/2; E2:=(最高价+最低价)/2;{高低点出现

在同一K线上时可作取舍}
H1:=(D1 AND 求逻辑非(D2 AND E1>=E2)) OR 是否最后周期 OR 有效值周期数(收盘价)=1;
L1:=(D2 AND 求逻辑非(D1 AND E1<E2));  H2:=D1 AND 求逻辑非(D2 AND E1>=E2);
X1:=向前引用(上一次条件成立位置(H1),1)+1; F1:=向前赋值(H1 AND 统计总数(L1,X1)>0,上一低点位置

(条件函数(L1,最低价,10000),X1));
G1:=F1>向前引用(F1,1); I1:=向前赋值(G1,2); LD:=I1>向前引用(I1,1),LINETHICK0;{过

滤后低点}
L2:=LD OR 是否最后周期 OR 有效值周期数(收盘价)=1;
X2:=向前引用(上一次条件成立位置(L2),1)+1; F2:=向前赋值(L2 AND 统计总数(H2,X2)>0,上一高点位置

(条件函数(H2,最高价,0),X2));
G2:=F2>向前引用(F2,1); I2:=向前赋值(G2,2); HD:=I2>向前引用(I2,1),LINETHICK0;{过

滤后高点}

///HD:="jgb.HD"(N);LD:="jgb.LD"(N);
R1:=向前赋值(是否最后周期,上一次条件成立位置(HD)+1); S1:=R1>向前引用(R1,1); {前一高}
T1:=向前赋值(是否最后周期,上一次条件成立位置(LD)+1); U1:=T1>向前引用(T1,1); {前一低}
R2:=向前赋值(S1,向前引用(上一次条件成立位置(HD),1)+2); S2:=R2>向前引用(R2,1); {前二高}
T2:=向前赋值(U1,向前引用(上一次条件成立位置(LD),1)+2); U2:=T2>向前引用(T2,1); {前二低}
T3:=向前赋值(U2,向前引用(上一次条件成立位置(LD),1)+2); U3:=T3>向前引用(T3,1); {前三低}
T4:=向前赋值(U3,向前引用(上一次条件成立位置(LD),1)+2); U4:=T4>向前引用(T4,1); {前四低}
R3:=向前赋值(S2,向前引用(上一次条件成立位置(HD),1)+2); S3:=R3>向前引用(R3,1); {前三高}
R4:=向前赋值(S3,向前引用(上一次条件成立位置(HD),1)+2); S4:=R4>向前引用(R4,1); {前四高}

★压力1:画直线(S2,最高价,S1,最高价,1),Color80FFFF,linethick2;         
★支撑1:画直线(U2,最低价,U1,最低价,1),点状线,Color00FFFF,linethick2;
★压力2:画直线(S3,最高价,S2,最高价,1),ColorFF8000,linethick2;
★支撑2:画直线(U3,最低价,U2,最低价,1),点状线,ColorFF8000,linethick2;         
★压力3:画直线(S4,最高价,S3,最高价,1),Color0000FF,linethick2;
★支撑3:画直线(U4,最低价,U3,最低价,1)点状线,Color0000FF,linethick2;

画图标(S2,最高价*1.01,10); 画图标(S3,最高价*1.01,10);
显示数字(S2,最高价*1.02,最高价,2),COLORMAGENTA;
显示数字(S1,最高价*1.02,最高价,2),COLORMAGENTA;
显示数字(S3,最高价*1.02,最高价,2),COLORMAGENTA;


画图标(U1,最低价*0.99,11); 画图标(U2,最低价*0.99,11);
画图标(U3,最低价*0.99,11);画图标(U4,最低价*0.99,11);
显示数字(U1,最低价*0.98,最低价,2),COLORCYAN;
显示数字(U2,最低价*0.98,最低价,2),COLORCYAN;
显示数字(U3,最低价*0.98,最低价,2),COLORCYAN;
显示数字(U4,最低价*0.98,最低价,2),COLORCYAN;

画线法40上升(下降)通道自动划


hh:=hhv(h,0);
hhh:=h;
aa:=BARSLAST(h=hh[datacount]);
ba:=datacount-aa;
ja:=1;
tm1:=999999;
for i1=ba[datacount]+1 to datacount do begin
  k1:=(hh[datacount]-hhh[i1])/ja;
if k1<tm1 then begin
  tm1:=k1;
  ts1:=ja;
end;
ja:=ja+1;
end;
A1:LINEVALUE(h=hh[datacount] and aa=0,h,BARPOS=datacount-aa[datacount]+ts1,h,0,0),colorffff54;
cha:=hhv(abs(l-a1),aa);
A2:a1-cha[datacount],colorffff54;
AI:a1-cha[datacount]/2,colorffff54,LINEDASH;

ll:=llv(l,0);
lll:=l;
a3:=BARSLAST(l=ll[datacount]);
b3:=datacount-a3;
j3:=1;
tm3:=999999;
for i3=b3[datacount]+1 to datacount do begin
  k3:=(lll[i3]-ll[datacount])/j3;
if k3<tm3 then begin
  tm3:=k3;
  ts3:=j3;
end;
j3:=j3+1;
end;
B1:LINEVALUE(l=ll[datacount] and a3=0,l,BARPOS=datacount-a3[datacount]+ts3,l,0,0),color5454ff;
chb:=hhv(abs(h-b1),a3);
b2:b1+chb[datacount],color5454ff;
bi:b1+chb[datacount]/2,color5454ff,LINEDASH;

金币:
奖励:
热心:
注册时间:
2007-1-10

回复 使用道具 举报

签到天数: 1 天

发表于 2020-11-7 22:07 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
金币:
奖励:
热心:
注册时间:
2019-2-15

回复 使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

本站声明:1、本站所有广告均与MACD无关;2、MACD仅提供交流平台,网友发布信息非MACD观点与意思表达,因网友发布的信息造成任何后果,均与MACD无关。
MACD金融网(1997-2019)官方域名:macd.cn   MACD金融网校(2006-2019)官方域名:macdwx.com
值班热线[9:00—17:30]:18292674919   24小时网站应急电话:18292674919
找回密码、投诉QQ:89918815 友情链接QQ:95008905 广告商务联系QQ:17017506 电话:18292674919
增值电信业务经营许可证: 陕ICP19026207号—2  陕ICP备20004035号

举报|意见反馈|Archiver|手机版|MACD俱乐部 ( 陕ICP备20004035号 )

GMT+8, 2020-11-27 00:13 , Processed in 0.157268 second(s), 7 queries , Redis On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表