无忧主图 无忧副图 无忧选股(通达信公式 源码 测试图)

 2023-04-25 17:15:54    通达信指标网  

无忧主图}
DRAWBAND(MA(C,5),RGB(255,50,100),MA(C,10),RGB(10,200,10));
DRAWKLINE(H,O,L,C);
VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);
H_L:=0.1*CONST(HHV(VOL,240));
T1:=STRCAT(HYBLOCK,' ');
T2:=STRCAT(T1,DYBLOCK);
T3:=STRCAT(T2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(T3,GNBLOCK)),COLOR00C0C0;
A1:=REF(H,5)=HHV(H,2*5+1);
B1:=FILTER(A1,5);
C1:=BACKSET(B1,5+1);
D1:=FILTER(C1,5);
A2:=REF(L,5)=LLV(L,2*5+1);
B2:=FILTER(A2,5);
C2:=BACKSET(B2,5+1);
D2:=FILTER(C2,5);
E1:=(REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2;
E2:=(H+L)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=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,L,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR ISLASTBAR 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:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
S1:=R1>REF(R1,1);
Q1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
U1:=Q1>REF(Q1,1);
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);
S2:=R2>REF(R2,1);
Q2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);
U2:=Q2>REF(Q2,1);
NOTEXT1:DRAWLINE(S2,H,S1,H,1),LINETHICK2,COLORMAGENTA;
NOTEXT2:DRAWLINE(U2,L,U1,L,1),LINETHICK2,COLORYELLOW;
STICKLINE(C>O,C,O,3,0),COLOR0000AA;
STICKLINE(C>O,C,O,2.5,0),COLOR0000BB;
STICKLINE(C>O,C,O,1.5,0),COLOR0000CC;
STICKLINE(C>O,C,O,1,0),COLOR0000EE;
STICKLINE(C>O,H,L,0,0),COLOR0000FF;
STICKLINE(C<O,C,O,3,0),COLOR7B7B00;
STICKLINE(C<O,C,O,2.5,0),COLOR909000;
STICKLINE(C<O,C,O,1.5,0),COLORA8A800;
STICKLINE(C<O,C,O,1,0),COLORCECE00;
STICKLINE(C<O,H,L,0,0),COLORFFFF00;
STICKLINE(C=O,C,O,3,0),COLORWHITE;
STICKLINE(C=O,H,L,0,0),COLORWHITE;
MA5:MA(C,5),COLORWHITE,LINETHICK3;
MA10:MA(C,10),COLORYELLOW;
MA20:MA(C,20),COLORMAGENTA;
MA30:MA(C,30),COLORLIRED;
MA60:MA(C,60),COLORGREEN;
MA250:MA(C,250),COLORBLUE;
VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
DRAWICON(VAR19,REF(CLOSE,1)*0.99,1);
显示仪表盘1:=1;
总涨幅周期:=350;
范围高A:=REFDATE(HHV(H,120),DATE)*1.05;
范围低A:=REFDATE(LLV(L,120),DATE)*0.95;
MA24:=MA(C,24),COLORGREEN,LINETHICK2;
MA72:=MA(C,72),COLORRED,LINETHICK2;
MA200:=IF((MA(C,200)<=范围高A AND MA(C,200)>=范围低A) OR C>=MA(C,200),MA(C,200),DRAWNULL),COLORBLUE,LINETHICK2;
主升浪:=ISLASTBAR AND MA5>MA24 AND MA24>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);
主浪回调:=ISLASTBAR AND MA24>MA5 AND MA5>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);
主浪深调:=ISLASTBAR AND MA24>MA72 AND MA72>MA5 AND MA5>IF(MA200=DRAWNULL,0,MA200);
初升浪:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MAX(MA24,MA72) AND MA5>MA24 AND MA24>MA72;
底部反弹:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA5>MA24;
探底阶段:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA24>MA5;
观望:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24>MA72 AND C<MA72,MA72>MA200 AND C<MA200);
有牛:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C>=MA72,MA72<MA200 AND C>=MA200);
放弃:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C<MA72,MA72<MA200 AND C<MA200);
DRAWGBK(显示仪表盘1=1 AND 主升浪=0 AND 主浪回调=0 AND 主浪深调=0 AND 初升浪=0 AND 底部反弹=0 AND 探底阶段=0 AND 观望=0 AND 有牛=0 AND 放弃=0,0,0,0,'观望',0);
DRAWGBK(显示仪表盘1=1 AND 主升浪,0,0,0,'主升浪',0);
DRAWGBK(显示仪表盘1=1 AND 主浪回调,0,0,0,'主浪回调',0);
DRAWGBK(显示仪表盘1=1 AND 主浪深调,0,0,0,'主浪深调',0);
DRAWGBK(显示仪表盘1=1 AND 初升浪,0,0,0,'初升浪',0);
DRAWGBK(显示仪表盘1=1 AND 底部反弹,0,0,0,'底部反弹',0);
DRAWGBK(显示仪表盘1=1 AND 探底阶段,0,0,0,'探底阶段',0);
DRAWGBK(显示仪表盘1=1 AND 观望,0,0,0,'观望',0);
DRAWGBK(显示仪表盘1=1 AND 有牛,0,0,0,'有牛',0);
DRAWGBK(显示仪表盘1=1 AND 放弃,0,0,0,'放弃',0);
高点位:=REFDATE(HHV(H,总涨幅周期),DATE); 
低点位:=REFDATE(LLV(L,总涨幅周期),DATE);
低位价:=REF(L,BARSLAST(低点位=L)),COLORGREEN,NODRAW;
高位价:=REF(H,BARSLAST(高点位=H)),COLORRED,NODRAW;
最大涨幅:=(高位价-低位价)/低位价*100;
当前涨幅:=(C-低位价)/低位价*100;
ZFA:=CON2STR(CONST(最大涨幅),2);
ZFB:=CON2STR(CONST(当前涨幅),2);
ZFC:=STRCAT('【最大涨幅】:',ZFA);
ZFD:=STRCAT(ZFC,'%');
ZFE:=STRCAT(ZFD,'【当前总涨幅】:');
ZFF:=STRCAT(ZFE,ZFB);
ZFG:=STRCAT(ZFF,'%');
DRAWTEXT_FIX(ISLASTBAR,0,1,0,'▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇'),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0,1,0,ZFG),COLORYELLOW;
Z1:=STRCAT(DYBLOCK,' ');
Z2:=STRCAT(Z1,HYBLOCK);
Z3:=STRCAT(Z2,' ');
Z4:=STRCAT(Z3,GNBLOCK);
Z5:=STRCAT(Z4,' ');
Z6:=STRCAT(Z5,FGBLOCK);
DRAWTEXT_FIX(ISLASTBAR,0.01,0.012,0,STRCAT(Z6,ZHBLOCK)),COLORCYAN;
DRAWTEXT_FIX(1,0,0.075,0,STRCAT('【自定板块】:',ZDBLOCK)),COLORYELLOW;
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D; 
后量超前量:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL)=HHV(V,BARSLAST(CROSS(J,100))+1); 
F:=EMA(C,10)-EMA(C,22);
A:=EMA(F,8);
MD:=(F-A)*2;
周期:=BARSLAST(CROSS(F,A) AND A<=0.05)+1;
下跌柱:=BARSLASTCOUNT(MD<REF(MD,1))>1;
上涨柱:=BARSLASTCOUNT(MD>REF(MD,1))>1;
下跌柱群:=BARSLASTCOUNT(下跌柱);
上涨柱群:=BARSLASTCOUNT(上涨柱);
下跌柱群统计:=COUNT(下跌柱群,周期);
上涨柱群统计:=COUNT(上涨柱群,周期); 
XV:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL); 
HS:=XV/CAPITAL;
前量成立:=REF(COUNT(C>O AND C>H*0.3 AND (C/REF(C,1)-1)*100>=3,周期)>0,1);
前量1:=HHV(HS,BARSLAST(C>O AND C>H*0.3 AND (C-REF(C,1))/REF(C,1)*100>=3));
前量2:=HHV(HS,BARSLAST(CROSS(J,100))+1);
反转量:=IF(前量成立,HS>REF(前量1,1),HS>REF(前量1,1) AND HS>REF(前量2,1)); 
回调3:=LAST(C<=MA(C,10),3,1);
启动1:=C>MA(C,10) AND C>REF(MAX(C,O),1) AND (O/REF(C,1)-1)*100<=2;
启动2:=C>MA(C,10) AND MD>REF(MD,1) AND (O/REF(C,1)-1)*100<=2; 
雄启:=(下跌柱群统计<2 OR 上涨柱群统计<1) AND INDEXC>MA(INDEXC,10) AND 后量超前量 AND 反转量 AND (启动1 OR 启动2) AND 回调3;
STICKLINE(雄启,C,O,2,0),COLORLIMAGENTA;
DRAWTEXT(雄启,L-L*0.008,'雄启'),COLORLIMAGENTA;
MA100:=EMA(CLOSE,20); 
MA400:=EMA(CLOSE,40); 
MA600:=EMA(C,60); 
AA:=BARSLAST(MA400>MA600 AND (MA100=MA400 OR MA100>MA400)); 
BB:=REF(COUNT(C<MA600,AA)=AA,1);
CC:=CROSS(C,MA600) AND VOL>MA(VOL,5) AND (C-REF(C,1))/REF(C,1)*100>3; 
出击:=BB AND CC; 
STICKLINE(出击,C,O,2,0),COLORYELLOW;
DRAWTEXT(出击,L-L*0.03,'出击'),COLORYELLOW;
 



 {无忧副图}

RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D; 
后量超前量:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL)=HHV(V,BARSLAST(CROSS(J,100))+1); 
F:=EMA(C,10)-EMA(C,22);
A:=EMA(F,8);
MD:=(F-A)*2;
周期:=BARSLAST(CROSS(F,A) AND A<=0.05)+1;
下跌柱:=BARSLASTCOUNT(MD<REF(MD,1))>1;
上涨柱:=BARSLASTCOUNT(MD>REF(MD,1))>1;
下跌柱群:=BARSLASTCOUNT(下跌柱);
上涨柱群:=BARSLASTCOUNT(上涨柱);
下跌柱群统计:=COUNT(下跌柱群,周期);
上涨柱群统计:=COUNT(上涨柱群,周期); 
XV:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL); 
HS:=XV/CAPITAL;
前量成立:=REF(COUNT(C>O AND C>H*0.3 AND (C/REF(C,1)-1)*100>=3,周期)>0,1);
前量1:=HHV(HS,BARSLAST(C>O AND C>H*0.3 AND (C-REF(C,1))/REF(C,1)*100>=3));
前量2:=HHV(HS,BARSLAST(CROSS(J,100))+1);
反转量:=IF(前量成立,HS>REF(前量1,1),HS>REF(前量1,1) AND HS>REF(前量2,1)); 
回调3:=LAST(C<=MA(C,10),3,1);{分析家公式网 WWW.70822.COM}
启动1:=C>MA(C,10) AND C>REF(MAX(C,O),1) AND (O/REF(C,1)-1)*100<=2;
启动2:=C>MA(C,10) AND MD>REF(MD,1) AND (O/REF(C,1)-1)*100<=2; 
无忧:=(下跌柱群统计<2 OR 上涨柱群统计<1) AND INDEXC>MA(INDEXC,10) AND 后量超前量 AND 反转量 AND (启动1 OR 启动2) AND 回调3;
STICKLINE((无忧),0,85,2,0)COLORLIMAGENTA;
DRAWTEXT(无忧,L-L*0.5,'无忧'),COLORYELLOW;
AAA:=(3*C+H+L+O)/6;
VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;
VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;
VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;
VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
短线:VAR1,COLORWHITE;
中线:VAR6,COLORYELLOW;
下跌:IF(VAR1=VAR6,VAR6,DRAWNULL),COLORGREEN;
N1:=5;N2:=7;N3:=11;
EM1:=EMA(C,N1),COLORWHITE;
EM2:=EMA(C,N2),COLORRED;
EM3:=EMA(C,N3),COLORGREEN;
TJ:=BETWEEN(EM2,EM1,EM3);
MA20:MA(C,20)LINETHICK3;
IF(MA20>REF(MA20,1),MA20,DRAWNULL)COLORRED,LINETHICK3;

 
{无忧选股}
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
后量超前量:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL)=HHV(V,BARSLAST(CROSS(J,100))+1);
F:=EMA(C,10)-EMA(C,22);
A:=EMA(F,8);
MD:=(F-A)*2;
周期:=BARSLAST(CROSS(F,A) AND A<=0.05)+1;
下跌柱:=BARSLASTCOUNT(MD<REF(MD,1))>1;
上涨柱:=BARSLASTCOUNT(MD>REF(MD,1))>1;
下跌柱群:=BARSLASTCOUNT(下跌柱);
上涨柱群:=BARSLASTCOUNT(上涨柱);
下跌柱群统计:=COUNT(下跌柱群,周期);
上涨柱群统计:=COUNT(上涨柱群,周期);
XV:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL);
HS:=XV/CAPITAL;
前量成立:=REF(COUNT(C>O AND C>H*0.3 AND (C/REF(C,1)-1)*100>=3,周期)>0,1);
前量1:=HHV(HS,BARSLAST(C>O AND C>H*0.3 AND (C-REF(C,1))/REF(C,1)*100>=3));
前量2:=HHV(HS,BARSLAST(CROSS(J,100))+1);
反转量:=IF(前量成立,HS>REF(前量1,1),HS>REF(前量1,1) AND HS>REF(前量2,1));
回调3:=LAST(C<=MA(C,10),3,1);
启动1:=C>MA(C,10) AND C>REF(MAX(C,O),1) AND (O/REF(C,1)-1)*100<=2;
启动2:=C>MA(C,10) AND MD>REF(MD,1) AND (O/REF(C,1)-1)*100<=2;

XG:(下跌柱群统计<2 OR 上涨柱群统计<1) AND INDEXC>MA(INDEXC,10) AND 后量超前量 AND 反转量 AND (启动1 OR 启动2) AND 回调3;



  •  标签:  

原文链接:https://www.tdxzb.com/?id=1229

本文版权:如无特别标注,本站文章均为原创。

相关文章

服务热线

18020657357

微信客服

微信客服