笑脸分时主图源码 分时主图 通达信 贴图
A1:=(VOL/CLOSE)/3;
A2:=SUM((IF(((A1>40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);
A3:=SUM((IF(((A1>40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);
A4:=SUM((IF(((A1<40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);
A5:=SUM((IF(((A1<40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);
A6:=((A2+A3)+A4)+A5;
A7:=IF((BARSTATUS=2),((100*A2)/A6),0);
A8:=((IF((BARSTATUS=2),((100*A3)/A6),0)));
A9:=((IF((BARSTATUS=2),((100*A4)/A6),0)));
A10:=((IF((BARSTATUS=2),((100*A5)/A6),0)));
机构买盘:=(A2),LINETHICK2;
机构卖盘:=(A3),LINETHICK2;
散户买盘:=(A4);
散户卖盘:=(A5);
DRAWTEXT_FIX(1,0.000,1-0.05,0,STRCAT(STRCAT('【机构买盘】',CON2STR(机构买盘,2)),'万')),COLORRED;
DRAWTEXT_FIX(1,0.250,1-0.05,0,STRCAT(STRCAT('【机构卖盘】',CON2STR(机构卖盘,2)),'万')),COLOR00FF00;
DRAWTEXT_FIX(1,0.500,1-0.05,0,STRCAT(STRCAT('【散户买盘】',CON2STR(散户买盘,2)),'万')),COLORRED;
DRAWTEXT_FIX(1,0.745,1-0.05,0,STRCAT(STRCAT('【散户卖盘】',CON2STR(散户卖盘,2)),'万')),COLOR00FF00;
突破:=REF(EMA(C,14),1);
A1X:=(EMA(C,10)-突破)/突破*100;
多方:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL);
空方:=IF(A1X<0,REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL);
STICKLINE(A1X>=0,多方,突破,0,0),COLOR000099;
STICKLINE(A1X<0,空方,突破,0,0),COLOR00CC66;
最新:CLOSE,LINETHICK1,COLORWHITE;
AA:=SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C));
BB:=BETWEEN(C/AA,C+H,C-H);
DRAWTEXT( ISLASTBAR AND 最新>REF(最新,1),最新,STRCAT(' 涨▲',CON2STR(最新,2))),COLORMAGENTA;
DRAWTEXT( ISLASTBAR AND 最新<REF(最新,1),最新,STRCAT(' 跌▼',CON2STR(最新,2))),COLOR00FF00;
DRAWTEXT_FIX(1,0.880,1-0.97,0,DYBLOCK),COLORWHITE;
DRAWTEXT_FIX(1,0.940,1-0.97,0,HYBLOCK),COLORYELLOW;
均价:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1;
DXJP:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,21)-LLV(LOW,34))*100;
FSZX:=(EMA(DXJP,3)-50)*2,COLORGRAY;
BGTYU:=IF(DATE<=1150530,1,0);
GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95);
VBNH:=IF(GHYJKU=0,MA((DCLOSE*BGTYU),BARSCOUNT((DCLOSE*BGTYU))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))));
DRAWICON(FSZX<=-95,C,38);
DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.04),C,'板'),COLORCYAN;
DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),C,'追'),COLORYELLOW;
DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.004),C,17);
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:=L1+P1*7/8,COLORGREEN;
支撑:=L1+P1*0.5/8,COLORMAGENTA;
DRAWICON(LONGCROSS(支撑,C,2),C,5);
DRAWICON(LONGCROSS(C,阻力,2),C,6);
VARJ1:=EMA(EMA(CLOSE,13),13);
控盘2:=(VARJ1-REF(VARJ1,1))/REF(VARJ1,1)*1000;
STJ01:=控盘2<REF(控盘2,1) AND 控盘2>0.5;
STJ02:=控盘2>0;
BTJ2:=控盘2>REF(控盘2,1) AND 控盘2<-0.2;
BTJ22:=控盘2>REF(控盘2,1) AND 控盘2<0 ;
JJ:=DYNAINFO(11);
P:=55;S:=8;M1:=3;
能量:=(EMA(CLOSE,S)-EMA(C,P))*10;
空头:=EMA(能量,M1),COLOR00FF00;
BTJ1:=(CLOSE-JJ)/JJ<-0.005;
BTJ11:=(CLOSE-JJ)/JJ<-0.03;
BTJ12:=COUNT(JJ>=REF(JJ,1),5)>=4 AND (CLOSE-JJ)/JJ<0.005;
STJ1:=(C-JJ)/JJ>0.005;
BTJ3:=CROSS(能量,空头) AND 能量<-0.3;
BTJ32:=CROSS(能量,空头) AND 能量<-0.1;
STJ31:=CROSS(空头,能量);
STJ32:=CROSS(空头,能量) AND 能量>1.618;
A:=8;
BTJ81:=FILTER(BTJ1 AND BTJ2 AND BTJ3,A);
BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,A);
BTJ82:=FILTER(BTJ12 AND BTJ22 AND BTJ32,A);
时长:=IF(HOUR>=9 AND HOUR<14 ,1,0);{9点至 14点}
捡钱:=BTJ811 AND TIME>15 AND 时长;
DRAWICON(捡钱,C,27);
AYGB1:=(DVOL/C)/2,NODRAW;
AYGB2:=SUM(IF(AYGB1>100 AND CLOSE>REF(CLOSE,1),AYGB1,0),0);
AYGB3:=SUM(IF(AYGB1>100 AND CLOSE<REF(CLOSE,1),AYGB1,0),0);
AYGB4:=SUM(IF(AYGB1<100 AND CLOSE>REF(CLOSE,1),AYGB1,0),0);
AYGB5:=SUM(IF(AYGB1<100 AND CLOSE<REF(CLOSE,1),AYGB1,0),0);
AYGB6:=AYGB2+AYGB3+AYGB4+AYGB5;
机买:=(AYGB2/AYGB6)*100-100,LINETHICK1,COLORRED;
机卖:=(AYGB3/AYGB6)*100-100,LINETHICK1,COLORGREEN;
主力差:=机买-机卖;
LQH:=主力差>0 AND REF(主力差,1)<=0;
DRAWICON(LQH,C,25);
JJXX:=IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW;
JJXXH:=(JJXX*1.007 ),COLORFF6600;
FFLL:=SUM(VOL,6)>REF(MA(VOL,30),1)*10;
HHPP:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/CLOSE)<1;
HHZZ:=HHPP AND FFLL AND (C>JJXXH);
TTPP2:=FILTER(HHZZ,100);
DRAWICON(TTPP2,C,26);
ZS:=DYNAINFO(3);
KP:=DYNAINFO(4);
ZX:=DYNAINFO(7);
ZG:=DYNAINFO(5);
ZD:=DYNAINFO(6);
MA5:='FSKY.MA5#DAY';
DRAWTEXT_FIX(ISLASTBAR,0.9,1-0.2,0,STRCAT('A5 : ',CON2STR(MA5,2))),COLORWHITE;
MA10:='FSKY.MA10#DAY';
DRAWTEXT_FIX(ISLASTBAR,0.9,1-0.15,0,STRCAT('A10 : ',CON2STR(MA10,2))),COLORWHITE;
MA20:='FSKY.MA20#DAY';
DRAWTEXT_FIX(ISLASTBAR,0.9,1-0.1,0,STRCAT('A20 : ',CON2STR(MA20,2))),COLORWHITE;
MA60:='FSKY.MA60#DAY';
DRAWTEXT_FIX(ISLASTBAR,0.9,1,0,STRCAT('A60 : ',CON2STR(MA60,2))),COLORWHITE;
分时均价线:SUM(C*V,240)/SUM(V,240),COLORYELLOW;
昨高:='FSKY.ZH#DAY';
昨低:='FSKY.ZL#DAY';
DRAWTEXT_FIX(ISLASTBAR,0.9,1-0.25,0,STRCAT('昨低 : ',CON2STR(昨低,2))),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.9,1-0.3,0,STRCAT('昨高 : ',CON2STR(昨高,2))),COLORWHITE;
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
该公式包含未来函数:DCLOSE
该公式包含未来函数:DVOL
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
A1赋值:(成交量/CLOSE)/3
A2赋值:SUM((IF(((A1>40) AND (CLOSE>(1日前的CLOSE))),A1,0)),0)
A3赋值:SUM((IF(((A1>40) AND (CLOSE<(1日前的CLOSE))),A1,0)),0)
A4赋值:SUM((IF(((A1<40) AND (CLOSE>(1日前的CLOSE))),A1,0)),0)
A5赋值:SUM((IF(((A1<40) AND (CLOSE<(1日前的CLOSE))),A1,0)),0)
A6赋值:((A2+A3)+A4)+A5
A7赋值:IF((BARSTATUS=2),((100*A2)/A6),0)
A8赋值:((IF((BARSTATUS=2),((100*A3)/A6),0)))
A9赋值:((IF((BARSTATUS=2),((100*A4)/A6),0)))
A10:=((IF((BARSTATUS=2),((100*A5)/A6),0)))
机构买盘赋值:(A2), 线宽为2
机构卖盘赋值:(A3), 线宽为2
散户买盘赋值:(A4)
散户卖盘赋值:(A5)
DRAWTEXT_FIX(1,0.000,1-0.05,0,STRCAT(STRCAT('【机构买盘】',CON2STR(机构买盘,2)),'万')),画红色
DRAWTEXT_FIX(1,0.250,1-0.05,0,STRCAT(STRCAT('【机构卖盘】',CON2STR(机构卖盘,2)),'万')),COLOR00FF00
DRAWTEXT_FIX(1,0.500,1-0.05,0,STRCAT(STRCAT('【散户买盘】',CON2STR(散户买盘,2)),'万')),画红色
DRAWTEXT_FIX(1,0.745,1-0.05,0,STRCAT(STRCAT('【散户卖盘】',CON2STR(散户卖盘,2)),'万')),COLOR00FF00
突破赋值:1日前的C的14日指数移动平均
A1X:=(C的10日指数移动平均-突破)/突破*100
多方赋值:IF(A1X>=0,REF(C的10日指数移动平均,上次A1X上穿0距今天数+1),DRAWNULL)
空方赋值:IF(A1X<0,REF(C的10日指数移动平均,上次0上穿A1X距今天数+1),DRAWNULL)
当满足条件A1X>=0时,在多方和突破之间画柱状线
当满足条件A1X<0时,在空方和突破之间画柱状线
输出
最新:CLOSE,LINETHICK1,画白色
AA赋值:SUM(成交额,C的有效数据周期数)/SUM(成交量*100,C的有效数据周期数)
BB赋值:BETWEEN(C/AA,C+H,C-H)
DRAWTEXT( ISLASTBAR AND 最新>1日前的最新,最新,STRCAT(' 涨▲',CON2STR(最新,2))),画洋红色
DRAWTEXT( ISLASTBAR AND 最新<1日前的最新,最新,STRCAT(' 跌▼',CON2STR(最新,2))),COLOR00FF00
当满足条件1时,在横轴0.880纵轴1-0.97位置书写文字
当满足条件1时,在横轴0.940纵轴1-0.97位置书写文字
输出
均价:240的C*V日累和/240的V日累和,画黄色,LINETHICK1
DXJP赋值:(CLOSE-34日内最低价最低值)/(21日内最高价最高值-34日内最低价最低值)*100
FSZX赋值:(DXJP的3日指数移动平均-50)*2,COLORGRAY
如果DATE<=1150530返回1否则返回0
GHYJKU赋值:BETWEEN((DCLOSE*BGTYU)/(SUM(成交额,(DCLOSE*BGTYU的有效数据周期数))/SUM(成交量*100,(DCLOSE*BGTYU的有效数据周期数))),1.05,0.95)
VBNH赋值:IF(GHYJKU=0,MA((DCLOSE*BGTYU),(DCLOSE*BGTYU的有效数据周期数)),(SUM(成交额,(DCLOSE*BGTYU的有效数据周期数))/SUM(成交量*100,(DCLOSE*BGTYU的有效数据周期数))))
当满足条件FSZX<=-95时,在C和38之间画图标
DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.04),C,'板'),画青色
DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),C,'追'),画黄色
DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.004),C,17)
H1赋值:MAX(DYNAINFO(3),DYNAINFO(5))
L1赋值:MIN(DYNAINFO(3),DYNAINFO(6))
P1赋值:H1-L1
阻力赋值:L1+P1*7/8,画绿色
支撑赋值:L1+P1*0.5/8,画洋红色
DRAWICON(LONGCROSS(支撑,C,2),C,5)
DRAWICON(LONGCROSS(C,阻力,2),C,6)
VARJ1赋值:CLOSE的13日指数移动平均,13)
控盘2赋值:(VARJ1-1日前的VARJ1)/1日前的VARJ1*1000
STJ01赋值:控盘2<1日前的控盘2 AND 控盘2>0.5
STJ02赋值:控盘2>0
BTJ2赋值:控盘2>1日前的控盘2 AND 控盘2<-0.2
BTJ22:=控盘2>1日前的控盘2 AND 控盘2<0
JJ赋值:均价
P赋值:55
S赋值:8
M1赋值:3
能量赋值:(CLOSE的S日指数移动平均-C的P日指数移动平均)*10
空头赋值:能量的M1日指数移动平均,COLOR00FF00
BTJ1赋值:(CLOSE-JJ)/JJ<-0.005
BTJ11:=(CLOSE-JJ)/JJ<-0.03
BTJ12:=COUNT(JJ>=1日前的JJ,5)>=4 AND (CLOSE-JJ)/JJ<0.005
STJ1:=(C-JJ)/JJ>0.005
BTJ3赋值:能量上穿空头 AND 能量<-0.3
BTJ32:=能量上穿空头 AND 能量<-0.1
STJ31:=空头上穿能量
STJ32:=空头上穿能量 AND 能量>1.618
A赋值:8
BTJ81赋值:BTJ1 AND BTJ2 AND BTJ3的A过滤
BTJ811:=BTJ11 AND BTJ2 AND BTJ3的A过滤
BTJ82赋值:BTJ12 AND BTJ22 AND BTJ32的A过滤
如果HOUR>=9 AND HOUR<14 返回1否则返回0
{9点至 14点}
捡钱赋值:BTJ811 AND TIME>15 AND 时长
当满足条件捡钱时,在C和27之间画图标
AYGB1:=(D成交量/C)/2,NODRAW
AYGB2:=SUM(IF(AYGB1>100 AND CLOSE>1日前的CLOSE,AYGB1,0),0)
AYGB3:=SUM(IF(AYGB1>100 AND CLOSE<1日前的CLOSE,AYGB1,0),0)
AYGB4:=SUM(IF(AYGB1<100 AND CLOSE>1日前的CLOSE,AYGB1,0),0)
AYGB5:=SUM(IF(AYGB1<100 AND CLOSE<1日前的CLOSE,AYGB1,0),0)
AYGB6:=AYGB2+AYGB3+AYGB4+AYGB5
机买赋值:(AYGB2/AYGB6)*100-100,LINETHICK1,画红色
机卖赋值:(AYGB3/AYGB6)*100-100,LINETHICK1,画绿色
主力差赋值:机买-机卖
LQH赋值:主力差>0 AND 1日前的主力差<=0
当满足条件LQH时,在C和25之间画图标
JJXX:=IF(BETWEEN(C/(0的成交额日累和/0的成交量*100日累和),1.05,0.95)=0,C的0日简单移动平均,(0的成交额日累和/0的成交量*100日累和)),画黄色
JJXXH:=(JJXX*1.007 ),COLORFF6600
FFLL赋值:6的成交量日累和>REF(成交量的30日简单移动平均,1)*10
HHPP赋值:((HHV(CLOSE,CLOSE的有效数据周期数)-LLV(CLOSE,CLOSE的有效数据周期数))/CLOSE)<1
HHZZ赋值:HHPP AND FFLL AND (C>JJXXH)
TTPP2赋值:HHZZ的100过滤
当满足条件TTPP2时,在C和26之间画图标
ZS赋值:DYNAINFO(3)
KP赋值:开盘价
ZX赋值:现价
ZG赋值:DYNAINFO(5)
ZD赋值:DYNAINFO(6)
MA5赋值:'FSKY.MA5#DAY'
DRAWTEXT_FIX(ISLASTBAR,0.9,1-0.2,0,STRCAT('A5 : ',CON2STR(MA5,2))),画白色
MA10:='FSKY.MA10#DAY'
DRAWTEXT_FIX(ISLASTBAR,0.9,1-0.15,0,STRCAT('A10 : ',CON2STR(MA10,2))),画白色
MA20赋值:'FSKY.MA20#DAY'
DRAWTEXT_FIX(ISLASTBAR,0.9,1-0.1,0,STRCAT('A20 : ',CON2STR(MA20,2))),画白色
MA60赋值:'FSKY.MA60#DAY'
DRAWTEXT_FIX(ISLASTBAR,0.9,1,0,STRCAT('A60 : ',CON2STR(MA60,2))),画白色
输出
分时均价线:240的C*V日累和/240的V日累和,画黄色
昨高赋值:'FSKY.ZH#DAY'
昨低赋值:'FSKY.ZL#DAY'
DRAWTEXT_FIX(ISLASTBAR,0.9,1-0.25,0,STRCAT('昨低 : ',CON2STR(昨低,2))),画白色
DRAWTEXT_FIX(ISLASTBAR,0.9,1-0.3,0,STRCAT('昨高 : ',CON2STR(昨高,2))),画白色