安全投机生命线公式 指标 源码[其他软件公式]
这段代码是一个股票的技术分析指标,其中包括了股票的基本面信息和买卖指标。
基本面信息包括了该股票所属板块、总股本、流通A股、流通比例、市盈率、收益、净资产等数据。
买卖指标主要是对该股票进行短线和长线的交易信号。其中,强势指标包括了BB10、BB30、BB05等指标;加仓指标包括了count(cross(BB05,30),5)、NNNN5>ref(NN5,1)等指标;清仓指标包括了count(cross(30,BB05),5)、c>AA30或O>AA30等指标;减仓指标包括了cross(0,MM5)等指标;买入指标是通过count(cross(MM30,0),3)和收益等指标来判断。建议在使用这些指标时,要结合具体个股的情况来做出决策。
另外,还有绝对强势指标和短线强势指标,前者主要是比较该股票与大盘的相对涨幅,后者则是通过资金流量和移动平均线来判断短期内的强势走势。这些指标可以作为辅助工具来判断股票的走势和短期交易信号。
{安全投机}
DRAWTEXTEX(c,1,5,5,'所属板块:' + BLKNAME),ALIGN4,colorred;
DD:=FINANCE( 1);
SS:=FINANCE( 7);
BL:=SS/DD*100;
GG:=FINANCE(33);
TH:=DYNAINFO(39);
JZ:=FINANCE(34);
DRAWTEXTEX(c,1,5,55,'总股本:'+NUMTOSTR(DD,0)+'万股' +'流通A股:'
+NUMTOSTR(SS,0)+'万股'+'流通比例:'+NUMTOSTR(BL,3)+'%'+'市盈率:'
+NUMTOSTR(TH,2)+' 倍'+'收益:'+NUMTOSTR(GG,3)+' 元'+'净资产:'
+NUMTOSTR(JZ,3)+' 元'),COLORGREEN;{http://www.cxh99.com}
生命线:sum(vol*(o+c)/2,88)/sum(vol,88),colorff80ff,linethick2;
分离线:MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1)),colorf4e202,linethick2;
MA17:MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1),linethick2,colorf4e202;
持股线:IF(MA(CLOSE,17)<MA17,MA17,MA(CLOSE,17)),color00d500;
PARTLINE(持股线=MA17,持股线),color80ffff,linethick2;
STICKLINE(c>=ref(c,1),o,c,8,1),color000000;
STICKLINE(c<ref(c,1),o,c,8,1),color000000;
CXH1:=((CLOSE > REF(CLOSE,1)) AND (CLOSE > REF(CLOSE,2)));
CXH2:=((REF(CXH1,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
CXH3:=((REF(CXH2,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
CXH4:=((REF(CXH3,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
CXH5:=((REF(CXH4,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
CXH6:=((REF(CXH5,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
CXH7:=((REF(CXH6,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
CXH8:=((REF(CXH7,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
CXH9:=((REF(CXH8,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
CXHA:=((REF(CXH9,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
CXHB:=((REF(CXHA,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
CXHC:=((REF(CXHB,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
STICKLINE((((((((((((CXH1 OR CXH2) OR CXH3) OR CXH4) OR CXH5) OR CXH6) OR CXH7) OR CXH8) OR CXH9) OR CXHA) OR CXHB) OR CXHC),C,REF(C,1),7,0),Color0000DD;
STICKLINE((((((((((((CXH1 OR CXH2) OR CXH3) OR CXH4) OR CXH5) OR CXH6) OR CXH7) OR CXH8) OR CXH9) OR CXHA) OR CXHB) OR CXHC),L,H,0.5,0),Color0000DD;
CXHD:=((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,2)));
CXHE:=((REF(CXHD,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
CXHF:=((REF(CXHE,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
CXH10:=((REF(CXHF,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
CXH11:=((REF(CXH10,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
CXH12:=((REF(CXH11,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
CXH13:=((REF(CXH12,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
CXH14:=((REF(CXH13,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
CXH15:=((REF(CXH14,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
CXH16:=((REF(CXH15,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
CXH17:=((REF(CXH16,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
CXH18:=((REF(CXH17,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
STICKLINE((((((((((((CXHD OR CXHE) OR CXHF) OR CXH10) OR CXH11) OR CXH12) OR CXH13) OR CXH14) OR CXH15) OR CXH16) OR CXH17) OR CXH18),C,REF(C,1),7 ,0 ),Color00DD00;
STICKLINE((((((((((((CXHD OR CXHE) OR CXHF) OR CXH10) OR CXH11) OR CXH12) OR CXH13) OR CXH14) OR CXH15) OR CXH16) OR CXH17) OR CXH18),H,L,0.5 ,0 ),Color00DD00;
CXH19:=(REF((((((((((((CXHD OR CXHE) OR CXHF) OR CXH10) OR CXH11) OR CXH12) OR CXH13) OR CXH14) OR CXH15) OR CXH16) OR CXH17) OR CXH18),1) AND CXH1);
CXH1A:=(REF((((((((((((CXH1 OR CXH2) OR CXH3) OR CXH4) OR CXH5) OR CXH6) OR CXH7) OR CXH8) OR CXH9) OR CXHA) OR CXHB) OR CXHC),1) AND CXHD);
STICKLINE(CXH19,REF(CLOSE,1),REF(CLOSE,2),7 ,0 ),ColorDDDDDD;
STICKLINE(CXH1A,REF(CLOSE,1),REF(CLOSE,2),7,0),ColorDD8800;
{买卖指标}
AA05:MA(C,5),linethick0;
MM5:=(c-AA05)/AA05*100;
BB05:=atan((aa05/ref(aa05,1)-1)*100)*180/3.1416;
NN5:=sma(ema((AA05-ref(AA05,1))/ref(AA05,1),3)*100,3,1);
NNNN5:ema((NN5-ref(NN5,1)),3),linethick0;
AA10:MA(C,10),linethick0;
AA20:=MA(c,20);
BB10:=atan((aa10/ref(aa10,1)-1)*100)*180/3.1416;
AA30:MA(C,30),linethick0;
MM30:(c-AA30)/AA30*100,linethick0;
CXH1:=(AA20-AA30)>ref((AA20-AA30),1) and AA20>ref(aa20,1) and AA30>ref(AA30,1);
CXH2:=(AA30-AA20)<ref((AA30-AA20),1) and AA20<ref(aa20,1) and AA30<ref(AA30,1);
BB30:=atan((aa30/ref(aa30,1)-1)*100)*180/3.1416;
强势:=filter(BB30>30 and BB10>45 and cross(BB05,60),10);
加仓:=filter(count(cross(BB05,30),5)>=1 and AA05>ref(aa05,1)and MM30>ref(MM30,1) and AA10>ref(AA10,1)
and NNNN5>ref(NN5,1) and NN5>ref(NN5,1),10) ;
清仓:=filter(count(cross(30,BB05),5)>=1 and (c>AA30 or O>AA30) and AA05<ref(aa05,1)and MM30<ref(MM30,1) and AA10<ref(AA10,1),10);
JC:=cross(0,MM5) and MM30<ref(MM30,1) and AA10>ref(AA10,1) ;
减仓:=filter(JC,10);
MR:=count(cross(MM30,0),3)>=1 and MM30>ref(MM30,1) and AA05>ref(AA05,1) and (c/ref(c,1)-1)*100>5 and ref(c,1)<AA30;
买入:=filter(MR,10);
DRAWTEXT((买入),low*0.945,'⊙'),linethick2,ALIGN1,COLORYELLOW;
DRAWTEXT((买入),low*0.965,'⊙'),linethick2,ALIGN1,COLORYELLOW;
DRAWTEXT((买入),low*0.985,'⊙'),linethick2,ALIGN1,COLORYELLOW;
drawtext(减仓,high*1.06,'◇'),ALIGN2,linethick3,colorcyan;
drawtext(减仓,high*1.05,'◇'),ALIGN1,linethick3,colorcyan;
drawtext(减仓,high*1.059,'◇'),ALIGN0,linethick3,colorcyan;
DRAWTEXT((加仓),low*0.985,'⊙'),linethick2,ALIGN1,colorWhite;
DRAWTEXT((加仓),low*0.965,'⊙'),linethick2,ALIGN1,colorWhite;
DRAWTEXT((加仓),low*0.945,'⊙'),linethick2,ALIGN1,colorWhite;
DRAWTEXT((强势),low*0.985,'⊙'),linethick2,ALIGN1,COLORred;
DRAWTEXT((强势),low*0.965,'⊙'),linethick2,ALIGN1,COLORred;
{短线强势}
流通:=(AMOUNT / VOL);
资金流量:=(close-ref(close,1))*流通;
CXH111:=SMA(资金流量,10,1);
MID111:=MA(CXH111,26);
UPPER111:=MID111 + 2*STD(CXH111,26);
短线强势:=CROSS(CXH111,UPPER111) and C>=O;
STICKLINE(短线强势,CLOSE ,OPEN,7,0),color00AAFF;
大盘:=EMA(INDEXC,500)/EMA(C,500);
大盘线:INDEXC/大盘,LINETHICK1,COLORYELLOW;
{绝对强势}
aa_Q:=(C/REF(C,1)-1)*100;
bb_Q:=(INDEXC/REF(INDEXC,1)-1)*100;
dd_Q:=aa_Q>2.8 AND aa_Q-bb_Q>2;
DIFF_Q := EMA(CLOSE,12) - EMA(CLOSE,26);
DEA_Q:= EMA(DIFF_Q,9);
MACD_Q := 2*(DIFF_Q-DEA_Q);
ee_Q:=MACD_Q>0 and macd_Q>=ref(macd_Q,1);
ma10_Q:=MA(C,10);
ma20_Q:=MA(C,20);
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容