天分时图通达信公式 主图 源码附图

RQ:=DATETODAY(DATE)-DATETODAY(REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT))+1;
JY:=BARSLAST((RQ-REF(RQ,1))!=WEEKDAY-REF(WEEKDAY,1) OR TOTALBARSCOUNT-CURRBARSCOUNT=0)+1;
MA1:=REF(C,JY);
MA2:=REF(MA1,JY);
MA3:=REF(MA2,JY);
MA4:=REF(MA3,JY);
MA5:=REF(MA4,JY);
MA6:=REF(MA5,JY);
MA7:=REF(MA6,JY);
MA8:=REF(MA7,JY);
MA9:=REF(MA8,JY);
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*8/9,COLORLIRED,DOTLINE;
支撑:L1+P1*0.5/9,COLORGREEN,DOTLINE;
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))+DYNAINFO(3);
DEA:=EMA(DIF,9);
MACD1:=10*(DIF-DEA);
MACD2:=EMA(MACD1,2);
STICKLINE(MACD1>=MACD2 AND MACD1>=0,DYNAINFO(3),MACD1+DYNAINFO(3),1,-1),COLORRED;
买1:=SUM((MACD1>=MACD2 AND MACD1>=0),0);
STICKLINE(MACD1<MACD2 AND MACD1>0,DYNAINFO(3),MACD1+DYNAINFO(3),1,-1),COLORFF0000;
卖2:=SUM((MACD1<MACD2 AND MACD1>0),0);
STICKLINE(MACD1>=MACD2 AND MACD1<0,DYNAINFO(3),MACD1+DYNAINFO(3),1,-1),COLOR00FFFF;
买2:=SUM((MACD1>=MACD2 AND MACD1<0),0);
STICKLINE(MACD1<MACD2 AND MACD1<0,DYNAINFO(3),MACD1+DYNAINFO(3),1,-1),COLOR408000;
卖1:=SUM((MACD1<MACD2 AND MACD1<0),0);
DRAWTEXT_FIX((买1+买2)>(卖1+卖2),0.1,1-0.7,0,STRCAT(STRCAT('【升力大】',CON2STR(买1+买2,2)),' 个')),COLORRED;
DRAWTEXT_FIX((买1+买2)<(卖1+卖2),0.1,1-0.6,0,STRCAT(STRCAT('【降力大】',CON2STR(卖1+卖2,2)),' 个')),COLORGREEN;
 
XX:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARSCOUNT(CLOSE));
主力:=EXPMA(CLOSE/XX,20);大户:=EXPMA(CLOSE/XX,60);散户:=EXPMA(CLOSE/XX,120);
底:=1;1.022,NODRAW;高:=1.033;
DRAWTEXT(CROSS(主力,1.02),C*0.999,' 拉'),COLORMAGENTA;
DRAWICON(CROSS(主力,1.04),C,45);
DRAWTEXT(CROSS(主力,1.04),C*0.999,' 冲'),COLORRED;
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)));
DRAWTEXT(LONGCROSS(支撑,C,2),C-0.01,' 买入'),COLOR0000FF;
DRAWICON(LONGCROSS(支撑,C,2),C-0.01,1);
STICKLINE(LONGCROSS(支撑,C,2),C,阻力,0,-1),COLORCYAN;
DRAWTEXT(LONGCROSS(C,阻力,2),C+0.01,' 卖出'),COLORGREEN;
DRAWICON(LONGCROSS(C,阻力,2),C+0.01,45);
STICKLINE(LONGCROSS(C,阻力,2),C,支撑,0,-1),COLORRED;
量价:=(VOL/CLOSE)/3;
B2:=SUM((IF(((量价>0.20) AND (CLOSE>(REF(CLOSE,1)))),量价,0)),0);
B3:=SUM((IF(((量价>0.20) AND (CLOSE<(REF(CLOSE,1)))),量价,0)),0);
B6:=B2+B3;DD1:=1;比:=B2/B3;
 
WA1:=V*C/100;
WA2:=SUM((IF(((WA1/8>20) AND (CLOSE>(REF(CLOSE,1)))),WA1,0)),0);
WA3:=SUM((IF(((WA1/8>20) AND (CLOSE<(REF(CLOSE,1)))),WA1,0)),0);
WA4:=SUM((IF(((WA1/8<20) AND (CLOSE>(REF(CLOSE,1)))),WA1,0)),0);
WA5:=SUM((IF(((WA1/8<20) AND (CLOSE<(REF(CLOSE,1)))),WA1,0)),0);
WA6:=((A2+A3)+A4)+A5;
WA7:=IF((ISLASTBAR),((100*WA2)/WA6),0);
WA8:=IF((ISLASTBAR),((100*WA3)/WA6),0);
WA9:=IF((ISLASTBAR),((100*WA4)/WA6),0);
WA10:=IF((ISLASTBAR),((100*WA5)/WA6),0);
主买:=(WA2);
主卖:=(WA3);
小买:=(WA4);
小卖:=(WA5);
DRAWTEXT_FIX(1,0.752,1-0.088,0,STRCAT(STRCAT('【主买】',CON2STR(主买,2)),' 万')),COLORRED;
DRAWTEXT_FIX(1,0.752,1-0.001,0,STRCAT(STRCAT('【主卖】',CON2STR(主卖,2)),' 万')),COLORGREEN;
DRAWTEXT_FIX(1,0.883,1-0.088,0,STRCAT(STRCAT('【小买】',CON2STR(小买,2)),' 万')),COLORMAGENTA;
DRAWTEXT_FIX(1,0.883,1-0.001,0,STRCAT(STRCAT('【小卖】',CON2STR(小卖,2)),' 万')),COLORCYAN;
分时:C,COLORGREEN,LINETHICK9;
IF(C>REF(C,1),分时,DRAWNULL),COLORRED,LINETHICK9;
IF(C<=REF(C,1),分时,DRAWNULL),COLORGREEN,LINETHICK9;
 
ZSTJJ,COLORYELLOW;
 




未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图