龙虎榜资金一年资金轻松翻倍通达信公式 副图 源码附图
A:=SIGNALS_USER(300, 0), NODRAW; {上榜总金額}
B:=SIGNALS_USER(299, 0), NODRAW; {净流入}
D:=(A+B)/2,NODRAW;{总买入}
E:=A-D,NODRAW;{总卖出};
F:=AMO/10000,NODRAW;{当日成交金額 万元}
J:=A/F*100,NODRAW;{上榜资金与成交金額占比}
换手:=VOL*10000/FINANCE(7),NODRAW,COLORGREEN;
次数:=COUNT(A>0,30),NODRAW;
月收益:(HHV(H,30)-LLV(L,30))/LLV(L,30)*100,NODRAW;
年收益:(HHV(H,250)-LLV(L,250))/LLV(L,250)*100,NODRAW;
月离高:BARSLAST(HHV(H,30)>C),NODRAW;
月离底:BARSLAST(LLV(L,30)<C),NODRAW;
RC1:=REF(C,1);
ZT:=C/REF(C,1)>1.099 AND H>L;
CS:=IF(C>=1,10000,100000);
C涨停10:=1.10*RC1-49/CS;{考虑到4舍5入}
C涨停5 :=1.05*RC1-49/CS;
C跌停10:=0.90*RC1+51/CS;
C跌停5 :=0.95*RC1+51/CS;
ST:=NAMELIKE('S') OR NAMELIKE('*S');
涨停:= IF(ST, C>=C涨停5, C>=C涨停10);
跌停:= IF(ST, C<=C跌停5, C<=C跌停10);
盘中涨停:=IF(ST, H>=C涨停5, H>=C涨停10);
盘中跌停:=IF(ST, L<=C跌停5, L<=C跌停10);
次数Z:=COUNT(C/REF(C,1)>=1.097 OR 涨停,30),NODRAW;
次数N:=COUNT(C/REF(C,1)>=1.097 OR 涨停,250),NODRAW;
STICKLINE(H/REF(C,1)>=1.097 AND H>C , 1,10, 0.1, -1),COLORWHITE;
STICKLINE(C/REF(C,1)>=1.097 , 1,10, 0.1, 0), COLORRED; {价异动 换手异动}
STICKLINE(B>0 , 1,10, 0.1, 0), COLORRED;
STICKLINE(B<0 , 1,10, 0.1, 0), COLORGREEN;
{A}
DRAWTEXT(A>=10000,10*0.6,VARCAT(VARCAT('上榜总:',VAR2STR(A,0)),'万')),COLORYELLOW;
DRAWTEXT(A<10000,10*0.6,VARCAT(VARCAT('上榜总:',VAR2STR(A,0)),'万')),COLORMAGENTA;
DRAWTEXT(D>0,10*0.45,VARCAT(VARCAT('总买入:',VAR2STR(D,0)),'万')),COLORMAGENTA;
DRAWTEXT(D<0,10*0.45,VARCAT(VARCAT('总买入:',VAR2STR(D,0)),'万')),COLORGREEN;
DRAWTEXT(E>0,10*0.3,VARCAT(VARCAT('总卖出:',VAR2STR(E,0)),'万')),COLORMAGENTA;
DRAWTEXT(E<0,10*0.3,VARCAT(VARCAT('总卖出:',VAR2STR(E,0)),'万')),COLORGREEN;
DRAWTEXT(B>0,1.5,VARCAT(VARCAT('净流入:',VAR2STR(B,0)),'万')),COLORMAGENTA;
DRAWTEXT(B>=1000,1.5,VARCAT(VARCAT('净流入:',VAR2STR(B,0)),'万')),COLORYELLOW;
DRAWTEXT(B<0,1.5,VARCAT(VARCAT('净流入:',VAR2STR(B,0)),'万')),COLORGREEN;
DRAWTEXT(B<=-1000,1.5,VARCAT(VARCAT('净流入:',VAR2STR(B,0)),'万')),COLORBLUE;
DRAWTEXT(J>0,9,VARCAT(VARCAT('占比:',VAR2STR(J,0)),'%')),COLORMAGENTA;
DRAWTEXT(换手<=20 AND A>0,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),COLORYELLOW;
DRAWTEXT(换手>20 AND 换手<50 AND A>0,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),COLORMAGENTA;
DRAWTEXT(换手>=50 AND A>0,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),COLORRED;
DRAWTEXT(H/REF(C,1)>=1.097 AND H>C ,6,'炸板操作'),COLORMAGENTA;
DRAWTEXT_FIX(1,0.915,0,0,'月上榜:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.96,0,0,CONST(次数)),COLORYELLOW;
DRAWTEXT_FIX(1,0.98,0,0,'次'),COLORYELLOW;
DRAWTEXT_FIX(1,0.915,0.2,0,'月涨停:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.96,0.2,0,CONST(次数Z)),COLORYELLOW;
DRAWTEXT_FIX(1,0.98,0.2,0,'次'),COLORYELLOW;
DRAWTEXT_FIX(1,0.915,0.4,0,'年涨停:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.96,0.4,0,CONST(次数N)),COLORYELLOW;
DRAWTEXT_FIX(1,0.98,0.4,0,'次'),COLORYELLOW;
{价异动 换手异动}
DRAWTEXT(换手<=20 AND C/REF(C,1)>=1.097 OR 盘中涨停,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),COLORYELLOW;
DRAWTEXT(换手>20 AND C/REF(C,1)>=1.097 OR 盘中涨停,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),COLORMAGENTA;
DRAWTEXT(换手>=50 AND C/REF(C,1)>=1.097 OR 盘中涨停,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),COLORRED;
{收益}
DRAWTEXT_FIX(1,0.915,0.6,0,'月收益:±'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.96,0.6,0,CONST(月收益)),COLORRED;
DRAWTEXT_FIX(1,0.98,0.6,0,'%'),COLORYELLOW;
DRAWTEXT_FIX(1,0.915,0.8,0,'年收益:±'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.96,0.8,0,CONST(年收益)),COLORRED;
DRAWTEXT_FIX(1,0.98,0.8,0,'%'),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:FINANCE
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
A赋值:SIGNALS_USER(300, 0), NODRAW
{上榜总金額}
B赋值:SIGNALS_USER(299, 0), NODRAW
{净流入}
D赋值:(A+B)/2,NODRAW
{总买入}
E赋值:A-D,NODRAW
{总卖出}
F赋值:AMO/10000,NODRAW
{当日成交金額 万元}
J赋值:A/F*100,NODRAW
{上榜资金与成交金額占比}
换手赋值:成交量*10000/FINANCE(7),NODRAW,画绿色
次数赋值:统计30日满足A>0的天数,NODRAW
输出月收益:(30日内H最高值-30日内L最低值)/30日内L最低值*100,NODRAW
输出年收益:(250日内H最高值-250日内L最低值)/250日内L最低值*100,NODRAW
输出月离高:上次30日内H最高值>C距今天数,NODRAW
输出月离底:上次30日内L最低值
RC1赋值:1日前的C
ZT赋值:C/1日前的C>1.099 AND H>L
如果C>=1返回10000否则返回100000
C涨停10赋值:1.10*RC1-49/CS
{考虑到4舍5入}
C涨停5 :=1.05*RC1-49/CS
C跌停10赋值:0.90*RC1+51/CS
C跌停5 :=0.95*RC1+51/CS
ST赋值:NAMELIKE('S') OR NAMELIKE('*S')
如果ST返回 C>=C涨停5否则返回 C>=C涨停10
如果ST返回 C<=C跌停5否则返回 C<=C跌停10
如果ST返回 H>=C涨停5否则返回 H>=C涨停10
如果ST返回 L<=C跌停5否则返回 L<=C跌停10
次数Z:=COUNT(C/1日前的C>=1.097 OR 涨停,30),NODRAW
次数N:=COUNT(C/1日前的C>=1.097 OR 涨停,250),NODRAW
STICKLINE(H/1日前的C>=1.097 AND H>C , 1,10, 0.1, -1),画白色
STICKLINE(C/1日前的C>=1.097 , 1,10, 0.1, 0), 画红色
当满足条件B>0 时,在 1和10之间画柱状线
当满足条件B<0 时,在 1和10之间画柱状线
{A}
DRAWTEXT(A>=10000,10*0.6,VARCAT(VARCAT('上榜总:',VAR2STR(A,0)),'万')),画黄色
DRAWTEXT(A<10000,10*0.6,VARCAT(VARCAT('上榜总:',VAR2STR(A,0)),'万')),COLORMAGENTA
DRAWTEXT(D>0,10*0.45,VARCAT(VARCAT('总买入:',VAR2STR(D,0)),'万')),COLORMAGENTA
DRAWTEXT(D<0,10*0.45,VARCAT(VARCAT('总买入:',VAR2STR(D,0)),'万')),画绿色
DRAWTEXT(E>0,10*0.3,VARCAT(VARCAT('总卖出:',VAR2STR(E,0)),'万')),COLORMAGENTA
DRAWTEXT(E<0,10*0.3,VARCAT(VARCAT('总卖出:',VAR2STR(E,0)),'万')),画绿色
DRAWTEXT(B>0,1.5,VARCAT(VARCAT('净流入:',VAR2STR(B,0)),'万')),COLORMAGENTA
DRAWTEXT(B>=1000,1.5,VARCAT(VARCAT('净流入:',VAR2STR(B,0)),'万')),画黄色
DRAWTEXT(B<0,1.5,VARCAT(VARCAT('净流入:',VAR2STR(B,0)),'万')),画绿色
DRAWTEXT(B<=-1000,1.5,VARCAT(VARCAT('净流入:',VAR2STR(B,0)),'万')), 画蓝色
DRAWTEXT(J>0,9,VARCAT(VARCAT('占比:',VAR2STR(J,0)),'%')),COLORMAGENTA
DRAWTEXT(换手<=20 AND A>0,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),画黄色
DRAWTEXT(换手>20 AND 换手<50 AND A>0,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),COLORMAGENTA
DRAWTEXT(换手>=50 AND A>0,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),画红色
DRAWTEXT(H/1日前的C>=1.097 AND H>C ,6,'炸板操作'),COLORMAGENTA
当满足条件1时,在横轴0.915纵轴0位置书写文字
DRAWNUMBER_FIX(1,0.96,0,0,CONST(次数)),画黄色
当满足条件1时,在横轴0.98纵轴0位置书写文字
当满足条件1时,在横轴0.915纵轴0.2位置书写文字
DRAWNUMBER_FIX(1,0.96,0.2,0,CONST(次数Z)),画黄色
当满足条件1时,在横轴0.98纵轴0.2位置书写文字
当满足条件1时,在横轴0.915纵轴0.4位置书写文字
DRAWNUMBER_FIX(1,0.96,0.4,0,CONST(次数N)),画黄色
当满足条件1时,在横轴0.98纵轴0.4位置书写文字
{价异动 换手异动}
DRAWTEXT(换手<=20 AND C/1日前的C>=1.097 OR 盘中涨停,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),画黄色
DRAWTEXT(换手>20 AND C/1日前的C>=1.097 OR 盘中涨停,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),COLORMAGENTA
DRAWTEXT(换手>=50 AND C/1日前的C>=1.097 OR 盘中涨停,7.5,VARCAT(VARCAT('换手:',VAR2STR(换手,0)),'%')),画红色
当满足条件1时,在横轴0.915纵轴0.6位置书写文字
DRAWNUMBER_FIX(1,0.96,0.6,0,CONST(月收益)),画红色
当满足条件1时,在横轴0.98纵轴0.6位置书写文字
当满足条件1时,在横轴0.915纵轴0.8位置书写文字
DRAWNUMBER_FIX(1,0.96,0.8,0,CONST(年收益)),画红色
当满足条件1时,在横轴0.98纵轴0.8位置书写文字