通达信斋主分时主图指标 分时高抛低吸 源码

前量:REF(VOL,2),NODRAW;
昨量:REF(VOL,1),NODRAW;
今量:VOL,NODRAW;
前开:REF(O,2),NODRAW,COLORCYAN;
前收:REF(C,2),NODRAW;
昨开:REF(O,1),NODRAW;
昨收:REF(C,1),NODRAW;
成交量:V,NODRAW;
换手:V*100/CAPITAL,NODRAW;
主力:MA(换手,4),COLORYELLOW,NODRAW;
大户:MA(换手,9),COLORLIBLUE,NODRAW;
中户:MA(换手,17),COLORMAGENTA,NODRAW;
散户:MA(换手,34),COLORGRAY,NODRAW;
量比: V/REF(MA(V,5),1),COLORBROWN,NODRAW;
几倍: V/REF(V,1),COLORYELLOW,NODRAW;
涨停:DYNAINFO(3)*1.1,COLORRED,NODRAW;
跌停:DYNAINFO(3)*0.9,COLORGREEN,NODRAW;



{板块信息}
DRAWTEXT_FIX(1,0.00,0,0,'行业:')COLORRED;
DRAWTEXT_FIX(1,0.03,0,0,HYBLOCK)COLORRED;
DRAWTEXT_FIX(1,0.00,0.04,0,'概念:')COLORYELLOW;
DRAWTEXT_FIX(1,0.03,0.04,0,GNBLOCK)COLORYELLOW;
DRAWTEXT_FIX(1,0.00,0.08,0,'地区:')COLORMAGENTA;
DRAWTEXT_FIX(1,0.03,0.08,0,DYBLOCK)COLORMAGENTA;
DRAWTEXT_FIX(1,0.00,0.12,0,'风格:')COLORCYAN;
DRAWTEXT_FIX(1,0.03,0.12,0,FGBLOCK)COLORCYAN;
DRAWTEXT_FIX(1,0.00,0.16,0,'指数:')COLORLIRED;
DRAWTEXT_FIX(1,0.03,0.16,0,ZSBLOCK)COLORLIRED;
DRAWTEXT_FIX(1,0.00,0.20,0,'自定:')COLORLIMAGENTA;
DRAWTEXT_FIX(1,0.03,0.20,0,ZDBLOCK)COLORLIMAGENTA;






MA30:=EMA(CLOSE,30);
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLOR00DD00;
支撑:L1+P1*0.5/8,COLOR00DD00;
现价:CLOSE,COLORWHITE,LINETHICK4;
STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),COLORYELLOW;
DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*1.001,'买'),COLORYELLOW;{吸}
STICKLINE(CROSS(现价,阻力),支撑,阻力,1,0),COLORBLUE;
DRAWTEXT(LONGCROSS(现价,阻力,2),现价*1.005,'★卖'),COLORRED;{抛};

日时转换:=IF(PERIOD=5,120,240);
QZS:=(EMA(CLOSE,10)+EMA(CLOSE,32))/2;
VAR1:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2;
VAR2:=(EMA(VOL,10)+EMA(VOL,32))/2;
VAR3:=(VAR1+VAR2)/2;
VAR4:=EMA(VAR3,30);
VAR5:=EMA(VAR3,60);
VAR6:=EVERY(VAR1>REF(VAR1,1),5) AND EVERY(VAR4>REF(VAR4,1),5);
DRAWBAND(VAR1,RGB(150,30,30),EMA(VAR1,60),RGB(0,110,30));
牵引线:VAR1,COLORYELLOW;{WWW.88GS.COM}
强弱线:EMA(VAR1,日时转换),POINTDOT,COLORWHITE;
趋势关注:IF(CROSS(VAR1,EMA(VAR1,60)) AND VAR6,1,0),NODRAW,COLORRED;
量价关注:IF(CROSS(VAR3,VAR5) AND VAR6,1,0),NODRAW,COLORWHITE;
冲击量:IF(VAR3>VAR5 AND VAR6,1,0),NODRAW,COLORYELLOW;
强势区:IF(VAR1>强弱线,1,DRAWNULL),NODRAW,COLORRED;
止损区:IF(VAR1<强弱线,1,DRAWNULL),NODRAW,COLORGREEN;
STICKLINE(QZS>VAR1,QZS,VAR1,1,0),COLORFF00FF;
STICKLINE(冲击量=1,QZS,VAR1,1,0),COLORYELLOW;
DRAWICON(趋势关注=1,EMA(VAR1,60),13);
DRAWTEXT(量价关注=1,EMA(VAR1,60),'★'),COLORWHITE;


DRAWTEXT(LONGCROSS(支撑,C,2),C,'--买入'),COLORRED;
DRAWTEXT(LONGCROSS(C,阻力,2),C,'--出货'),COLORGREEN;

LC:=REF(CLOSE,1);
WRSI:=SMA(MAX(CLOSE-LC,0),9,1)/SMA(ABS(CLOSE-LC),9,1)*100;
DRAWICON(CROSS(20,WRSI),C,1);
DRAWICON(CROSS(WRSI,80),C,2);
DRAWICON(CROSS(20,"RSI.RSI1"(9)),C,1);
DRAWICON(CROSS("RSI.RSI1"(9),80),C,2);

均价:=SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1;
TT:=BARSCOUNT(C);均:=MA(C,TT);
上均线:=均+2*STD(C,3);下均线:=均-2*STD(C,3);
时长:=TIME>93000;涨幅:=C/REF(C,1)>1.02;跌幅:=C/REF(C,1)<0.98;
横盘:=((HHV(C,TT)-LLV(C,TT))/C)<0.05;YY:=SMA(VOL,30,1);
放量:=(YY-LLV(LLV(YY,1),30))/(HHV(HHV(YY,1),30)-LLV(LLV(YY,1),30))>0.95;
涨跌幅:=涨幅 OR 跌幅;
横涨1:=涨跌幅=0 AND 横盘 AND 放量 AND CROSS(均价,均);
DRAWTEXT(FILTER(横涨1,10),C,'突'),COLORYELLOW;
DRAWICON(FILTER(横涨1,10),均价,23);
IF(MACD.DEA<0,C,DRAWNULL),COLORYELLOW ,LINETHICK9;


XXZ:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARSCOUNT(CLOSE));
{主力:=EXPMA(CLOSE/XXZ,20);大户:=EXPMA(CLOSE/XXZ,60);散户:=EXPMA(CLOSE/XXZ,120);}
底:=1;1.02,NODRAW;高:=1.03;
AA:=主力>大户 AND 主力>1.003 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60);
DRAWICON(主力>大户 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60) AND 主力=HHV(主力,30) AND CROSS(主力,1.003),C,38);
DRAWTEXT(主力>大户 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60) AND 主力=HHV(主力,30) AND CROSS(主力,1.003),C*0.999,'-主力'),COLORYELLOW;
DRAWICON(CROSS(主力,1.02),C,24);
DRAWTEXT(CROSS(主力,1.02),C*0.999,'--拉升'),COLORCYAN;
DRAWICON(CROSS(主力,1.04),C,6);
DRAWTEXT(CROSS(主力,1.04),C*0.999,'--冲涨停'),COLORLIMAGENTA;
DRAWICON(CROSS(散户,主力),C,6);
DRAWTEXT(CROSS(散户,主力),C*0.9995,'--小心'),COLORGREEN;
DRAWICON(CROSS(散户,大户),C,6);
DRAWTEXT(CROSS(散户,大户),C*0.9995,'--走弱'),COLORGREEN;


IF(MACD.DEA<0,C,DRAWNULL),COLORYELLOW ,LINETHICK9;

{分时弹压}
BAA:=(DYNAINFO(5)-DYNAINFO(3))/DYNAINFO(3)*100;
BAB:=ABS((DYNAINFO(6)-DYNAINFO(3))/DYNAINFO(3)*100);
BAC:=MAX(BAA,BAB);


新高:=HHV(H,480);
新低:=LLV(L,480);
EAA:=(CLOSE-新高)/新高*100;
EAB:=(CLOSE-新低)/新低*100;
XGZ:=FILTER(CROSS(C,REF(新高,1)),10);
XD:=FILTER(CROSS(C,REF(新低,1)),10);
STICKLINE(XGZ,均价,C*1.002,8,0),COLORLIRED;
STICKLINE(XD,均价,C*0.998,8,0),COLORCYAN;
时5:MA(C,300),COLORMAGENTA;
T:=CURRBARSCOUNT;

DRAWICON(FILTER(CROSS(C,DYNAINFO(3)*1.1-0.01),60),C,1),COLORCYAN;

DRAWNUMBER(FILTER(CROSS(C,DYNAINFO(3)*1.1-0.01),60),C*0.99,TIME),COLORYELLOW;

DRAWNUMBER(FILTER(CROSS(C,DYNAINFO(3)*1.1-0.01),60),C*0.98,C),COLORRED;






TZ:=(TIME2<=100000);
HH:=HHV(C*TZ,0);
LL:=LLV(C*TZ,0);
T2Z:=C=HH AND TZ;
T4Z:=C=LL&&T;
T3Z:=CROSS(SUM(T2Z,0)=CONST(SUM(T2Z,0)),0.5);
T5:=CROSS(SUM(T4Z,0)=CONST(SUM(T4Z,0)),0.5);
线:REF(C,BARSLAST(T3Z)),COLORBLUE,DOTLINE;
DRAWNUMBER(ISLASTBAR,线,线),COLORBLUE;
线1:REF(C,BARSLAST(T5)),COLORLIBLUE,DOTLINE;
DRAWNUMBER(ISLASTBAR,线1,线1),COLORLIBLUE;
日前最高量:=FINDHIGH(V,FROMOPEN,240,1)COLORCYAN,NODRAW;
竞价量:=DYNAINFO(15)/O/100;
今昨竞价比:=IF(BARSCOUNT(V)>=240,竞价量/日前最高量,DRAWNULL),NODRAW;
JJCJLW:=DYNAINFO(15)/DYNAINFO(4)/100;{集竞成交量}
DRAWTEXT_FIX(1,0.69,1-0.17,0,STRCAT(STRCAT('【今昨竞价比】 ',CON2STR(今昨竞价比,2)),'')),COLORRED;
DRAWTEXT_FIX(1,0.58,1-0.2,0,STRCAT(STRCAT('【昨日最高量】 ',CON2STR(日前最高量,2)),'手')),COLORYELLOW;
DRAWTEXT_FIX(1,0.58,1-0.15,0,STRCAT(STRCAT('【今日竞价量】 ',CON2STR(JJCJLW,2)),'手')),COLORMAGENTA;




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

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

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