主图手动画线指标源码_主图趋势线指标源码

hacker|
209

文章目录:

通达信主图指标源码,求老师看有没有未来,并帮改成选股和预警公式,谢谢

(1)无未来函数

(2)选股公式如下(买入):

VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));

VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));

VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));

DIR1:=ABS(CLOSE-REF(CLOSE,5));

VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);

ER1:=DIR1/VIR1;

CS1:=ER1*(0.8-2/8)+2/8;

CQ1:=CS1*CS1;

DIR2:=ABS(CLOSE-REF(CLOSE,10));

VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);

ER2:=DIR2/VIR2;

CS2:=ER2*(0.8-2/24)+2/24;

CQ2:=CS2*CS2;

CROSS(VAR2,MA(VAR3,6));

求通达信缠论精确笔主图画线公式

{精确缠论中枢公式}

 

{N1:1,100,10;N2:1,100,10;DISP:=1,3,2};

n1:=10;

n2:=10;

DISP:=2;

N1:=10;N2:=10;DISP:=2;

K:=IF(PERIOD=5,1,{日}

IF(PERIOD=6,1,{周}

IF(PERIOD=7,1,{月}

IF(PERIOD=8,1,{多分钟}

IF(PERIOD=9,1,{多日}

IF(PERIOD=10,1,{季}

IF(PERIOD=11,2,{年}

IF(PERIOD=4,1,{60F}

IF(PERIOD=3,1,{30F}

IF(PERIOD=2,1,{15F}

IF(PERIOD=1,1{5F},1{1F})))))))))))/10;

P1:=PEAK(1,K*N1,1);

P2:=PEAK(1,K*N1,2);

WP1:=PEAKBARS(1,K*N1,1);

WP2:=PEAKBARS(1,K*N1,2);

T1:=TROUGH(2,K*N2,1);

T2:=TROUGH(2,K*N2,2);

WT1:=TROUGHBARS(2,K*N2,1);

WT2:=TROUGHBARS(2,K*N2,2);

TJ1:=P1T1 AND P2T2 ;

ZD:=MAX(T1,T2);

ZG:=MIN(P1,P2);

LL:=MIN(T1,T2);

HH:=MAX(P1,P2);

TJ2:=FILTER(ZGZD,2);

TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));

TJ4:=TJ1TJ2NOT(TJ3);

TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));

TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));

TJ7:=ZGREF(ZG,REF(BARSLAST(TJ4),1))ZDREF(ZD,REF(BARSLAST(TJ4),1));

TJ8:=TJ4NOT(TJ5 OR TJ6 OR TJ7);

ZSD:=IF(TJ8,ZD,DRAWNULL);

ZSG:=IF(TJ8,ZG,DRAWNULL);

ZSH:=IF(TJ8,HH,DRAWNULL);

ZSL:=IF(TJ8,LL,DRAWNULL);

STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;

STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;

DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;

中枢高:PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COLORLIRED;

中枢低:PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COLORLIGREEN;

{中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;

中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;}

趋势高:PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;

趋势低:PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;

局部低点预选A:=BACKSET(LLV(L,5)REF(LLV(L,4),1),4);

局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);

局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);

局部高点预选A:=BACKSET(HHV(H,5)REF(HHV(H,4),1),4);

局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);

局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);

缺口判断:=IF(LREF(H,1),1,IF(HREF(L,1),-1,0));

距前高天:=BARSLAST(局部高点预选C=1);

距前低天:=BARSLAST(局部低点预选C=-1);

小值周期:=LOWRANGE(L);

大值周期:=TOPRANGE(H);

低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)REF(距前低天,1) AND LLV(L,距前高天+1)REF(LLV(L,距前高天+1),1),-1,0);

低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)=REF(距前低天,1) AND (距前高天=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)REF(LLV(L,距前低天+1),1)),-1,0);

低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND LREF(H,距前高天+1),-1,0);

预判:=IF((距前低天4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);

判断:=IF(局部高点预选C=1 AND REF(距前低天,1)=REF(距前高天,1) AND 预判=1 AND 大值周期REF(小值周期,距前低天+1) AND 大值周期REF(小值周期,距前低天) AND 大值周期REF(大值周期,距前高天),1,0);

高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)REF(距前高天,1) AND HHV(H,距前低天+1)REF(HHV(H,距前低天+1),1),1,0);

高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天=4 OR HHV(缺口判断,距前低天)=1),1,0);

高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND HREF(L,距前低天+1),1,0);

预判A:=IF((距前高天4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);

判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)=REF(距前低天,1) AND 预判A=1 AND 小值周期REF(大值周期,距前高天+1) AND 小值周期REF(大值周期,距前高天) AND 小值周期REF(小值周期,距前低天),-1,0);

低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)REF(距前低天,1) AND LLV(L,距前高天+1)REF(LLV(L,距前高天+1),1),-1,0);

低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)=REF(距前低天,1) AND (距前高天=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);

低保留:=IF((低保留A=-1 OR 低保留B=-1) AND LREF(H,距前高天+1),-1,0);

距前高天A:=BARSLAST(高保留=1);

距前低天A:=BARSLAST(低保留=-1);

预判X:=IF((距前低天A4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);

判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)=REF(距前高天A,1) AND 预判X=1 AND 大值周期REF(小值周期,距前低天A+1) AND 大值周期REF(小值周期,距前低天A) AND 大值周期REF(大值周期,距前高天A),1,0);

高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)REF(距前高天A,1) AND HHV(H,距前低天A+1)REF(HHV(H,距前低天A+1),1),1,0);

高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A=4 OR HHV(缺口判断,距前低天A)=1),1,0);

高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND HREF(L,距前低天A+1),1,0);

预判XA:=IF((距前高天A4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);

判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)=REF(距前低天A,1) AND 预判XA=1 AND 小值周期REF(大值周期,距前高天A+1) AND 小值周期REF(大值周期,距前高天A) AND 小值周期REF(小值周期,距前低天A),-1,0);

低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)REF(距前低天A,1) AND LLV(L,距前高天A+1)REF(LLV(L,距前高天A+1),1),-1,0);

低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)=REF(距前低天A,1) AND (距前高天A=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);

低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND LREF(H,距前高天A+1),-1,0);

距前高天YA:=BARSLAST(高保留X=1);

距前低天YA:=BARSLAST(低保留X=-1);

预判YX:=IF((距前低天YA4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);

判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期REF(小值周期,距前低天YA+1) AND 大值周期REF(小值周期,距前低天YA) AND 大值周期REF(大值周期,距前高天YA),1,0);

高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)REF(距前高天YA,1) AND HHV(H,距前低天YA+1)REF(HHV(H,距前低天YA+1),1),1,0);

高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA=4 OR HHV(缺口判断,距前低天YA)=1),1,0);

高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND HREF(L,距前低天YA+1),1,0);

预判YXA:=IF((距前高天YA4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);

判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期REF(大值周期,距前高天YA+1) AND 小值周期REF(大值周期,距前高天YA) AND 小值周期REF(小值周期,距前低天YA),-1,0);

低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)REF(距前低天YA,1) AND LLV(L,距前高天YA+1)REF(LLV(L,距前高天YA+1),1),-1,0);

低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)=REF(距前低天YA,1) AND (距前高天YA=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);

低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND LREF(H,距前高天YA+1),-1,0);

AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND HREF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND LREF(L,REF(距前低天YA,1)+2),-1,0));

极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);

局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;

DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED;

DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORYELLOW;

DD1:=BARSLAST(ABS(极点保留)!=1);{

DRAWTEXT(极点保留=1,局部极点,'卖'),COLORGREEN;

DRAWTEXT(极点保留=-1,局部极点,'买'),COLORRED;}

MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2;判:IF(MA5REF(MA5,1),MA5,DRAWNULL),COLORWHITE,LINETHICK2;

【求】股票自划线指标主图(请注明什么软件使用的)

通达信软件自划线指标主图源码(不需要参数):

HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0;

AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);

QY:=BACKSET(AA,HIGHN+1);

CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);

DRAWICON(CC,H*1.02,2);

DDD:=BARSLAST(CC);

GDTS:=IF(CC,CURRBARSCOUNT,0);

DINGBU:=IF(DDD,REF(H,DDD),H);

DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);

DINGBU1:=REF(DINGBU,DDD+1);

GDCS1:=CONST(DINGBUTS);

DINGBUTS1:=REF(DINGBUTS,DDD+1);

GDCS2:=CONST(DINGBUTS1);

DINGBU2:=REF(DINGBU1,DDD+1);

MM:=IF(CURRBARSCOUNTGDCS2,0,1);

高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORGREEN,LINETHICK2;

DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF,POINTDOT;

DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT;

AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);

QY1:=BACKSET(AA1,LOWN+1);

CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);

DRAWICON(CC1,L*0.98,1);

DD1:=BARSLAST(CC1);

DDTS:=IF(CC1,CURRBARSCOUNT,0);

YDB:=IF(DD1,REF(L,DD1),L);

DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);

DDCS1:=CONST(DDTS1);

ZDB:=REF(YDB,DD1+1);

DDTS2:=REF(DDTS1,DD1+1);

DDCS2:=CONST(DDTS2);

低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED,LINETHICK2;

ZGSTAR:=(高点压力+低点支撑)/2;

ZGEND:=CONST((高点压力+低点支撑)/2);

STARDAY:=IF(DDCS2GDCS2,DDCS2,GDCS2);

中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORFF55BB,LINETHICK2;

DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORMAGENTA,POINTDOT,;

DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORCYAN,POINTDOT;

大智慧新一代(L2)软件自划线指标主图源码(参数:N(5,1,100):

A1:=ref(h,N)=hhv(h,2*N+1);

B1:=filter(A1,N);

C1:=backset(B1,N+1);

D1:=filter(C1,n);

A2:=ref(l,N)=llv(l,2*N+1);

B2:=filter(A2,N);

C2:=backset(B2,N+1);

D2:=filter(C2,N);

E1:=(ref(llv(l,2*N),1)+ref(hhv(h,2*N),1))/2; E2:=(h+l)/2;

H1:=(D1 AND not(D2 AND E1=E2)) OR barstatus=2 OR barscount(c)=1;

L1:=(D2 AND not(D1 AND E1E2));

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,l,10000),X1));

G1:=F1ref(F1,1);

I1:=backset(G1,2); LD:=I1ref(I1,1);

L2:=LD OR barstatus=2 OR barscount(c)=1;

X2:=ref(barslast(L2),1)+1; F2:=backset(L2 AND count(H2,X2)0,hhvbars

(if(H2,h,0),X2));

G2:=F2ref(F2,1); I2:=backset(G2,2); HD:=I2ref(I2,1);

R1:=backset(barstatus=2,barslast(HD)+1); S1:=R1ref(R1,1);

T1:=backset(barstatus=2,barslast(LD)+1); U1:=T1ref(T1,1);

R2:=backset(S1,ref(barslast(HD),1)+2); S2:=R2ref(R2,1);

T2:=backset(U1,ref(barslast(LD),1)+2); U2:=T2ref(T2,1);

T3:=backset(U2,ref(barslast(LD),1)+2); U3:=T3ref(T3,1);

T4:=backset(U3,ref(barslast(LD),1)+2); U4:=T4ref(T4,1);

R3:=backset(S2,ref(barslast(HD),1)+2); S3:=R3ref(R3,1);

R4:=backset(S3,ref(barslast(HD),1)+2); S4:=R4ref(R4,1);

短期压力:drawline(S2,h,S1,h,1),Colorred;

短期支撑:drawline(U2,l,U1,l,1),Colorgreen;

中期压力:drawline(S3,h,S2,h,1),Coloryellow;

中期支撑:drawline(U3,l,U2,l,0),Colorgreen;

长期压力:drawline(S4,h,S3,h,1),COLORwhite;

长期支撑:drawline(U4,l,U3,l,0),Colorgreen;

DRAWICON(S1,H*1.01,10);

DRAWICON(S2,H*1.01,10);

DRAWICON(S3,H*1.01,10);

DRAWICON(S4,H*1.01,10);

DRAWICON(U1,L*0.99,9);

DRAWICON(U2,L*0.99,9);

DRAWICON(U3,L*0.99,9);

DRAWICON(U4,L*0.99,9);

上面两个指标都是有未来程序的,用的时候要注意,信号不完全可信!,切记切记!

通达信或者大智慧怎么将源码添加到主图指标里,

通达信:功能---专家系统---公式管理器---用户(选取一个节点如:其他类型)---新建:给公式起名称,粘贴公式至编辑栏中,选取“画线方法/主图叠加”,测试通过后,点击确认即可。

注意:不是所有的公式都可以作为主图叠加的。

大智慧的方法与通达信类同,你自己琢磨一下。

5条大神的评论

  • avatar
    访客 2022-07-01 下午 06:44:56

    么将源码添加到主图指标里,通达信:功能---专家系统---公式管理器---用户(选取一个节点如:其他类型)---新建:给公式起名称,粘贴公式至编辑栏中,选取“画线方法/主图

  • avatar
    访客 2022-07-01 下午 12:07:02

    :=R1ref(R1,1);T1:=backset(barstatus=2,barslast(LD)+1); U1:=T1ref(T1,1);R2:=backset(S1,ref(barslast(HD),1)+2); S2:=R2ref(R2,1);T2:=backset(U1,r

  • avatar
    访客 2022-07-01 上午 09:16:19

    ) AND HHV(H,距前低天YA+1)REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)=REF(距前高天YA,1) AND REF(低保留X,

  • avatar
    访客 2022-07-01 下午 02:39:34

    F1,1);I1:=backset(G1,2); LD:=I1ref(I1,1);L2:=LD OR barstatus=2 OR barscount(c)=1;X2:=ref(barslast(L2),1)+1; F2:=backset(L2 AND count(H2,X2)0

  • avatar
    访客 2022-07-01 下午 12:41:28

    RED;}MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2;判:IF(MA5REF(MA5,1),MA5,DRAWNULL),COLORWHITE,LINETHICK2;【

发表评论