当前位置: 网站首页 > 股票软件公式 > 同花顺公式 > 文章 当前位置: 同花顺公式 > 文章

同花顺源码:RXB,能量资金谱,波动副图

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

RXB:

B:ZIG(3,10),coloryellow;

G:=MA(B,2),colorred;
D:=EMA(B,34),colorgreen;
J:=EMA(B,144),colorligreen;
DRAWICON(CROSS(B,G),B-0.1,1);
DRAWICON(CROSS(G,B),G+0.1,2);
//DRAWTEXT(CROSS(B,G),B*0.85,"建"),coloryellow;
//DRAWTEXT(CROSS(G,B),G,"清"),colorgreen;
F:=100*(C-REF(C,1))/REF(C,1);
JD:=IF(C<REF(O,1) AND F<0,1,0);
S1:=JD;
MR:=IF(C<REF(O,2) AND F<0,1,0),LINETHICK0;
S2:=MR;
A1:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1));
A2:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1));
//DRAWTEXT(A1 AND A2 OR D<0,B,'加仓'),coloryellow;//加仓买
//DRAWICON(A1 AND A2,B-0.2,1);
VAR3:=PEAKBARS(3,5,1)<10;
VAR5:=IF(VAR3=1,2,0);
顶:= IF(VAR5=2,2,0);
顶A:=IF(顶>REF(顶,1),1,0),STICK,colorcyan, LINETHICK2;//
//DRAWTEXT(顶A=1,B*1.1,'减仓'),colorgreen;
DRAWICON(顶A=1,B,2);
A11:LLV(LOW,144),colormagenta;
//DRAWICON(A11==REF(A11,1) AND REF(A11,1)<REF(A11,2),A11,1);
//DRAWICON(A11<REF(A11,1) AND REF(A11,1)==REF(A11,2),A11,2);
//DRAWICON(A11>REF(A11,1) AND REF(A11,1)==REF(A11,2),A11,1);
MID:=MA(CLOSE,26);
UPPER:=MID + 2*STD(CLOSE,26),colorwhite;//上轨
UPPER1:=MID + 1.618*STD(CLOSE,26),colorred;//上轨
LOWER:=MID - 2*STD(CLOSE,26),coloryellow;//下轨
LOWER1:=MID - 1.618*STD(CLOSE,26),colorgreen;//下轨
//DRAWTEXT(CROSS(CLOSE,LOWER),J*1.05,"L"),coloryellow;;
//DRAWTEXT(CROSS(CLOSE,UPPER),J*1.05,"L"),colorgreen;
DRAWICON(CROSS(B,A11),B,1);
DRAWICON(CROSS(A11,B),B,2);
VERLINE(CROSS(B,G) AND (A1 AND A2 OR D<0),1),colorlimagenta;//画加仓建仓垂线
VERLINE(CROSS(G,B),1),colorcyan;//画清仓垂线
STICKLINE(A11<B AND B>REF(B,1),B,A11,0.8,0),colorred;
STICKLINE(A11<B AND B<REF(B,1),B,A11,0.8,0),colorgreen;
DRAWTEXT((CROSS(B,G) AND (A1 AND A2 OR D<0)) OR CROSS(B,G),A11*0.95,'B'),coloryellow;//建仓加仓买
STICKLINE(A11>B AND B>REF(B,1),B,A11,0.8,0),colorred;
STICKLINE(A11>B AND B<REF(B,1),B,A11,0.8,0),colorgreen;
A34:=LLV(B,34),coloryellow;
A55:=LLV(B,55),coloryellow;
A144:=LLV(B,144),coloryellow;
AA:=(CROSS(B,G) AND (A1 AND A2 OR D<0)) OR CROSS(B,G);
POLYLINE(AA==1,REF(B,1)),coloryellow;
CC:=CLOSE,colorwhite;
DD7:DYNAINFO(7),nodraw;
DD1:=DYNAINFO(1),nodraw;
DD2:=DYNAINFO(2),nodraw;
DD3:=DYNAINFO(3),nodraw;
DD4:=DYNAINFO(4),nodraw;
DD5:=DYNAINFO(5),nodraw;
DD6:=DYNAINFO(6),nodraw;
DD7:=DYNAINFO(7),nodraw;
DD9:=DYNAINFO(9),nodraw;
DD11:=DYNAINFO(11),nodraw;
DD20:=DYNAINFO(20),nodraw;
DD21:=DYNAINFO(21),nodraw;
DD28:=DYNAINFO(28),nodraw;
DD29:=DYNAINFO(29),nodraw;
DD30:=DYNAINFO(30),nodraw;
E:=TFILT(CLOSE,DATE+19000000,0,DATE+19000000,0),nodraw;
E1:=DLOW,nodraw;
E2:=IF(CODELIKE('600'),6,3),nodraw;
E3:=BARSLAST(CLOSE/REF(CLOSE,1)>=1.095),nodraw;//上一条件成立位置 上一次条件成立到当前的周期数
E4:=TFILT(CLOSE,DATE+19000000-E3,0,DATE+19000000-E3,0),nodraw;
E5:=BARSSINCE(CLOSE/REF(CLOSE,1)>=1.095,E3),nodraw;
E6:=CONST(CLOSE),nodraw;
E7:=REFDATE(CLOSE,DATE-1),nodraw;
THEYEAR := 1900*10000;
DATE1:= 20180703 - THEYEAR ;
DATE2:= 20180702 - THEYEAR ;
收盘0703:=REFDATE(CLOSE,DATE1),nodraw;
收盘0702:=REFDATE(CLOSE,DATE2),nodraw;
E8:=REF(C,BARSLAST(DATE=20180702)),nodraw;
指定日期:=YEAR==2016 AND MONTH==7 AND DAY==3,NODRAW;
当日收盘:=REF(CLOSE,BARSLAST(指定日期));
昨日收盘:=REF(CLOSE,BARSLAST(YEAR==2018 AND MONTH==7 AND DAY==2));
//MACD
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
DRAWTEXT(CROSS(DIFF,DEA),A11,"M"),coloryellow;
DRAWTEXT(CROSS(DEA,DIFF),A11,"M"),colorgreen;
H1:HOD(H,144),nodraw;
L1:LOD(L,144),nodraw;
DRAWTEXT(H1=144 AND L1=1 AND B>A11,A11*0.95,"HL"),colorred;
LLV1:LLVBARS(L,21),nodraw;
DRAWNUMBER(REF((CROSS(B,G) AND (A1 AND A2 OR D<0)) OR CROSS(B,G),1),A11*0.95,TOSTRING(A11,2));



能量资金谱:

结合能量潮,分析大资金进出,明确标注主力筹码状况。(副图公式)( 顶尖财经 股票学院: http://www.58188.com )

OBV:=MA(SUM(IF(C>REF(C,1),VOL,IF(C<REF(C,1),-V,0)),0)/25000,1);
OBVE:=EMA(OBV,2);
OBVDIFF := EMA(OBVE,3) - EMA(OBVE,8);//
ZLCM:=EMA(WINNER(CLOSE)*70,3);//主力筹码估算}
SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);//散户筹码估算
ZSHTL:=SHCM/(ZLCM+SHCM)*100;//散户套牢筹码比率
SH8:=EMA(ZSHTL,8);
ZZLKP:=ZLCM/(ZLCM+SHCM)*100;//主力控盘筹码比率
zzlkp5:=MA(zzlkp,5);
zzlkpDiff:=EMA(EMA(EMA(zzlkp-zzlkp5,2),2),2);
ZCMZL:=MA(ZLCM+SHCM,13);//市场筹码总量
ZZNTS:=BARSLAST(ZSHTL<90 AND REF(ZSHTL,1)>90);//走牛天数
ZSHJJ:=EMA(ZSHTL,89);//散户警戒}
ZZLJJ:=EMA(ZZLKP,89);//主力警戒}
ZJLRQD:=INTPART(ZZLKP-ZZLJJ);//资金流入强度
ZJLRqd3:=MA(ZJLRqd,3);
STICKLINE(zzljj>REF(zzljj,1) AND zzlkp>zzlkp5 AND OBVDIFF>0 AND EMA(OBVE,3) >REF(EMA(OBVE,3) ,1),110,114,8,0),coloryellow;
STICKLINE( (SH8>zshtl OR SH8<REF(SH8,1)) AND ZJLRqd>0,100,104,8,0),colormagenta;
主力持仓:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3);
指数趋势:=EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV(INDEXL,34)),3);
主力筹码集中度:=WINNER(C)*100;//分析家公式网 www.70822.com
STICKLINE(C>0,20,20,5,1),coloryellow;
STICKLINE(C>0,80,80,8,1),colorblue;
STICKLINE(主力筹码集中度>主力持仓 AND ZZLKP>ZZLKP5 AND ZJLRQD>0 ,80,80,8,1),colormagenta;
FILLRGN(zzlkp,zzlkp5,zzlkp>zzlkp5,colorred,zzlkp<zzlkp5,colorgreen);
FILLRGN(ZJLRQD,0,ZJLRQD>0,colorlired,ZJLRQD<0,colorligreen);
zjlUp:=ZJLRqd-MA(ZJLRqd,5)+ZJLRqd;
FILLRGN(ZJLUP,ZJLRqd,ZJLUP>ZJLRqd,coloryellow,ZJLUP<ZJLRqd,colorblue);
SH8:=EMA(ZSHTL,8);
DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);//散户套牢筹码}
DRAWTEXT(ZCMZL>REF(ZCMZL,1) AND SH8<REF(SH8,1) ,100,'增'),colorwhite;
DRAWTEXT(DKB ,95,'拉'),colorwhite;
DRAWTEXT(ZJLRqd>0 AND ZJLRqd<10 AND ZJLRqd>ZJLRqd3 ,90,'主'),colorwhite;
DRAWTEXT(ZJLRqd>=10 AND ZJLRqd>ZJLRqd3 ,90,'超'),colorwhite;
STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,4,0),colorgreen; //主力控盘筹码}
ZJLRqddiff:=EMA(EMA(EMA(ZJLRqd-ZJLRqd3,2),2),2);
STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,4,0),colorlired; //筑底散兵坑}
STICKLINE(ZZLJJ>REF(ZZLJJ,1) AND ZJLRqd>ZJLRqd3,ZZLKP,ZZLJJ,4,0),colorred; //筑底散兵坑}
STICKLINE(ZSHTL>=90,ZZLKP,0,5,0),COLOR66FFCC; //底部:(ZSHTL>=90),COLOR66FFCC;} {筹码总量上升} IF(ZCMZL,ZCMZL>REF(ZCMZL,1),DRAWNULL),COLOR0066FF,LINETHICK1; {增量资金}; {//------【数值显示】}
散户套牢系数:INTPART(ZSHTL),colorgreen,Linethick2;
主力控盘系数:INTPART(ZZLKP),colorred,Linethick2;
资金流入强度:ZJLRQD,LINETHICK2,colorgray;
主力资金:IF(资金流入强度>0,资金流入强度,DRAWNULL),colorred,Linethick2;
市场筹码总量:INTPART(ZCMZL),colorwhite,NODRAW;
轴:50,colorgreen,DOTLINE,LINETHICK1;
DRAWTEXT(CROSS(主力控盘系数,轴),轴+10,'高度控盘'),coloryellow;
锁仓OK:= ZJLRQD>ZJLRQD3 AND  ZJLRQD>0;
//STICKLINE(zjlrqd>0 AND zzlkpDiff>0,107,107+zzlkpDiff,8,0),colorlired;
//STICKLINE(zjlrqd>0 AND zzlkpDiff>0 AND (zzlkpDiff>REF(zzlkpDiff,1) OR ZJLRqd>ZJLRqd3),107,107+zzlkpDiff,8,0),colorred;
STICKLINE(zzlkp>30 AND zzlkp>MA(zzlkp,5) AND zzljj>REF(zzljj,1) AND ZJLRqd>0 AND C>EMA(C,12),109,105,8,0),colorred;
STICKLINE( 锁仓OK AND zzlkp>30 AND zzlkp>MA(zzlkp,5) AND zzljj>REF(zzljj,1) AND ZJLRqd>0 AND C>EMA(C,12),109,105,8,0),colormagenta;
DRAWTEXT(DKB ,95,'拉'),colorwhite;
DRAWTEXT(ZJLRqd>0 AND ZJLRqd<10 AND ZJLRqd>ZJLRqd3 ,90,'主'),colorwhite;
DRAWTEXT(ZJLRqd>=10 AND ZJLRqd>ZJLRqd3 ,90,'超'),colorwhite;
鱼头鱼肚:IF(DKB AND ZJLRqd>0 AND ZJLRqd>ZJLRqd3, 50,0),colorwhite,Linethick2;
整个鱼:IF(zzlkp>zzlkp5 AND ZJLUP>ZJLRqd, 80,0),colorwyellow,Linethick2;



波动副图:

TR1:=MAX(HIGH-LOW,HIGH-REF(CLOSE,1));

xt:=MAX(TR1,REF(CLOSE,1)-LOW);
yt:MA((EMA(xt,39)/CLOSE)*100,10),coloryellow;
yn:MA((TMA(xt,19/20,1/20)/CLOSE)*100,5),colorgreen;//与上同
DRAWICON(yt>REF(yt,1) AND REF(yt,1)<REF(yt,2),yt,1);
DRAWICON(yt<REF(yt,1) AND REF(yt,1)>REF(yt,2),yt,2);
////////////////////////////////////////////////////////
N:=21;
M:=21;
VPT:=SUM(VOL/EMA(VOL,N)*(CLOSE-REF(CLOSE,1))/REF(CLOSE,1),0);
MAVPT:=EMA(VPT,M);
A:=(VPT-MAVPT)*50,colorwhite;
AA:=(EMA(A,3))*2,coloryellow;//
BB:=EMA(AA,3),colorred;//
CC:=0,colorcyan;
//DRAWICON(CROSS(yt,0),0-0.02,1);
//DRAWICON(CROSS(0,yt),0+0.02,2);
////////////////////////////////////////////////////////
B:=ZIG(3,10),colorred;
G:=MA(B,2),coloryellow;
D:=EMA(B,34),colorgreen;
J:=EMA(B,144),colorligreen;
//DRAWICON(CROSS(B,G),B-0.1,1);
//DRAWICON(CROSS(G,B),G+0.1,2);
DRAWTEXT(CROSS(B,G),yt,"建仓"),coloryellow;
DRAWTEXT(CROSS(G,B),yt,"清仓"),colorgreen;
F:=100*(C-REF(C,1))/REF(C,1);
JD:=IF(C<REF(O,1) AND F<0,1,0);
S1:=JD;
MR:=IF(C<REF(O,2) AND F<0,1,0),LINETHICK0;
S2:=MR;
A1:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1));
A2:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1));
DRAWTEXT(A1 AND A2 OR D<0,yt,'加仓'),coloryellow;
DRAWICON(A1 AND A2,yt,1);
VAR3:=PEAKBARS(3,5,1)<10;
VAR5:=IF(VAR3=1,2,0);
顶:= IF(VAR5=2,2,0);
顶A:=IF(顶>REF(顶,1),1,0),STICK,colorcyan, LINETHICK2;//
DRAWTEXT(顶A=1,yt,'减仓'),colorgreen;
DRAWICON(顶A=1,yt,2);
////////////////////////////////////////////////////////////////
DRAWTEXT(A>REF(A,1) AND REF(A,1)<REF(A,2) AND (CROSS(B,G) AND (A1 AND A2 OR D<0)) ,yt,"Buy"),coloryellow;
DRAWTEXT(CROSS(G,B) ,yt,"Sell"),colorgreen;

上一篇:同花顺源码:买卖点主图,刀哥(多空分界),吸筹趋势

下一篇:同花顺源码:大跌也赚钱组合,MSD交易系统,短线交易系统