通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、龙头股道指标公式源码
BB:=CROSS(30,100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)));
VV:=CROSS(100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)),50);
ZZ:=CROSS(100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),100*(C-LLV(L,5))/(HHV(C,5)-LLV(
L,5)));
DD:=CROSS(50,100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)));
GG:=H/C<1.03andma(c,5)>REF(MA(C,5),1);BG:=C/REF(C,1)>1.03;
YY:=MA(C,60)>REF(MA(C,60),1);UU:=MA(C,10)>REF(MA(C,10),1);
II:=MA(C,20)>REF(MA(C,20),1);OO:=C>OANDREF(MA(C,5),1)<REF(MA(C,5),2);
PP:=BARSLAST(BB)<2ANDBARSLAST(VV)<2ANDBARSLAST(ZZ)<2AND
BARSLAST(DD)<3;
龙头出击:GGANDYYANDUUANDIIANDOOANDPPANDBG;
上轨:MA(EMA(HIGH,11)*1.025,5),COLORBLUE;
下轨:MA(EMA(LOW,11)*0.975,5);
中轨:(上轨+下轨)/2,DOTLINE,COLORRED;
顶线:上轨+中轨-下轨;
底线:下轨+下轨-中轨;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
VAR1:=LLV(LOW,4);
VAR2:=HHV(HIGH,4);
AK:=EMA((((CLOSE-VAR1)/(VAR2-VAR1))*25),34);
买入:=CROSS(EMA((((CLOSE-VAR1)/(VAR2-VAR1))*50),3),EMA(AK,8)-1.6);
卖出:=CROSS(EMA(AK,8)+27.3,EMA((((CLOSE-VAR1)/(VAR2-VAR1))*50),3));
DRAWICON(买入,LOW*0.985,1);
DRAWICON(卖出,HIGH*1.01,2);
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
A4:=SMA(A3,3,1);
A5:=SMA(A4,3,1);
A6:=3*A4-2*A5;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
买:=LLV(A8,2)=LLV(A8,7)ANDCOUNT(A8<0,2)ANDCROSS(A8,MA(A8,2));
STICKLINE(买,OPEN,CLOSE,1.6,0),COLORYELLOW;
VAR5:=(CLOSE*2+HIGH+LOW)/4;
SK:=EMA(VAR5,13)-EMA(VAR5,21);
SD:=EMA(SK,2);
STICKLINE(CROSS(SK,SD),OPEN,CLOSE,0.5,0),COLORMAGENTA;
MAC3:=(ATAN((MA(C,3)/REF(MA(C,3),1)-1)*100)*180/3.14115926);
M3:=MA(MAC3,3);
AA:=PLOYLINE(CROSS(MAC3,M3),M3);
AAB:=PLOYLINE(CROSS(M3,MAC3),MAC3);
起点:=COUNT(CROSS(MAC3,M3),AAREF(AAB,3));
DRAWICON(起点,LOW*0.985,1);
获利了结:EMA(EMA(EMA(HIGH,5),5),4)*1.15,COLORYELLOW;
风险:EMA(EMA(EMA(HIGH,5),5),4)*1.1,COLORFFFFFF;
回档:EMA(EMA(EMA(HIGH,5),5),4)*1.05,COLOR00FF00;
平衡:EMA(EMA(EMA(HIGH,5),5),4),COLORFF00FF;
反弹:EMA(EMA(EMA(HIGH,5),5),4)*0.95,COLOR808080;
超跌:EMA(EMA(EMA(HIGH,5),5),4)*0.9,COLORBLUE;
BBBAND
指南针布林线宽指标
n=30
Var1:=MA(CLOSE,N);
Var2:=Var1+2*STD(CLOSE,N);
变盘:5,POINTDOT;
布林宽度:(Var2-Var1)/Var1*100;
警戒:30,POINTDOT;
CBW
指南针成本带宽
n1=97.5,n2=2.5
CBW:100*(COST(N1)-COST(N2))/COST(N1);
CBXQD
指南针成本均线强度
n=4,n1=5,n2=13,n3=34
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,N1);
Var3:=MA(Var1,N2);
Var4:=MA(Var1,N3);
Var5:=DMA(CLOSE,VOL/CAPITAL);
CYR5:100*(Var2-REF(Var2,N))/REF(Var2,N);
CYR13:100*(Var3-REF(Var3,N))/REF(Var3,N);
CYR34:100*(Var4-REF(Var4,N))/REF(Var4,N);
CYR⽆穷:100*(Var5-REF(Var5,N))/REF(Var5,1);
CKD
指南针相对价位
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,13);
Var3:=DMA(Var1,VOL/CAPITAL);
CKDP:100*(Var2-COST(0))/(COST(100)-COST(0));
CKDW:100*(Var3-COST(0))/(COST(100)-COST(0));
CMACD
CMACD
指南针CMACD指标
n1=5,n2=13
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,N1);
Var3:=MA(Var1,N2);
CMACD:100*(Var2-Var3)/Var3,COLORSTICK;
CYB
优化布林线
n=20
MB:MA(CLOSE,N);
上轨:MB+STD(CLOSE,N);
下轨:MB-STD(CLOSE,N);
上极限:MB+2*STD(CLOSE,N);
下极限:MB-2*STD(CLOSE,N);
STICKLINE(open|=close,close,open,9,0),COLORaaaaaa;
STICKLINE(open|=close,close,open,6,0),COLORbbbbbb;
STICKLINE(open|=close,close,open,2.4,0),COLORcccccc;
STICKLINE(open|=close,close,open,1.1,0),COLORdddddd;
STICKLINE(close|open,close,open,9,0),COLOr6666cc;
STICKLINE(close|open,close,open,6,0),COLOR7777dd;
STICKLINE(close|open,close,open,2.4,0),COLOR8888ee;
STICKLINE(close|open,close,open,1.1,0),COLOR9999ff;
STICKLINE(close|open,open,low,0.5,0),COLOR1199ff;
STICKLINE(close|open,close,HIGH,0.5,0),COLOR1199ff;
STICKLINE(open|=close,close,low,0.5,0),COLORcccccc;
STICKLINE(open|=close,open,HIGH,0.5,0),COLORcccccc;
CYC
指南针成本均线
n1=5,n2=13,n3=34
Var1:=AMOUNT/(100*VOL);
短线成本均线:MA(Var1,N1);
中线成本均线:MA(Var1,N2);
长线成本均线:MA(Var1,N3);
⽆穷成本均线:DMA(CLOSE,VOL/CAPITAL);
STICKLINE(open|=close,close,open,9,0),COLORaaaaaa;
STICKLINE(open|=close,close,open,9,0),COLORaaaaaa;
STICKLINE(open|=close,close,open,6,0),COLORbbbbbb;
STICKLINE(open|=close,close,open,2.4,0),COLORcccccc;
STICKLINE(open|=close,close,open,1.1,0),COLORdddddd;
STICKLINE(close|open,close,open,9,0),COLOr6666cc;
STICKLINE(close|open,close,open,6,0),COLOR7777dd;
STICKLINE(close|open,close,open,2.4,0),COLOR8888ee;
STICKLINE(close|open,close,open,1.1,0),COLOR9999ff;
STICKLINE(close|open,open,low,0.5,0),COLOR1199ff;
STICKLINE(close|open,close,HIGH,0.5,0),COLOR1199ff;
STICKLINE(open|=close,close,low,0.5,0),COLORcccccc;
STICKLINE(open|=close,open,HIGH,0.5,0),COLORcccccc;
CYC2
成本均线
p1=5,p2=13,p3=34
CYC1:0.01*EMA(AMOUNT,P1)/EMA(VOL,P1);
CYC2:0.01*EMA(AMOUNT,P2)/EMA(VOL,P2);
CYC3:0.01*EMA(AMOUNT,P3)/EMA(VOL,P3);
CYC∞:DMA(AMOUNT/(100*VOL),VOL/(100*FINANCE(7)));
CYD
承接因⼦
n=21
CYDS:WINNER(CLOSE)/(VOL/CAPITAL);
CYDN:WINNER(CLOSE)/MA(VOL/CAPITAL,N);
CYD2
承接因⼦
A:=WINNER(CLOSE)*CAPITAL;
承接因⼦:A/VOL;
CYDD
指南针动态承接因⼦
Var1:=WINNER(CLOSE);
Var2:=DMA(Var1,VOL/CAPITAL);
Var3:=DMA(VOL,VOL/CAPITAL)/CAPITAL;
CYDD:Var1/Var3;
CYDD1:Var2/Var3;
1,POINTDOT;
CYE
市场趋势
MAL:=MA(CLOSE,5);
MAS:=MA(MA(CLOSE,20),5);
CYEL:(MAL-REF(MAL,1))/REF(MAL,1)*100;
CYES:(MAS-REF(MAS,1))/REF(MAS,1)*100;
CYF
市场能量
n=21
HSL:=VOL/CAPITAL*100;
CYF:100-100/(1+EMA(HSL,N)*100);
CYOBV
指南针优化累积能量线
n=34
NOBV1:SUM(IF(CLOSE|REF(CLOSE,1),VOL,IF(CLOSECYQKL
指南针博弈K线长度
100*(WINNER(CLOSE)-WINNER(OPEN)),COLORSTICK;
CYR
市场强弱
n=13,m=5
DIVE:=0.01*EMA(AMOUNT,N)/EMA(VOL,N);
CYR:(DIVE/REF(DIVE,1)-1)*100;
MACYR:MA(CYR,M);
CYS
指南针盈亏指标
n1=5,n2=13,n3=34
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,N1);
Var3:=MA(Var1,N2);
Var4:=MA(Var1,N3);
Var5:=DMA(CLOSE,VOL/CAPITAL);
CYS5:100*(CLOSE-Var2)/Var2;
CYS13:100*(CLOSE-Var3)/Var3;
CYS34:100*(CLOSE-Var4)/Var4;
CYS⽆穷:100*(CLOSE-Var5)/Var5;
CYS2
市场盈亏
CYC13:=0.01*EMA(AMOUNT,13)/EMA(VOL,13);
CYS:(CLOSE-CYC13)/CYC13*100;
CYS-YJJ
市场盈亏
p1=4,p2=5
VAR2:=VOL*CLOSE;
VAR3:=EMA(VAR2,13)/EMA(VOL,13);
CYS:(EMA(CLOSE,P1)-VAR3)/VAR3*100;
ML:EMA(CYS,P2);
LO:0,POINTDOT;
CYW
主⼒控盘
VAR1:=CLOSE-LOW;
VAR2:=HIGH-LOW;
VAR3:=CLOSE-HIGH;
VAR4:=IF(CLOSE|=0,(VAR1/VAR2+VAR3/VAR2)*VOL,(VAR3/VAR2+VAR1/VAR2)*VOL);
CYW:SUM(VAR4,10)/10000,COLORSTICK;
CYW-YJJ
主⼒控盘
p1=16,p2=8,p3=45
VAR1:=1;
VAR2:=CLOSE-REF(CLOSE,1);
VAR2:=CLOSE-REF(CLOSE,1);
VAR3:=IF(CLOSE-REF(CLOSE,1)|=0,VAR2,0);
VAR4:=REF(CLOSE,1)-CLOSE;
VAR5:=IF(CLOSE-REF(CLOSE,1)<=0,VAR4,0);
VAR6:=SUM(VAR3,P1)/SUM(VAR5,P1);
VAR7:=100-100/(1+VAR6);
VAR8:=EMA(VAR7,P1);
VAR9:=EMA(VAR8,P2);
VARA:=EMA(VAR8,P3);
MO:(VAR8-VARA)*VAR1;
ML:(VAR9-VARA)*VAR1;
MODE:MO*VAR1,COLORSTICK;
DKBL
指南针成本多空布林线
n=10,p=3
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,3);
Var3:=MA(Var1,6);
Var4:=MA(Var1,12);
Var5:=MA(Var1,24);
BBI:(Var2+Var3+Var4+Var5)/4;
UPR:BBI+P*STD(BBI,N);
DWN:BBI-P*STD(BBI,N);
STICKLINE(open|=close,close,open,9,0),COLORaaaaaa;
STICKLINE(open|=close,close,open,6,0),COLORbbbbbb;
STICKLINE(open|=close,close,open,2.4,0),COLORcccccc;
STICKLINE(open|=close,close,open,1.1,0),COLORdddddd;
STICKLINE(close|open,close,open,9,0),COLOr6666cc;
STICKLINE(close|open,close,open,6,0),COLOR7777dd;
STICKLINE(close|open,close,open,2.4,0),COLOR8888ee;
STICKLINE(close|open,close,open,1.1,0),COLOR9999ff;
STICKLINE(close|open,open,low,0.5,0),COLOR1199ff;
STICKLINE(close|open,close,HIGH,0.5,0),COLOR1199ff;
STICKLINE(open|=close,close,low,0.5,0),COLORcccccc;
STICKLINE(open|=close,open,HIGH,0.5,0),COLORcccccc;
JBCYS
JBCYS
CYS越低的股涨得越好。
JBCYF:MA(CLOSE,13)*(CLOSE-MA(CLOSE,13));
MYP
指南针年最⼤收益指标
Var1:=LLV(HIGH,240);
MYP:100*(CLOSE-Var1)/Var1;
PAS1
指南针筹码穿透率
Var1:=100*VOL/CAPITAL;
Var2:=100*(WINNER(CLOSE)-REF(WINNER(CLOSE),1));
筹码穿透率:Var2/Var1,VOLSTICK;
P-CBY
博弈均线
博弈均线:MA(WINNER(CLOSE)*100,3);
Var1:=COST(0);
Var2:=COST(5);
Var3:=COST(45);
Var4:=COST(55);
Var5:=COST(95);
Var6:=COST(100);
底部线:(Var4-Var3)*100/(Var6-Var1);
⽜熊线:(Var5-Var2)*100/(Var6-Var1);
RPY
指南针年相对价位
n=240
Var1:=REF(HHV(CLOSE,N),1);
Var2:=REF(LLV(CLOSE,N),1);
100*(CLOSE-Var2)/(Var1-Var2);
RPY2
指南针两年相对价位
Var1:=REF(HHV(CLOSE,480),1);
Var2:=REF(LLV(CLOSE,480),1);
100*(CLOSE-Var2)/(Var1-Var2);
SDR
指南针锁定筹码
Var1:=1.1*CLOSE;
Var2:=0.9*CLOSE;
Var3:=100*(WINNER(Var1)-WINNER(Var2));
锁定筹码:100-Var3;
博奕K线
Var1:=MA(WINNER(CLOSE)*100,3);
底部线:(COST(55)-COST(45))*100/(COST(97)-COST(3));
⽜熊线:(COST(65)-COST(35))*100/(COST(97)-COST(3)),COLORRED;
压⼒线:(COST(95)-COST(5))*100/(COST(97)-COST(3));
STICKLINE(WINNER(CLOSE)*100|=WINNER(OPEN)*100,WINNER(OPEN)*100,WINNER(CLOSE)*100,5,1),COLORRED;
STICKLINE(WINNER(OPEN)*100|WINNER(CLOSE)*100,WINNER(CLOSE)*100,WINNER(OPEN)*100,5,0),COLORGREEN;
STICKLINE(WINNER(CLOSE)*100|=WINNER(OPEN)*100,WINNER(CLOSE)*100,WINNER(HIGH)*100,0.5,1),COLORRED;
STICKLINE(WINNER(CLOSE)*100|=WINNER(OPEN)*100,WINNER(OPEN)*100,WINNER(LOW)*100,0.5,1),COLORRED;
STICKLINE(WINNER(OPEN)*100|WINNER(CLOSE)*100,WINNER(CLOSE)*100,WINNER(LOW)*100,0.5,0),COLORGREEN;
STICKLINE(WINNER(OPEN)*100|WINNER(CLOSE)*100,WINNER(OPEN)*100,WINNER(HIGH)*100,0.5,0),COLORGREEN;
DRAWTEXT(CLOSE/OPEN|88,LOW,'');
博奕柱线
ABS(WINNER(CLOSE)-WINNER(OPEN))*100,VOLSTICK;
【指南针CI个性指标实战】
上图是国⾦证券的⼀段⾛势图:在4⽉9⽇个性指标创出新⾼,但股价并⽆创出新⾼,出现背离。后期股价顺应个性指标⾛
势创出新⾼后连续上攻。
指南针CI指标的特性就是把股票⾛势强于⼤盘或弱于⼤盘的概念指标化,CI在设计上把股价运动中与⼤盘⾛势相同的部分过
指南针CI指标的特性就是把股票⾛势强于⼤盘或弱于⼤盘的概念指标化,CI在设计上把股价运动中与⼤盘⾛势相同的部分过
滤掉,只留下每只股票⾛势中独⽴于⼤盘的部分。如果把⼤盘⾛势看作是反映了所有股票的共性,那么减去⼤盘⾛势后留下的就
是每只股票的个性,所以称之为个性指标。
指南针指标⾮常多,这⾥就仅仅列举出其中的个性指标给⼤家提供学习思路,如若您想要学习更多技术指标请关注本栏⽬的
更新,如若想要学习rsi指标相关知识点可点击进⼊,最后预祝⼤家投资愉快。
CBAND——指南针布林线宽指标
Var1:=MA(CLOSE,N);
Var2:=Var1+2*STD(CLOSE,N);
变盘:5,POINTDOT;
布林宽度:(Var2-Var1)/Var1*100;
警戒:30,POINTDOT;
{N305100}
CBW——指南针成本带宽
CBW:100*(COST(N1)-COST(N2))/COST(N1);
{N197.50100N22.50100}
CBXQD——指南针成本均线强度
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,N1);
Var3:=MA(Var1,N2);
Var4:=MA(Var1,N3);
Var5:=DMA(CLOSE,VOL/CAPITAL);
CYR5:100*(Var2-REF(Var2,N))/REF(Var2,N);
CYR13:100*(Var3-REF(Var3,N))/REF(Var3,N);
CYR34:100*(Var4-REF(Var4,N))/REF(Var4,N);
CYR⽆穷:100*(Var5-REF(Var5,N))/REF(Var5,1);
{N4N15N213N334}
CKD——指南针相对价位
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,13);
Var3:=DMA(Var1,VOL/CAPITAL);
CKDP:100*(Var2-COST(0))/(COST(100)-COST(0));
CKDW:100*(Var3-COST(0))/(COST(100)-COST(0));
CMACD——指南针CMACD指标
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,N1);
Var3:=MA(Var1,N2);
CMACD:100*(Var2-Var3)/Var3,COLORSTICK;
{N15N213}
CYB——指南针优化布林线
MB:MA(CLOSE,N);
上轨:MB+STD(CLOSE,N);
上轨:MB+STD(CLOSE,N);
下轨:MB-STD(CLOSE,N);
上极限:MB+2*STD(CLOSE,N);
下极限:MB-2*STD(CLOSE,N);
STICKLINE(open>=close,close,open,9,0),COLORaaaaaa;
STICKLINE(open>=close,close,open,6,0),COLORbbbbbb;
STICKLINE(open>=close,close,open,2.4,0),COLORcccccc;
STICKLINE(open>=close,close,open,1.1,0),COLOR;
STICKLINE(close>open,close,open,9,0),COLOr6666cc;
STICKLINE(close>open,close,open,6,0),COLOR7777dd;
STICKLINE(close>open,close,open,2.4,0),COLOR8888ee;
STICKLINE(close>open,close,open,1.1,0),COLOR9999ff;
STICKLINE(close>open,open,low,0.5,0),COLOR1199ff;
STICKLINE(close>open,close,HIGH,0.5,0),COLOR1199ff;
STICKLINE(open>=close,close,low,0.5,0),COLORcccccc;
STICKLINE(open>=close,open,HIGH,0.5,0),COLORcccccc;
CYC1——指南针成本均线
Var1:=AMOUNT/(100*VOL);
短线成本均线:MA(Var1,N1);
中线成本均线:MA(Var1,N2);
长线成本均线:MA(Var1,N3);
⽆穷成本均线:DMA(CLOSE,VOL/CAPITAL);
STICKLINE(open>=close,close,open,9,0),COLORaaaaaa;
STICKLINE(open>=close,close,open,6,0),COLORbbbbbb;
STICKLINE(open>=close,close,open,2.4,0),COLORcccccc;
STICKLINE(open>=close,close,open,1.1,0),COLOR;
STICKLINE(close>open,close,open,9,0),COLOr6666cc;
STICKLINE(close>open,close,open,6,0),COLOR7777dd;
STICKLINE(close>open,close,open,2.4,0),COLOR8888ee;
STICKLINE(close>open,close,open,1.1,0),COLOR9999ff;
STICKLINE(close>open,open,low,0.5,0),COLOR1199ff;
STICKLINE(close>open,close,HIGH,0.5,0),COLOR1199ff;
STICKLINE(open>=close,close,low,0.5,0),COLORcccccc;
STICKLINE(open>=close,open,HIGH,0.5,0),COLORcccccc;
{N15N213N334}
CYC2——指南针成本均线
CYC1:0.01*EMA(AMOUNT,P1)/EMA(VOL,P1);
CYC2:0.01*EMA(AMOUNT,P2)/EMA(VOL,P2);
CYC3:0.01*EMA(AMOUNT,P3)/EMA(VOL,P3);
CYC∞MA(AMOUNT/(100*VOL),VOL/(100*FINANCE(7)));
{P15P213P334]
CYD——指南针承接因⼦
CYDS:WINNER(CLOSE)/(VOL/CAPITAL);
CYDN:WINNER(CLOSE)/MA(VOL/CAPITAL,N);
{年21}
CYD2——指南针承接因⼦
A:=WINNER(CLOSE)*CAPITAL;
承接因⼦:A/VOL;
CYDD——指南针动态承接因⼦
Var1:=WINNER(CLOSE);
Var2:=DMA(Var1,VOL/CAPITAL);
Var3:=DMA(VOL,VOL/CAPITAL)/CAPITAL;
CYDD:Var1/Var3;
CYDD1:Var2/Var3;
1,POINTDOT;
CYE——指南针市场趋势
MAL:=MA(CLOSE,5);
MAS:=MA(MA(CLOSE,20),5);
CYELMAL-REF(MAL,1))/REF(MAL,1)*100;
CYESMAS-REF(MAS,1))/REF(MAS,1)*100;
CYF——指南针市场能量
HSL:=VOL/CAPITAL*100;
CYF:100-100/(1+EMA(HSL,N)*100);
{N21}
CYOBV——指南针优化累积能量线
NOBV1:SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),0-VOL,0)),N)/CAPITAL;
{N34}
CYQKL——指南针博弈K线长度
100*(WINNER(CLOSE)-WINNER(OPEN)),COLORSTICK;
CYR——指南针市场强弱
DIVE:=0.01*EMA(AMOUNT,N)/EMA(VOL,N);
CYRDIVE/REF(DIVE,1)-1)*100;
MACYR:MA(CYR,M);
{N13M5}
CYS——指南针盈亏指标
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,N1);
Var3:=MA(Var1,N2);
Var4:=MA(Var1,N3);
Var5:=DMA(CLOSE,VOL/CAPITAL);
CYS5:100*(CLOSE-Var2)/Var2;
CYS13:100*(CLOSE-Var3)/Var3;
CYS34:100*(CLOSE-Var4)/Var4;
CYS⽆穷:100*(CLOSE-Var5)/Var5;
{N15N213N334}
CYW-YJJ——主⼒控盘
CYW-YJJ——主⼒控盘
VAR1:=1;
VAR2:=CLOSE-REF(CLOSE,1);
VAR3:=IF(CLOSE-REF(CLOSE,1)>=0,VAR2,0);
VAR4:=REF(CLOSE,1)-CLOSE;
VAR5:=IF(CLOSE-REF(CLOSE,1)<=0,VAR4,0);
VAR6:=SUM(VAR3,P1)/SUM(VAR5,P1);
VAR7:=100-100/(1+VAR6);
VAR8:=EMA(VAR7,P1);
VAR9:=EMA(VAR8,P2);
VARA:=EMA(VAR8,P3);
MO:(VAR8-VARA)*VAR1;
ML:(VAR9-VARA)*VAR1;
MODE:MO*VAR1,COLORSTICK;
{P116P28P345}
CYW——指南针主⼒控盘
VAR1:=CLOSE-LOW;
VAR2:=HIGH-LOW;
VAR3:=CLOSE-HIGH;
VAR4:=IF(CLOSE>=0,(VAR1/VAR2+VAR3/VAR2)*VOL,(VAR3/VAR2+VAR1/VAR2)*VOL);
CYW:SUM(VAR4,10)/10000,COLORSTICK;
二、龙头密码指标公式源码
n:2m:5k:40
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛
线:(20*MID+19*REF(MID,1)+20*REF(MID,2)+17*REF(MID,3)+16*REF(MID,
4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*RE
F(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)
+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(
MID,18)+REF(MID,20))/210,COLORRED;
买线:EMA(C,N);
卖线:EMA(SLOPE(牛线,M)*18+牛线,K);
A1:REF(卖线,2);
BU:=CROSS(买线,A1);
SEL:=CROSS(A1,买线);
DRAWICON(BUANDFILTER(BU,3),L-0.1,1);
DRAWICON(SELANDFILTER(SEL,3),H+0.1,2);
STICKLINE(买线>=A1,LOW,HIGH,0.0,1),COLORRED;
STICKLINE(买线>=A1,CLOSE,OPEN,2,1),COLORRED;
STICKLINE(买线<A1,LOW,HIGH,0.0,1),COLORCYAN;
STICKLINE(买线<A1,CLOSE,OPEN,2,1),COLORCYAN;
操盘线:=MA(CLOSE,9),COLORYELLOW;
界点线:=MA(CLOSE,20),COLORMAGENTA;
X_1:=STRCAT(HYBLOCK,1);
X_2:=STRCAT(X_1,FGBLOCK);
X_3:=STRCAT(X_2,DYBLOCK);
X_4:=STRCAT(X_3,1);
DRAWTEXT_FIX(ISLASTBAR,0.03,0,0,STRCAT(X_4,GNBLOCK)),COLORYELLOW;
线A:EMA(SLOPE(CLOSE,21)*20+CLOSE,55),COLORWHITE;
线B:HHV(线A,60),COLORGREEN;
STICKLINE(CLOSE>1.098*REF(CLOSE,1)AND
CLOSE>OPEN,CLOSE,OPEN,3,0),COLORYELLOW;
IF(CLOSE>线B,线A,DRAWNULL),COLORMAGENTA,LINETHICK2;
DRAWTEXT(CROSS(CLOSE,线B)ANDCLOSE/REF(CLOSE,1)>=1.03,线
B*1.01,2),COLORMAGENTA,LINETHICK2;
当日成本:=IF(C>REF(C,1),(3*H+4*C+3*OPEN+2*L)/12,(2*H+4*C+3*OPEN+3*L)/12);
疯牛线:EXPMEMA(当日成本,3);
龙头线:EXPMEMA(当日成本,8);
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,11)-EMA(V1,30);
V3:=EMA(V2,5);
V4:=2*(V2-V3)*4;
做空:=IF(V4<=0,V4,0),COLORGREEN;
做多:=IF(V4>=0,V4,0);
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V9,3);VB1:=(V9-VA)/2;
V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/
(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势线:=EMA(V11,4);
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*88;
STICKLINE(C>0,H,L,3,0),COLORYELLOW;
STICKLINE(PBX.PBX1(3)<PBX.PBX2(5)ANDPBX.PBX2(5)<PBX.PBX3(7)AND
PBX.PBX3(7)<PBX.PBX4(9),H,L,3,0),COLORGREEN;
STICKLINE((PBX.PBX1(3)>PBX.PBX2(5)ANDPBX.PBX2(5)>PBX.PBX3(7)AND
PBX.PBX3(7)>PBX.PBX4(9))OR(MA(C,5)>MA(C,8)ANDMA(C,8)>MA(C,12)AND
MA(C,12)>MA(C,16)ANDMA(C,16)>MA(C,20)),H,L,3,0),COLORRED;
[源码注释]通达信公式动态翻译结果
WY1001赋值:(2*收盘价+最高价+最低价)/3
WY1002赋值:WY1001的3日指数移动平均
WY1003赋值:WY1002的3日指数移动平均
WY1004赋值:WY1003的3日指数移动平均
XYS0赋值:(WY1004-1日前的WY1004)/1日前的WY1004*100
当满足条件XYS0>=0时,在XYS0和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,画红色
当满足条件XYS0<0时,在XYS0和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLOR205F20
当满足条件XYS0<-1时,在XYS0和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLOR2D872D
当满足条件XYS0<-1.5时,在XYS0和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLOR40C040
当满足条件XYS0<-2时,在XYS0和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,画绿色
PJGJ赋值:成交额(元)/成交量(手)/100
SSRYDJX赋值:PJGJ的15日简单移动平均
SSRCJL赋值:成交量(手)的15日指数移动平均
SSRCJE赋值:成交额(元)的15日指数移动平均
SSRCBJX赋值:SSRCJE/SSRCJL/100
捕捞线赋值:(收盘价-SSRCBJX)/SSRCBJX*100
XYSHSL赋值:成交量(手)/当前流通股本(手)*100的12日指数移动平均
当满足条件XYSHSL>6.1AND捕捞线>5时,在1.2和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,画洋红色
当满足条件XYSHSL>3.8AND捕捞线>5时,在0.9和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,画黄色
当满足条件XYSHSL>2.1AND捕捞线>5时,在0.6和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,画青色
当满足条件XYSHSL>1.8AND捕捞线>5时,在0.3和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,画蓝色
输出龙骨:XYS0的1日简单移动平均,画绿色,线宽为3
输出龙筋:XYS0的2日简单移动平均,画白色,线宽为1
如果(龙骨>1日前的龙骨),返回龙骨,否则返回无效数,画黄色,线宽为3
金叉赋值:龙骨上穿龙筋
当满足条件金叉时,在龙筋位置画38号图标
推荐阅读:龙抬头指标公式源码
AA:=(VOL>1.5*REF(VOL,1)
ANDVOL>REF(MA(VOL,21),1)
ANDCLOSE>1.03*OPEN
ANDCLOSE=HHV(CLOSE,21)
ANDCLOSE<1.25*LLV(CLOSE,21)
ANDREF(CLOSE,1)<1.2*REF(LLV(CLOSE,20),1)
ANDREF(CLOSE,1)<1.5*REF(LLV(CLOSE,60),1)
ANDREF(CLOSE,1)<2*REF(LLV(CLOSE,120),1));
换手:=VOL/CAPITAL*100;
MA21换手:=MA(换手,21);
DYX:=C/REF(C,1)>=1.049;
启动:=AA;
去除ST:=EXIST((C/REF(C,1)-1)*100>5.6,60);
去除停牌:=DYNAINFO(4)>0;{通达信:今开大于零}
去除高价:=DYNAINFO(7)<40;{最新价小于40元}
去除大盘股:=CAPITAL/1000000<10;{流通盘为10亿以下}
AAAA:=去除STAND去除停牌AND去除高价AND去除大盘股;
龙抬头:0<启动ANDDYXANDAAAA;
DRAWBAND(龙抬头,RGB(255,0,0),0,RGB(0,255,0));
VAR1:=((((((2*CLOSE)+HIGH)+LOW)+OPEN)/5));A1:(((((EMA(VAR1,3)+EMA
(VAR1,6))+EMA(VAR1,12))+EMA(VAR1,24))/4));A2:(EMA(A1,2));
A3:(EMA(A2,2));A4:(EMA(A3,2));A5:(EMA(A4,2));A6:(EMA(A5,2));
A7:(EMA(A6,2));A8:((EMA(VAR1,2.78)*1.028));A9:((MA(OPEN,3.2)*1.028));
AA:=((CLOSE/REF(CLOSE,1))>=1.099);AB:=(VOL/REF(VOL,1));
龙头第一买点:=IF((AAAND(AB<1)),1,0);龙头第二买点:=IF((((CLOSE/REF
(CLOSE,1))>=1.07)AND(AB<1)),1,0);买线:=(EMA(CLOSE,2));
卖线:=(EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42));
STICKLINE((买线>=卖线),CLOSE,OPEN,3,0),COLOR0000AA;
STICKLINE((买线>=卖线),CLOSE,OPEN,3,0),COLOR0000BB;
STICKLINE((买线>=卖线),CLOSE,OPEN,3,0),COLOR0000CC;
STICKLINE((买线<卖线),CLOSE,OPEN,3,0),COLORAAAA00;
STICKLINE((买线<卖线),CLOSE,OPEN,3,0),COLORBBBB00;
龙抬头:
VAR100:=IF(DATE<1530730anddate>900101,1,0);
A2:=((EMA(CLOSE,12))-(EMA(CLOSE,26)))*10;
A3:=EMA(A2,27);
A4:=2*(A2-A3);
A5:=((CLOSE-(LLV(LOW,9)))/((HHV(HIGH,9))-(LLV(LOW,9))))*100;
A6:=SMA(A5,3,1)*VAR100;
A7:=SMA(A6,3,1)*VAR100;
A8:=(3*A6)-(2*A7)*VAR100;
A9:=((MA(CLOSE,3)))*VAR100;
A10:=MA(CLOSE,5)*VAR100;
A11:=MA(CLOSE,10)*VAR100;
A12:=((MA(CLOSE,13)));
A13:=MA(CLOSE,30)*VAR100;
A14:=MA(CLOSE,34)*VAR100;
A15:=MA(CLOSE,55)*VAR100;
A16:=MA(CLOSE,60)*VAR100;
A17:=MA(CLOSE,90)*VAR100;
A26:=((CLOSE-A17)/A17)*100;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
A50:=(REF(CCI,1))>(-180);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
A65:=(CROSS(K,D))*60;
A96:=AMOUNT/VOL;
A97:=EMA(((WINNER((CLOSE*1.1))-WINNER((CLOSE*0.9)))*80),5);
A98:=VOL*CLOSE;
A99:=(EMA(A98,5))/(EMA(VOL,5));
A100:=((CLOSE-A99)/A99)*100;
A101:=A96/100;
A102:=MA(A101,5);
A103:=MA(A101,20);
A104:=MA(A101,30);
A105:=MA(CLOSE,27);
A106:=((CLOSE-A105)/A105)*100;
A107:=(MA(A106,3));
A149:=BARSLAST(((CROSS(-10,A107))=1));
A151:=((A107<-10)and(a149>3));
安全:=(((IF(A151,A107,0))<0)*-10),COLORGREEN;
龙抬头:((((((A65AND安全)AND((A6-A7)>1.5))AND(OPEN!=HIGH))
AND(A26<-10))OR(安全AND(CROSS(A6,A7))))*10)*VAR100;
百发百中:
VAR1:=C/MA(C,20)*100<80;VAR2:=C/MA(C,40)*100<78;
VAR3:=C/MA(C,60)*100<72;
VAR4:=H>L*1.051;
VAR5:=VAR4ANDCOUNT(VAR4,5)>1;
VAR5AND(VAR1ORVAR2ORVAR3);
评论(0)