[超级重磅]超级主升主图+副图指标源码分享
N9:=18;
MA1:=MA(C,20);
JX1:=IF(CAPITAL=0,IF(PERIOD=7,1.11,IF(PERIOD=8,1.30,1.06)),IF(PERIOD=7,1.20,IF(PERIOD=8,1.38,1.14)));
JX2:=IF(CAPITAL=0,IF(PERIOD=7,1.09,IF(PERIOD=8,1.25,1.05)),IF(PERIOD=7,1.15,IF(PERIOD=8,1.33,1.11)));
JX3:=IF(CAPITAL=0,IF(PERIOD=7,0.985,IF(PERIOD=8,1.01,0.985)),IF(PERIOD=7,0.99,1.01));
JX4:=IF(CAPITAL=0,IF(PERIOD=7,0.88,IF(PERIOD=8,0.75,0.93)),IF(PERIOD=7,0.85,IF(PERIOD=8,0.75,0.90)));
JX5:=IF(CAPITAL=0,IF(PERIOD=7,0.85,IF(PERIOD=8,0.70,0.92)),IF(PERIOD=7,0.80,IF(PERIOD=8,0.70,0.86)));
疯狂:MA1*JX1,COLOR0000DD,LINETHICK2,NODRAW;
超买:MA1*JX2,COLORDD00DD,LINETHICK2,NODRAW;
轴心:MA1*JX3,COLOR0000FF;
IF(轴心< REF(轴心,1),轴心,DRAWNULL),COLOR00FF00;
超卖:MA1*JX4,COLORDD00DD,LINETHICK2,NODRAW;
恐慌:MA1*JX5,COLOREEDD00,LINETHICK2,NODRAW;
DRAWBAND(疯狂,RGB(66,66,66),超买,DRAWNULL);
DRAWBAND(超卖,RGB(80,00,00),恐慌,DRAWNULL);
DRAWKLINE(H,O,L,C);
STICKLINE(C>=REF(C,1),H,L,0,1),COLOR0000FF;
STICKLINE(C>=REF(C,1),C,O,2.8,0),COLOR0000BB;
STICKLINE(C>=REF(C,1),C,O,2,0),COLOR0000DD;
STICKLINE(C>=REF(C,1),C,O,1.2,0),COLOR0000EE;
STICKLINE(C>=REF(C,1),C,O,0.4,0),COLOR0000FF;
STICKLINE(C< REF(C,1),H,L,0,1),COLORFFFF00;
STICKLINE(C< REF(C,1),C,O,2.8,0),COLOR999900;
STICKLINE(C< REF(C,1),C,O,2,0),COLORBBBB00;
STICKLINE(C< REF(C,1),C,O,1.2,0),COLORDDDD00;
STICKLINE(C< REF(C,1),C,O,0.4,0),COLORFFFF00;
STICKLINE(C<=O,H,L,0,0),COLORWHITE;
K7:=BARSLAST(CURRBARSCOUNT=N9);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,K7),0));
DD:=CONST(IF(ISLASTBAR=1,LLV(L,K7),0));
ZW:=(GD+DD)/2;
JC:=(GD-DD);
DRAWTEXT(CURRBARSCOUNT=N9,ZW-JC/1.3,'★超级主升!★'),COLOR00FFFF;
上涨家数:INDEXADV,NODRAW,COLORRED;
下跌家数:INDEXDEC,NODRAW,COLORGREEN;
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLOR00FFFF;
DRAWTEXT_FIX(1,0.00,0.05,0,'主题投资:')COLOR0000FF;
DRAWTEXT_FIX(1,0.06,0.05,0,EXTERNSTR(0,1))COLORFFFFFF;
DRAWTEXT_FIX(1,0.00,0.10,0,'主营业务:')COLORFFFFFF;
DRAWTEXT_FIX(1,0.06,0.10,0,EXTERNSTR(0,2))COLORFFFFFF;
总股本:=STRCAT(STRCAT('总股本: ',CON2STR(TOTALCAPITAL/1000000,3)),'亿股');
流通盘:=STRCAT(STRCAT('流通盘: ',CON2STR(CAPITAL/1000000,3)),'亿股');
每股收益:=STRCAT(STRCAT('每股收益: ',CON2STR(FINANCE(29)/FINANCE(1),2)),'元');
每股未分配:=STRCAT(STRCAT('每股未分配: ',CON2STR(FINANCE(32),2)),'元');
每股公积金:=STRCAT(STRCAT('每股公积金: ',CON2STR(FINANCE(18),2)),'元');
每股净资产:=STRCAT(STRCAT('每股净资产: ',CON2STR(FINANCE(34),2)),'元');
总市值:=STRCAT(STRCAT('总市值: ',CON2STR(FINANCE(1)*C/100000000,3)),'亿元');
市值:=STRCAT(STRCAT('流通值: ',CON2STR((CAPITAL/1000000)*C,3)),'亿元');
SHI:INTPART(DATE+19000000),NODRAW;
上市日期:=STRCAT(' 上市日:',CON2STR(SHI,0));
收入同比增长:=STRCAT(STRCAT('收入同比增长: ',CON2STR(FINANCE(44),2)),'%');
市盈率:=STRCAT('市盈率: ',CON2STR(DYNAINFO(39),2));
主营毛利润率:=STRCAT(STRCAT('主营毛利润率: ',CON2STR((FINANCE(20)- FINANCE(21))/FINANCE(20)*100,2)),'%');
主营净利润率:=STRCAT(STRCAT('主营净利润率: ',CON2STR(FINANCE(30)/FINANCE(20)*100,2)),'%');
主营利润率:=STRCAT(' 主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2));
净利同比增长:=STRCAT(STRCAT('净利同比增长: ',CON2STR(FINANCE(43),2)),'%');
DRAWTEXT_FIX(ISLASTBAR,0.002,0.15,0,总股本),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.127,0.15,0,收入同比增长),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.257,0.15,0,每股收益),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.002,0.20,0,流通盘),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.127,0.20,0,主营毛利润率),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.257,0.20,0,每股净资产),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.002,0.25,0,总市值),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.127,0.25,0,主营净利润率),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.257,0.25,0,每股未分配),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.002,0.30,0,市值),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.127,0.30,0,净利同比增长),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.257,0.30,0,每股公积金),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.002,0.35,0,市盈率),COLORWHITE;
HSL:=100*VOL/(FINANCE(7)/100);
换手:=STRCAT(STRCAT('换手: ',CON2STR(HSL,2)),'%');
DRAWTEXT_FIX(ISLASTBAR,0.127,0.35,0,换手),COLORMAGENTA;
CJ:=DYNAINFO(10)/100000000;
成交:=STRCAT(STRCAT('成交: ',CON2STR(CJ,2)),'亿');
DRAWTEXT_FIX(ISLASTBAR,0.257,0.35,0,成交),COLORMAGENTA;
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N9赋值:18
MA1赋值:C的20日简单移动平均
JX1赋值:IF(当前流通股本=0,IF(PERIOD=7,1.11,IF(PERIOD=8,1.30,1.06)),IF(PERIOD=7,1.20,IF(PERIOD=8,1.38,1.14)))
JX2赋值:IF(当前流通股本=0,IF(PERIOD=7,1.09,IF(PERIOD=8,1.25,1.05)),IF(PERIOD=7,1.15,IF(PERIOD=8,1.33,1.11)))
JX3赋值:IF(当前流通股本=0,IF(PERIOD=7,0.985,IF(PERIOD=8,1.01,0.985)),IF(PERIOD=7,0.99,1.01))
JX4赋值:IF(当前流通股本=0,IF(PERIOD=7,0.88,IF(PERIOD=8,0.75,0.93)),IF(PERIOD=7,0.85,IF(PERIOD=8,0.75,0.90)))
JX5赋值:IF(当前流通股本=0,IF(PERIOD=7,0.85,IF(PERIOD=8,0.70,0.92)),IF(PERIOD=7,0.80,IF(PERIOD=8,0.70,0.86)))
输出疯狂:MA1*JX1,COLOR0000DD, 线宽为2,NODRAW
输出超买:MA1*JX2,COLORDD00DD, 线宽为2,NODRAW
输出轴心:MA1*JX3,COLOR0000FF
IF(轴心< 1日前的轴心,轴心,DRAWNULL),COLOR00FF00
输出超卖:MA1*JX4,COLORDD00DD, 线宽为2,NODRAW
输出恐慌:MA1*JX5,COLOREEDD00, 线宽为2,NODRAW
DRAWBAND(疯狂,RGB(66,66,66),超买,DRAWNULL)
DRAWBAND(超卖,RGB(80,00,00),恐慌,DRAWNULL)
DRAWKLINE(H,O,L,C)
STICKLINE(C>=1日前的C,H,L,0,1),COLOR0000FF
STICKLINE(C>=1日前的C,C,O,2.8,0),COLOR0000BB
STICKLINE(C>=1日前的C,C,O,2,0),COLOR0000DD
STICKLINE(C>=1日前的C,C,O,1.2,0),COLOR0000EE
STICKLINE(C>=1日前的C,C,O,0.4,0),COLOR0000FF
STICKLINE(C< 1日前的C,H,L,0,1),COLORFFFF00
STICKLINE(C< 1日前的C,C,O,2.8,0),COLOR999900
STICKLINE(C< 1日前的C,C,O,2,0),COLORBBBB00
STICKLINE(C< 1日前的C,C,O,1.2,0),COLORDDDD00
STICKLINE(C< 1日前的C,C,O,0.4,0),COLORFFFF00
当满足条件C<=O时,在H和L之间画柱状线
K7赋值:上次 到最后交易的周期=N9距今天数
GD赋值:CONST(IF(ISLASTBAR=1,K7日内H最高值,0))
DD赋值:CONST(IF(ISLASTBAR=1,K7日内L最低值,0))
ZW赋值:(GD+DD)/2
JC赋值:(GD-DD)
当满足条件 到最后交易的周期=N9时,在ZW-JC/1.3和'★超级主升!★'位置书写文字
输出上涨家数:INDEXADV,NODRAW,画红色
输出下跌家数:INDEXDEC,NODRAW,画绿色
Z1赋值:STRCAT(HYBLOCK,' ')
Z2赋值:STRCAT(Z1,DYBLOCK)
Z3赋值:STRCAT(Z2,' ')
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLOR00FFFF
当满足条件1时,在横轴0.00纵轴0.05位置书写文字
DRAWTEXT_FIX(1,0.06,0.05,0,EXTERNSTR(0,1))COLORFFFFFF
当满足条件1时,在横轴0.00纵轴0.10位置书写文字
DRAWTEXT_FIX(1,0.06,0.10,0,EXTERNSTR(0,2))COLORFFFFFF
总股本:=STRCAT(STRCAT('总股本: ',CON2STR(TOTAL当前流通股本/1000000,3)),'亿股')
流通盘:=STRCAT(STRCAT('流通盘: ',CON2STR(当前流通股本/1000000,3)),'亿股')
每股收益:=STRCAT(STRCAT('每股收益: ',CON2STR(FINANCE(29)/FINANCE(1),2)),'元')
每股未分配:=STRCAT(STRCAT('每股未分配: ',CON2STR(FINANCE(32),2)),'元')
每股公积金:=STRCAT(STRCAT('每股公积金: ',CON2STR(FINANCE(18),2)),'元')
每股净资产:=STRCAT(STRCAT('每股净资产: ',CON2STR(FINANCE(34),2)),'元')
总市值:=STRCAT(STRCAT('总市值: ',CON2STR(FINANCE(1)*C/100000000,3)),'亿元')
市值:=STRCAT(STRCAT('流通值: ',CON2STR((当前流通股本/1000000)*C,3)),'亿元')
输出SHI:INTPART(DATE+19000000),NODRAW
上市日期:=STRCAT(' 上市日:',CON2STR(SHI,0))
收入同比增长:=STRCAT(STRCAT('收入同比增长: ',CON2STR(FINANCE(44),2)),'%')
市盈率:=STRCAT('市盈率: ',CON2STR(DYNAINFO(39),2))
主营毛利润率:=STRCAT(STRCAT('主营毛利润率: ',CON2STR((FINANCE(20)- FINANCE(21))/FINANCE(20)*100,2)),'%')
主营净利润率:=STRCAT(STRCAT('主营净利润率: ',CON2STR(FINANCE(30)/FINANCE(20)*100,2)),'%')
主营利润率赋值:STRCAT(' 主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2))
净利同比增长:=STRCAT(STRCAT('净利同比增长: ',CON2STR(FINANCE(43),2)),'%')
当满足条件ISLASTBAR时,在横轴0.002纵轴0.15位置书写文字
当满足条件ISLASTBAR时,在横轴0.127纵轴0.15位置书写文字
当满足条件ISLASTBAR时,在横轴0.257纵轴0.15位置书写文字
当满足条件ISLASTBAR时,在横轴0.002纵轴0.20位置书写文字
当满足条件ISLASTBAR时,在横轴0.127纵轴0.20位置书写文字
当满足条件ISLASTBAR时,在横轴0.257纵轴0.20位置书写文字
当满足条件ISLASTBAR时,在横轴0.002纵轴0.25位置书写文字
当满足条件ISLASTBAR时,在横轴0.127纵轴0.25位置书写文字
当满足条件ISLASTBAR时,在横轴0.257纵轴0.25位置书写文字
当满足条件ISLASTBAR时,在横轴0.002纵轴0.30位置书写文字
当满足条件ISLASTBAR时,在横轴0.127纵轴0.30位置书写文字
当满足条件ISLASTBAR时,在横轴0.257纵轴0.30位置书写文字
当满足条件ISLASTBAR时,在横轴0.002纵轴0.35位置书写文字
HSL赋值:100*成交量/(FINANCE(7)/100)
换手:=STRCAT(STRCAT('换手: ',CON2STR(HSL,2)),'%')
当满足条件ISLASTBAR时,在横轴0.127纵轴0.35位置书写文字
CJ赋值:DYNAINFO(10)/100000000
成交:=STRCAT(STRCAT('成交: ',CON2STR(CJ,2)),'亿')
当满足条件ISLASTBAR时,在横轴0.257纵轴0.35位置书写文字