波段红主图通达信公式 主图 源码附图
JJJ:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3));
DDD:=(DYNAINFO(5)<0.01 || DYNAINFO(6)<0.01);
JJJT:=IF(DDD,1,(JJJ<(DYNAINFO(5)+0.01) && JJJ>(DYNAINFO(6)-0.01)));
CYC3:IF(JJJT,0.01*EMA(AMOUNT,3)/EMA(VOL,3),EMA((HIGH+LOW+CLOSE)/3,3));
CYC5:IF(JJJT,0.01*EMA(AMOUNT,5)/EMA(VOL,5),EMA((HIGH+LOW+CLOSE)/3,5));
DRAWBAND(CYC3,RGB(230,0,50),CYC5,RGB(00,50,250));
CYC34:IF(JJJT,0.01*EMA(AMOUNT,34)/EMA(VOL,34),EMA((HIGH+LOW+CLOSE)/3,34)),COLORGREEN,LINETHICK2;
IF(CYC34>REF(CYC34,1),CYC34,DRAWNULL),COLORMAGENTA,LINETHICK2;
DRAWKLINE(H,O,L,C);
{涨停K线}
ZT:=REF(C,1)*1.1-C<0.01 AND H=C;
突破:=ZT;
STICKLINE(突破,C,O,3,0),COLOR000088;
STICKLINE(突破,C,O,2.5,0),COLOR000099;
STICKLINE(突破,C,O,2,0),COLOR0000AA;
STICKLINE(突破,C,O,1.5,0),COLOR0000BB;
STICKLINE(突破,C,O,1.0,0),COLOR0000DD;
STICKLINE(突破,C,O,0.5,0),COLOR0000FF;{//红柱}
STICKLINE(突破,C,O,0.5,0),COLORMAGENTA;
B:=SMA(CLOSE,20,1)*2-REF(SMA(CLOSE,20,1),1);
分水岭:=SMA(IF(MA(CLOSE,20)<B,B,MA(CLOSE,20)),3,1);
操作线:=SMA(分水岭-(MA(C,5)-分水岭),2,1),COLORLIMAGENTA,LINETHICK1;
OUTF:=CROSS(CYC5,操作线);
DRAWICON(OUTF,操作线,13);
AC:=(2*C+H+L)/4;
M25:=MA(AC,25);
UB:=M25+2*STD(AC,25),COLORYELLOW,DOTLINE;
LB:=M25-2*STD(AC,25),COLORYELLOW,DOTLINE;
VAR1:=CLOSE-LOW;
VAR2:=HIGH-LOW;
VAR3:=CLOSE-HIGH;
VAR4:=IF(HIGH>LOW,(VAR1/VAR2+VAR3/VAR2)*VOL,0);
HPTP:=SUM(VAR4,10)/10000,COLORSTICK;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
TKXL:=(DIF-DEA)*2;
XVYO:=UPNDAY(TKXL,1);
HH:=REF(H,5)=HHV(H,11);
LL:=REF(L,5)=LLV(L,11);
FG01:=BACKSET(HH,6)>BACKSET(HH,5);
FD01:=BACKSET(LL,6)>BACKSET(LL,5);
{STICKLINE(V/REF(V,1)>2,OPEN,CLOSE,1,0),COLOR00FFFF;}
FG02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND MA(C,5)>MA(C,10),FG01,IF(BARSLAST(FD01)>BARSLAST(FG01),FG01,0));
FD02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND MA(C,10)>MA(C,5),FD01,IF(BARSLAST(FG01)>BARSLAST(FD01),FD01,0));
FG0:=FG02 AND H=HHV(H,BARSLAST(FD02));
FD0:=FD02 AND L=LLV(L,BARSLAST(FG02));
GQ:=L>REF(H,1) AND DAY!=REF(DAY,1);
DQ:=H<REF(L,1) AND DAY!=REF(DAY,1);
FGH:=REF(H,BARSLAST(FG0));
FGL:=REF(L,BARSLAST(FG0));
FGH1:=REF(H,BARSLAST(FG0)+1);
FGL1:=REF(L,BARSLAST(FG0)+1);
FGL2:=REF(L,BARSLAST(FG0)+2);
FDH2:=REF(H,BARSLAST(FD0)+2);
FDH:=REF(H,BARSLAST(FD0));
FDL:=REF(L,BARSLAST(FD0));
FDH1:=REF(H,BARSLAST(FD0)+1);
FDL1:=REF(L,BARSLAST(FD0)+1);
FGZL:=IF(FGH1<FGL,FGL,IF(FGL<=FGL1,FGL2,FGL1));
FDZH:=IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1));
FG1:=FGH>FDZH AND FG0;
FD1:=FDL<FGZL AND FD0;
FG:=FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL;
FD:=FD1 AND FDL<FGL AND FDH<FGH AND FDH1<FGH;
BH0:=(H<=REF(H,1) AND L>=REF(L,1)) OR (H>=REF(H,1) AND L<=REF(L,1));
BHG:=COUNT(BH0,BARSLAST(FD0));
BHD:=COUNT(BH0,BARSLAST(FG0));
BGQ:=COUNT(GQ,BARSLAST(FD0));
BDQ:=COUNT(DQ,BARSLAST(FG0));
BK0:=IF(BHG>0,BHG+2,IF(BHD,BHD+2,3));
BK:=IF(BGQ,BK0-BGQ,IF(BDQ,BK0-BDQ,BK0));
G1X:=(FG AND BARSLAST(FD)>BK);
D1X:=(FD AND BARSLAST(FG)>BK);
G1:=(FG0 AND REF(H,BARSLAST(FG0))>=REF(H,BARSLAST(G1X)) AND BARSLAST(D1X)>BARSLAST(G1X))
OR (FG1 AND COUNT(GQ,BARSLAST(FD1))>0 AND REF(H,BARSLAST(FG1))>REF(H,BARSLAST(G1X)));
D1:=(FD0 AND REF(L,BARSLAST(FD0))<=REF(L,BARSLAST(D1X)) AND BARSLAST(G1X)>BARSLAST(D1X))
OR (FD1 AND COUNT(DQ,BARSLAST(FG1))>0 AND REF(L,BARSLAST(FD1))<REF(H,BARSLAST(D1X)));
G1H:=IF(BARSLAST(D1)>BARSLAST(G1),REF(H,BARSLAST(G1)),REF(H,BARSLAST(D1)));
D1L:=IF(BARSLAST(G1)>BARSLAST(D1),REF(L,BARSLAST(D1)),REF(L,BARSLAST(G1)));
G2:=G1 AND H=HHV(G1H,BARSLAST(D1)+1) AND H>REF(H,1) AND BARSLAST(D1)>BARSLAST(G1);
D2:=D1 AND L=LLV(D1L,BARSLAST(G1)+1) AND L<REF(L,1) AND BARSLAST(G1)>BARSLAST(D1);
NN:=G2 OR (FG0 AND REF(H,BARSLAST(FG0))>REF(H,BARSLAST(G2)) AND BARSLAST(D2)>BARSLAST(G2));
UU:=D2 OR (FD0 AND REF(L,BARSLAST(FD0))<REF(L,BARSLAST(D2)) AND BARSLAST(G2)>BARSLAST(D2));
趋势向上:=DRAWLINE(UU,L,NN,H,0),COLORYELLOW,DOTLINE;
趋势向下:=DRAWLINE(NN,H,UU,L,0),COLORWHITE,DOTLINE;
找顶线:DRAWLINE(NN,H,REF(NN,1),REF(H,1),1),COLORLIBLUE,LINETHICK1;
找底线:DRAWLINE(UU,L,REF(UU,1),REF(L,1),1),COLORMAGENTA,LINETHICK1;
DRAWNUMBER(UU,L*0.995,L);
DRAWNUMBER(NN,H*1.01,H);
XG:CROSS(C,找顶线) AND 找顶线>0 AND HPTP AND XVYO,NODRAW;
DRAWICON(XG,LOW,1);
DRAWTEXT(ISLASTBAR,找顶线,VAR2STR(找顶线,2)),COLORGREEN;
DRAWTEXT(ISLASTBAR,找底线,VAR2STR(找底线,2)),COLORMAGENTA;
TJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>O;
立桩量:=FILTER(TJ1,0);
TJ2:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));
STICKLINE(CLOSE,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),2,0),COLORYELLOW;
{STICKLINE(CLOSE,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),2,0),COLORGREEN;}
STICKLINE(立桩量,O,C,0.5,0),COLORYELLOW;
A1:=C>REF(C,4);
NT:=BARSLASTCOUNT(A1);
TJ11:=NT=9;
TJ13:=ISLASTBAR AND BETWEEN(NT,1,8);
AY:=(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT;
DRAWTEXT(AY>0,H*1.02,VAR2STR(AY,0)),COLORFF00FF;
DRAWTEXT(NT=9,H*1.02,'9'),COLORGREEN;
BA1:=C<REF(C,4);
NT0:=BARSLASTCOUNT(BA1);
TJ21:=NT0=9 ;
TJ23:=ISLASTBAR AND BETWEEN(NT0,1,8);
AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0;
DRAWTEXT(AY1>0,L*0.98,VAR2STR(AY1,0)),COLORGREEN;
DRAWTEXT(NT0=9,L*0.98,'9'),COLORFF00FF;
LC:=REF(CLOSE,1);
RSI:SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100,NODRAW;
DRAWTEXT(CROSS(80,RSI) ,HIGH*1.01,'见顶'),COLORYELLOW;
DRAWTEXT(CROSS(RSI,20),LOW*0.992,'见底'),COLORWHITE;
RSVA:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSVA,3,1)COLORWHITE;
D1A:=SMA(K1,3,1),COLORYELLOW;
J:=3*K1-2*D1A,COLORMAGENTA,LINETHICK2;
DRAWICON(CROSS(J,0),L+0.01,5);
DRAWICON(CROSS(100,J),H+0.03,4);
RSVB:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
KB:=SMA(RSVB,3,1),COLORWHITE,NODRAW;
DB:=SMA(KB,3,1),NODRAW;
JA:=3*KB-2*DB,COLORMAGENTA,LINETHICK2;
DRAWICON(CROSS(JA,0),L,18);
DRAWICON(CROSS(100,JA),H*1.005,15);
{STICKLINE(CROSS(JA,0),O,C,2,0),COLORYELLOW;}
STICKLINE(CROSS(JA,0),H,L,0,1),COLORYELLOW;
STICKLINE(CROSS(JA,0),C,O,3.0,0),COLOR117777;
STICKLINE(CROSS(JA,0),C,O,2.5,0),COLOR119999;
STICKLINE(CROSS(JA,0),C,O,2.0,0),COLOR11BBBB;
STICKLINE(CROSS(JA,0),C,O,1.5,0),COLOR11DDDD;
STICKLINE(CROSS(JA,0),C,O,1.0,0),COLOR44FFFF;
STICKLINE(CROSS(JA,0),CLOSE,OPEN,0.5,0),COLORMAGENTA;
STICKLINE(CROSS(100,JA),C,O,3,0),COLOR008800;
{STICKLINE(TGLXS<0,100,100+TGLXS,2.8,0),COLOR009900;}
STICKLINE(CROSS(100,JA),C,O,2.5,0),COLOR00AA00;
STICKLINE(CROSS(100,JA),C,O,2,0),COLOR00BB00;
{STICKLINE(TGLXS<0,100,100+TGLXS,1.8,0),COLOR00CC00;}
STICKLINE(CROSS(100,JA),C,O,1.5,0),COLOR00DD00;
{STICKLINE(TGLXS<0,100,100+TGLXS,1.2,0),COLOR00EE00;}
STICKLINE(CROSS(100,JA),C,O,1,0),COLOR00FF00;{//绿柱}
STICKLINE(CROSS(100,JA),O,C,0.5,0),COLORBLUE;
SAR1:SAR(10,2,20),COLORCYAN,NODRAW;
IF(SAR1>C,SAR1,DRAWNULL),COLORCYAN,CIRCLEDOT;
IF(SAR1<C,SAR1,DRAWNULL),COLORRED,CIRCLEDOT;
收盘线:DRAWLINE(CURRBARSCOUNT=TOTALBARSCOUNT,CONST(C),CURRBARSCOUNT=1,C,3),COLORBROWN,DOTLINE;
TM:=1200823;
涨停:IF(DATE<TM,ZTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),ZTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORRED;
跌停:IF(DATE<TM,DTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),DTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORGREEN;
明涨停:IF(DATE<TM,C*IF(CODELIKE('688'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)),C*(IF(CODELIKE('688') OR CODELIKE('300'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)))),NODRAW,COLORLIMAGENTA;
明跌停:IF(DATE<TM,C*IF(CODELIKE('688'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)),C*(IF(CODELIKE('688') OR CODELIKE('300'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)))),NODRAW,COLORFFFF00;
所属板块:=STRCAT('所属板块: ',STRCAT(STRCAT(STRCAT('[行业]-',HYBLOCK),STRCAT(' [地域]-',DYBLOCK)),STRCAT(' [概念]-',GNBLOCK)));
总股本:=STRCAT(STRCAT('总股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'亿');
流通盘:=STRCAT(STRCAT(' 流通盘: ',CON2STR(CAPITAL/1000000,2)),'亿');
全流通:=STRCAT(' 全流通: ',CON2STR((CAPITAL/1000000)/(TOTALCAPITAL/1000000),2));
市值:=STRCAT(STRCAT(' 流通市值: ',CON2STR((CAPITAL/1000000)*C,2)),'亿');
股本市值:=STRCAT('股本市值: ',STRCAT(STRCAT(STRCAT(总股本,流通盘),全流通),市值));
{业绩}
投资收益:=STRCAT(' 投资收益: ',CON2STR(FINANCE(24)*100,2));
净资收益率:=STRCAT(' 净资收益率: ',CON2STR(FINANCE(29)/FINANCE(19)*100,2));
毛利率:=STRCAT(' 毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));
主营利润率:=STRCAT(' 主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2));
当前业绩:=STRCAT('当前业绩: ',STRCAT(STRCAT(净资收益率,毛利率),主营利润率));
DRAWTEXT_FIX(ISLASTBAR,0.005,0.06,0,所属板块),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.12,0,股本市值),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.18,0,当前业绩),COLORGREEN;
DRAWTEXT_FIX(1,0.005,0.24,0,'净利同比:'),COLOR99CC32;
DRAWNUMBER_FIX(1,0.055,0.24,0,CONST(FINANCE(43))),COLORYELLOW;
DRAWTEXT_FIX(1,0.112,0.24,0,'净利润:'),COLORWHITE;
DRAWNUMBER_FIX(1,0.157,0.24,0,CONST(FINANCE(30)/10000)),COLORFF00FF;
DRAWTEXT_FIX(1,0.005,0.30,0,'投资收益:'),COLORWHITE;
DRAWNUMBER_FIX(1,0.055,0.30,0,CONST(FINANCE(24)/1000000)),COLORFF00FF;
主营业增长率:=FINANCE(44);
每股净资产:=CONST(FINANCE(34));
每股收益:=CONST(FINANCE(38));
净利润增长率:=FINANCE(43);
市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));
现金负债比:=(FINANCE(25)/FINANCE(15));
每股未分配:=CONST(FINANCE(32));
每股公积金:=CONST(FINANCE(18));
SY01:=净资收益率>3;
SY02:=净资收益率>0.01 AND 净资收益率<=3;
SY03:=主营利润率>2;
SY04:=主营利润率>0;
SY05:=主营业增长率>1;
SY06:=主营业增长率>0;
SY07:=净利润增长率>2;
SY08:=净利润增长率>0.2;
SY09:=每股收益>0.01;
SY10:= 每股收益>0.001;
SY11:=每股净资产>2;
SY12:=每股净资产>0.01;
SY13:=每股未分配>0.5;
SY14:=每股未分配>0.001;
SY15:=每股公积金>0.5;
SY16:=每股公积金>0.002;
SY17:=每股未分配>=2 AND 每股公积金>=2;
SY18:=每股未分配<2 OR 每股公积金<2;
优秀:=SY01 AND SY03 AND SY05 AND SY07 AND SY09 AND SY11
AND SY13 AND SY15;
较好:=SY02 AND SY04 AND SY06 AND SY08 AND SY10 AND SY12
AND SY14 AND SY16;
一般:=NOT(优秀) AND NOT(较好);
DRAWTEXT_FIX(优秀 AND 较好=0,0.45,0,0,'基本面:优秀!'),COLORMAGENTA;
DRAWTEXT_FIX(较好,0.45,0,0,'基本面:较好!'),COLORRED;
DRAWTEXT_FIX(一般,0.45,0,0,'基本面:一般!'),COLORGREEN;
DRAWTEXT_FIX(SY17,0.65,0,0,'高送转潜力:是!'),COLORMAGENTA;
DRAWTEXT_FIX(SY18,0.65,0,0,'高送转潜力:否!'),COLORGREEN;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
该公式包含未来函数:CAPITAL
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
JJJ赋值:IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3))
DDD赋值:(DYNAINFO(5)<0.01 || DYNAINFO(6)<0.01)
JJJT:=IF(DDD,1,(JJJ<(DYNAINFO(5)+0.01) && JJJ>(DYNAINFO(6)-0.01)))
输出CYC3:IF(JJJT,0.01*AMOUNT的3日指数移动平均/成交量的3日指数移动平均,EMA((最高价+最低价+收盘价)/3,3))
输出CYC5:IF(JJJT,0.01*AMOUNT的5日指数移动平均/成交量的5日指数移动平均,EMA((最高价+最低价+收盘价)/3,5))
DRAWBAND(CYC3,RGB(230,0,50),CYC5,RGB(00,50,250))
CYC34:IF(JJJT,0.01*AMOUNT的34日指数移动平均/成交量的34日指数移动平均,EMA((最高价+最低价+收盘价)/3,34)),画绿色, 线宽为2
IF(CYC34>1日前的CYC34,CYC34,DRAWNULL),COLORMAGENTA, 线宽为2
DRAWKLINE(H,O,L,C)
{涨停K线}
ZT赋值:1日前的C*1.1-C<0.01 AND H=C
突破赋值:ZT
当满足条件突破时,在C和O之间画柱状线
当满足条件突破时,在C和O之间画柱状线
当满足条件突破时,在C和O之间画柱状线
当满足条件突破时,在C和O之间画柱状线
当满足条件突破时,在C和O之间画柱状线
当满足条件突破时,在C和O之间画柱状线
当满足条件突破时,在C和O之间画柱状线
收盘价的20日[1日权重]移动平均
分水岭赋值:SMA(IF(MA(收盘价,20)
操作线赋值:SMA(分水岭-(MA(C,5)-分水岭),2,1),COLORLIMAGENTA,LINETHICK1
OUTF赋值:CYC5上穿操作线
当满足条件OUTF时,在操作线和13之间画图标
AC赋值:(2*C+H+L)/4
M25赋值:AC的25日简单移动平均
UB赋值:M25+2*AC的25估算标准差,COLORYELLOW,DOTLINE
LB赋值:M25-2*AC的25估算标准差,COLORYELLOW,DOTLINE
VAR1赋值:收盘价-最低价
VAR2赋值:最高价-最低价
VAR3赋值:收盘价-最高价
VAR4赋值:IF(最高价>最低价,(VAR1/VAR2+VAR3/VAR2)*成交量,0)
HPTP赋值:10的VAR4日累和/10000,COLORSTICK
DIF赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均
DEA赋值:DIF的9日指数移动平均
TKXL赋值:(DIF-DEA)*2
XVYO赋值:UPNDAY(TKXL,1)
HH赋值:5日前的H=11日内H最高值
LL赋值:5日前的L=11日内L最低值
FG01赋值:BACKSET(HH,6)>BACKSET(HH,5)
FD01赋值:BACKSET(LL,6)>BACKSET(LL,5)
{STICKLINE(V/1日前的V>2,开盘价,收盘价,1,0),COLOR00FFFF
}
FG02赋值:IF(上次FG01距今天数=BARSLAST(FD01) AND C的5日简单移动平均>C的10日简单移动平均,FG01,IF(BARSLAST(FD01)>上次FG01距今天数,FG01,0))
FD02赋值:IF(上次FG01距今天数=BARSLAST(FD01) AND C的10日简单移动平均>C的5日简单移动平均,FD01,IF(上次FG01距今天数>BARSLAST(FD01),FD01,0))
FG0赋值:FG02 AND H=HHV(H,上次FD02距今天数)
FD0赋值:FD02 AND L=LLV(L,上次FG02距今天数)
GQ赋值:L>1日前的H AND DAY!=1日前的DAY
DQ赋值:H<1日前的L AND DAY!=1日前的DAY
FGH赋值:REF(H,上次FG0距今天数)
FGL赋值:REF(L,上次FG0距今天数)
FGH1:=REF(H,上次FG0距今天数+1)
FGL1:=REF(L,上次FG0距今天数+1)
FGL2:=REF(L,上次FG0距今天数+2)
FDH2赋值:REF(H,上次FD0距今天数+2)
FDH赋值:REF(H,上次FD0距今天数)
FDL赋值:REF(L,上次FD0距今天数)
FDH1:=REF(H,上次FD0距今天数+1)
FDL1:=REF(L,上次FD0距今天数+1)
FGZL赋值:IF(FGH1
FDZH赋值:IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1))
FG1赋值:FGH>FDZH AND FG0
FD1赋值:FDL
FG赋值:FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL
FD赋值:FD1 AND FDL
BH0:=(H<=1日前的H AND L>=1日前的L) OR (H>=1日前的H AND L<=1日前的L)
BHG:=COUNT(BH0,上次FD0距今天数)
BHD:=COUNT(BH0,上次FG0距今天数)
BGQ赋值:COUNT(GQ,上次FD0距今天数)
BDQ赋值:COUNT(DQ,上次FG0距今天数)
BK0:=IF(BHG>0,BHG+2,IF(BHD,BHD+2,3))
BK:=IF(BGQ,BK0-BGQ,IF(BDQ,BK0-BDQ,BK0))
G1X赋值:(FG AND 上次FD距今天数>BK)
D1X赋值:(FD AND 上次FG距今天数>BK)
G1赋值:(FG0 AND REF(H,上次FG0距今天数)>=REF(H,BARSLAST(G1X)) AND BARSLAST(D1X)>BARSLAST(G1X))
OR (FG1 AND COUNT(GQ,BARSLAST(FD1))>0 AND REF(H,BARSLAST(FG1))>REF(H,BARSLAST(G1X)))
D1赋值:(FD0 AND REF(L,上次FD0距今天数)<=REF(L,BARSLAST(D1X)) AND BARSLAST(G1X)>BARSLAST(D1X))
OR (FD1 AND COUNT(DQ,BARSLAST(FG1))>0 AND REF(L,BARSLAST(FD1))[
G1H:=IF(上次D1距今天数>BARSLAST(G1),REF(H,BARSLAST(G1)),REF(H,上次D1距今天数))]
D1L:=IF(上次G1距今天数>BARSLAST(D1),REF(L,BARSLAST(D1)),REF(L,上次G1距今天数))
G2赋值:G1 AND H=HHV(G1H,上次D1距今天数+1) AND H>1日前的H AND 上次D1距今天数>BARSLAST(G1)
D2赋值:D1 AND L=LLV(D1L,上次G1距今天数+1) AND L<1日前的L AND 上次G1距今天数>BARSLAST(D1)
NN赋值:G2 OR (FG0 AND REF(H,上次FG0距今天数)>REF(H,BARSLAST(G2)) AND BARSLAST(D2)>BARSLAST(G2))
UU赋值:D2 OR (FD0 AND REF(L,上次FD0距今天数)[BARSLAST(D2))]
趋势向上赋值:DRAWLINE(UU,L,NN,H,0),COLORYELLOW,DOTLINE
趋势向下赋值:DRAWLINE(NN,H,UU,L,0),画白色,DOTLINE
输出找顶线:DRAWLINE(NN,H,1日前的NN,1日前的H,1),COLORLIBLUE,LINETHICK1
输出找底线:DRAWLINE(UU,L,1日前的UU,1日前的L,1),COLORMAGENTA,LINETHICK1
DRAWNUMBER(UU,L*0.995,L)
DRAWNUMBER(NN,H*1.01,H)
输出XG:C上穿找顶线 AND 找顶线>0 AND HPTP AND XVYO,NODRAW
当满足条件XG时,在最低价和1之间画图标
DRAWTEXT(ISLASTBAR,找顶线,VAR2STR(找顶线,2)),画绿色
DRAWTEXT(ISLASTBAR,找底线,VAR2STR(找底线,2)),COLORMAGENTA
TJ1赋值:成交量=10日内成交量最高值 AND 成交量>2*1日前的成交量 AND 收盘价>O
立桩量赋值:TJ1的0过滤
TJ2赋值:IF(上次立桩量距今天数=1 AND 收盘价>1日前的最高价,1,IF(上次立桩量距今天数=2 AND 收盘价>2日前的最高价,1,IF(上次立桩量距今天数=3 AND 收盘价>3日前的最高价,1,0)))
STICKLINE(收盘价,REF(最低价,上次立桩量距今天数),REF(最低价,上次立桩量距今天数),2,0),COLORYELLOW
{STICKLINE(收盘价,REF(最高价,上次立桩量距今天数),REF(最高价,上次立桩量距今天数),2,0),画绿色
当满足条件立桩量时,在O和C之间画柱状线
A1赋值:C>4日前的C
NT赋值:BARSLASTCOUNT(A1)
TJ11:=NT=9
TJ13:=ISLASTBAR AND BETWEEN(NT,1,8)
AY赋值:(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT
DRAWTEXT(AY>0,H*1.02,VAR2STR(AY,0)),COLORFF00FF
当满足条件NT=9时,在H*1.02和'9'位置书写文字
BA1赋值:C<4日前的C
NT0:=BARSLASTCOUNT(BA1)
TJ21:=NT0=9
TJ23:=ISLASTBAR AND BETWEEN(NT0,1,8)
AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0
DRAWTEXT(AY1>0,L*0.98,VAR2STR(AY1,0)),画绿色
当满足条件NT0=9时,在L*0.98和'9'位置书写文字
LC赋值:1日前的收盘价
输出RSI:SMA(收盘价-LC和0较大值,12,1)/SMA(收盘价-LC的绝对值,12,1)*100,NODRAW
DRAWTEXT(80上穿RSI ,最高价*1.01,'见顶'),COLORYELLOW
DRAWTEXT(RSI上穿20,最低价*0.992,'见底'),画白色
RSVA赋值:(收盘价-9日内最低价最低值)/(9日内最高价最高值-9日内最低价最低值)*100
RSVA的3日[1日权重]移动平均
K1的3日[1日权重]移动平均
J赋值:3*K1-2*D1A,COLORMAGENTA, 线宽为2
DRAWICON(J上穿0,L+0.01,5)
DRAWICON(100上穿J,H+0.03,4)
RSVB赋值:(收盘价-27日内最低价最低值)/(27日内最高价最高值-27日内最低价最低值)*100
RSVB的3日[1日权重]移动平均
KB的3日[1日权重]移动平均
JA:=3*KB-2*DB,COLORMAGENTA, 线宽为2
DRAWICON(JA上穿0,L,18)
DRAWICON(100上穿JA,H*1.005,15)
{STICKLINE(JA上穿0,O,C,2,0),COLORYELLOW
}
STICKLINE(JA上穿0,H,L,0,1),COLORYELLOW
STICKLINE(JA上穿0,C,O,3.0,0),COLOR117777
STICKLINE(JA上穿0,C,O,2.5,0),COLOR119999
STICKLINE(JA上穿0,C,O,2.0,0),COLOR11BBBB
STICKLINE(JA上穿0,C,O,1.5,0),COLOR11DDDD
STICKLINE(JA上穿0,C,O,1.0,0),COLOR44FFFF
STICKLINE(JA上穿0,收盘价,开盘价,0.5,0),COLORMAGENTA
STICKLINE(100上穿JA,C,O,3,0),COLOR008800
当满足条件TGLXS<0时,在100和100+TGLXS之间画柱状线
}
STICKLINE(100上穿JA,C,O,2.5,0),COLOR00AA00
STICKLINE(100上穿JA,C,O,2,0),COLOR00BB00
当满足条件TGLXS<0时,在100和100+TGLXS之间画柱状线
}
STICKLINE(100上穿JA,C,O,1.5,0),COLOR00DD00
当满足条件TGLXS<0时,在100和100+TGLXS之间画柱状线
}
STICKLINE(100上穿JA,C,O,1,0),COLOR00FF00
{//绿柱}
STICKLINE(100上穿JA,O,C,0.5,0),COLORBLUE
输出SAR1:SAR(10,2,20),画青色,NODRAW
如果SAR1>C返回SAR1否则返回DRAWNULL
如果SAR1
输出收盘线:DRAWLINE(CURRBARSCOUNT=TOTALBARSCOUNT,CONST(C),CURRBARSCOUNT=1,C,3),COLORBROWN,DOTLINE
TM赋值:1200823
输出涨停:IF(DATE
输出跌停:IF(DATE
明输出涨停:IF(DATE
明输出跌停:IF(DATE
所属板块:=STRCAT('所属板块: ',STRCAT(STRCAT(STRCAT('[行业]-',HYBLOCK),STRCAT(' [地域]-',DYBLOCK)),STRCAT(' [概念]-',GNBLOCK)))
总股本:=STRCAT(STRCAT('总股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'亿')
流通盘:=STRCAT(STRCAT(' 流通盘: ',CON2STR(当前流通股本/1000000,2)),'亿')
全流通:=STRCAT(' 全流通: ',CON2STR((当前流通股本/1000000)/(TOTALCAPITAL/1000000),2))
市值:=STRCAT(STRCAT(' 流通市值: ',CON2STR((当前流通股本/1000000)*C,2)),'亿')
股本市值:=STRCAT('股本市值: ',STRCAT(STRCAT(STRCAT(总股本,流通盘),全流通),市值))
{业绩}
投资收益:=STRCAT(' 投资收益: ',CON2STR(FINANCE(24)*100,2))
净资收益率:=STRCAT(' 净资收益率: ',CON2STR(FINANCE(29)/FINANCE(19)*100,2))
毛利率:=STRCAT(' 毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2))
主营利润率赋值:STRCAT(' 主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2))
当前业绩:=STRCAT('当前业绩: ',STRCAT(STRCAT(净资收益率,毛利率),主营利润率))
当满足条件ISLASTBAR时,在横轴0.005纵轴0.06位置书写文字
当满足条件ISLASTBAR时,在横轴0.005纵轴0.12位置书写文字
当满足条件ISLASTBAR时,在横轴0.005纵轴0.18位置书写文字
当满足条件1时,在横轴0.005纵轴0.24位置书写文字
DRAWNUMBER_FIX(1,0.055,0.24,0,CONST(FINANCE(43))),COLORYELLOW
当满足条件1时,在横轴0.112纵轴0.24位置书写文字
DRAWNUMBER_FIX(1,0.157,0.24,0,CONST(FINANCE(30)/10000)),COLORFF00FF
当满足条件1时,在横轴0.005纵轴0.30位置书写文字
DRAWNUMBER_FIX(1,0.055,0.30,0,CONST(FINANCE(24)/1000000)),COLORFF00FF
主营业增长率赋值:FINANCE(44)
每股净资产赋值:CONST(FINANCE(34))
每股收益赋值:CONST(FINANCE(38))
净利润增长率赋值:FINANCE(43)
市销率赋值:CONST(FINANCE(1)*现价/FINANCE(20))
现金负债比赋值:(FINANCE(25)/FINANCE(15))
每股未分配赋值:CONST(FINANCE(32))
每股公积金赋值:CONST(FINANCE(18))
SY01赋值:净资收益率>3
SY02赋值:净资收益率>0.01 AND 净资收益率<=3
SY03赋值:主营利润率>2
SY04赋值:主营利润率>0
SY05赋值:主营业增长率>1
SY06赋值:主营业增长率>0
SY07赋值:净利润增长率>2
SY08赋值:净利润增长率>0.2
SY09赋值:每股收益>0.01
SY10赋值: 每股收益>0.001
SY11赋值:每股净资产>2
SY12赋值:每股净资产>0.01
SY13赋值:每股未分配>0.5
SY14赋值:每股未分配>0.001
SY15赋值:每股公积金>0.5
SY16赋值:每股公积金>0.002
SY17赋值:每股未分配>=2 AND 每股公积金>=2
SY18赋值:每股未分配<2 OR 每股公积金<2
优秀赋值:SY01 AND SY03 AND SY05 AND SY07 AND SY09 AND SY11
AND SY13 AND SY15
较好赋值:SY02 AND SY04 AND SY06 AND SY08 AND SY10 AND SY12
AND SY14 AND SY16
一般赋值:NOT(优秀) AND NOT(较好)
当满足条件优秀 AND 较好=0时,在横轴0.45纵轴0位置书写文字
当满足条件较好时,在横轴0.45纵轴0位置书写文字
当满足条件一般时,在横轴0.45纵轴0位置书写文字
当满足条件SY17时,在横轴0.65纵轴0位置书写文字
当满足条件SY18时,在横轴0.65纵轴0位置书写文字