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

趋势买卖(同花顺公式源码)

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

趋势买卖

//常用估值参数计算开始
NP=99;
TopDown=(C-(HHV(HIGH,NP)))/HHV(HIGH,NP);
TpDn99:IF(TopDown>-1,TopDown,'NA'),nodraw,colorgreen;
BottomUp=(C-(LLV(LOW,NP)))/LLV(LOW,NP);
BtUp99:IF(BottomUp<115,BottomUp,'NA'),nodraw,colorred;
//市净率
PB0=CLOSE/(GDQYHJ/ZGB);
PB:IF(PB0<115 AND PB0>0,PB0,'NA'),nodraw,COLOR00FF00;
//市净率:PB;
//市盈率TTM
LASTJLR=REP(&JLR,2);
LASTYNJLR=YEARREP(&JLR,1);
TEMP=IF(LASTYNJLR==JLR,0,LASTYNJLR-LASTJLR);
MGSY_TTM=(JLR+TEMP)/ZGB;
PE_TTM=CLOSE/MGSY_TTM;
PE_T:IF(PE_TTM<115 AND PE_TTM>0,PE_TTM,'NA'),nodraw,COLOR0000EE;
//市盈率TTM:PE_T;
/*季度报表ROE*/
X1=JLR;
X2=GDQYHJ;
//季报ROE:X1/X2;
/*ROE_TTM*/
lastjly=REP(&JLR,2);
lastyear=YEARREP(&JLR,1);
xxx=IF(lastyear==JLR,0,lastyear-lastjly);
ROE_TTM=(xxx+JLR)/X2;
ROE_T:IF(ROE_TTM<115 AND ROE_TTM>0,ROE_TTM,'NA'),nodraw,colorlired;
换手0=VOL/SHGZG;
换手:IF(换手0<115 AND 换手0>0,换手0,'NA'),nodraw,Color00eeaa;
量比0=VOL/MA(REF(VOL,1),5);
量比:IF(量比0<115 AND 量比0>0,量比0,'NA'),nodraw,Coloraa00ff;
//常用估值参数计算结束
//zy:=CLOSE/INDEXC*2000;
//zy:=CLOSE/INDEXDATA("1A0001",&CLOSE)*2000;
zy:=CLOSE/INDEXDATA("1A0001",&CLOSE);
/*
zyh=HHV(zy,241);
zyl=LLV(zy,241);
zym=(zyh+zyl)/2;
zya=(zyh-zyl)/2;
//正负100变程归一化
zyu=(zy-zym)/zya*100;
zy1:EMA(zyu,3),colorwhite;
zy2:EMA(zyu,17),coloryellow;
zy3:EMA(zyu,34),linethick2,Colorff00ff;
*/
zy1:EMA(zy,3),colorwhite;
zy2:EMA(zy,17),coloryellow;
zy3:EMA(zy,34),linethick2,Colorff00ff;
BU:= CROSS(zy1,zy3) AND (REF(zy1,2) < zy2 OR REF(zy1,1) < zy2) AND zy3 > REF(zy3,2) AND zy2 > REF(zy2,2) AND zy1 > REF(zy1,2);
DRAWTEXT(BU,zy1,'关注 '),colorwhite;
//=================================
//庄影难逃
趋势线:=(CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100 ,  COLORaabbdd;
//TRndSlp2:SLOPE(SLOPE(EMA(zy3,68),3),2),nodraw;
Botm_Cond:=((REF(趋势线,1)<REF(趋势线,2)  AND 趋势线<-20 AND 趋势线>-25) AND  趋势线>=REF(趋势线,1)) OR (REF(CROSS(-20,趋势线),1) AND CROSS(趋势线,-20));
DRAWTEXT(Botm_Cond,zy1,'底区'),colorcyan;
//底区:=IF(bb,300,-20),colorcyan;
Chance_Cond:=((REF(趋势线,1)<REF(趋势线,2)  AND 趋势线<-25 AND 趋势线>-30) AND 趋势线>=REF(趋势线,1)) OR (REF(CROSS(-25,趋势线),1) AND CROSS(趋势线,-25));
DRAWTEXT(Chance_Cond ,zy1,'莫失机会'),color00ff00;
//莫失机会:=IF(cc,400,-25),color00ff00;
BetAll_Cond:=((REF(趋势线,1)<REF(趋势线,2)  AND 趋势线<-30) AND 趋势线>=REF(趋势线,1)) OR (REF(CROSS(-30,趋势线),1) AND CROSS(趋势线,-30)) OR 趋势线=-30;
DRAWTEXT(BetAll_Cond,zy1,'砸锅买'),coloryellow;
//砸锅买:IF(aa,500,-30),coloryellow;
//底部快显:=IF(CROSS(-20,趋势线),100,-20),linethick2,colorf0f000;
//DRAWTEXT(CROSS(-20,趋势线), zy1,'★底部快显'),colorf0f000;
//机会来临:=IF(CROSS(-25,趋势线),150,-25),linethick2,colorf00ff0;
DRAWTEXT(CROSS(-25,趋势线),zy1,'★机会来临'),colorf00ff0;
//砸锅等:=IF(CROSS(-30,趋势线),200,-30),linethick2,colorwhite;
DRAWTEXT(CROSS(-30,趋势线),zy1,'★砸锅等'),colorwhite;
//======================( 股民学院: http://www.58188.com )

上一篇:底部吸筹庄散线(同花顺公式源码)

下一篇:问道巅峰(同花顺公式源码)