投股票网 www.tou18.cn [今日股市行情 股市在线查询 股票大盘行情] 股市有风险 投资需谨慎 手机APP下载 | 手机访问 | 加入收藏 | 保存到桌面
投股票网
今日股市行情 股市在线查询 股票大盘行情
个股查询: 资金行情 DDX查询 大智慧超赢 同花顺DDE 千股千评 最新提示 股票公告 投资要点 评级查询 大小非 股东 增发配股 股权 高管 股票概况
当前位置: 投股票网 > 股市公式下载 > 公式问题
股市公式查询:

把青松红牛公式改为通达信指标

2019/12/16 18:56:33

公式编写说明:

发现这个指标不错,可惜自己用不了,请求老师把这个大智慧主图源码改为通达信!!谢谢!!《青松红牛》DRAWTEXTREL(20,30,'青松红牛'),LINETHICK6,COLORYELLOW;DRAWTEXTREL(250,30,STKLABEL+' '+STKNAME),LINETHICK6,COLORFFFF80;IF DISPSTATUS=2 THEN BEGIN;VAR100:='所属板块:';IF INBLOCK('电力')=1 THEN VAR100:=VAR100+' 电力';IF INBLOCK('电脑')=1 THEN VAR100:=VAR100+' 电脑';IF INBLOCK('电器')=1 THEN VAR100:=VAR100+' 电器';IF INBLOCK('电子信息')=1 THEN VAR100:=VAR100+' 电子信息';IF INBLOCK('房地产')=1 THEN VAR100:=VAR100+' 房地产';IF INBLOCK('纺织服装')=1 THEN VAR100:=VAR100+' 纺织服装';IF INBLOCK('钢铁')=1 THEN VAR100:=VAR100+' 钢铁';IF INBLOCK('工程建筑')=1 THEN VAR100:=VAR100+' 工程建筑';IF INBLOCK('供水供气')=1 THEN VAR100:=VAR100+' 供水供气';IF INBLOCK('化工')=1 THEN VAR100:=VAR100+' 化工';IF INBLOCK('化纤')=1 THEN VAR100:=VAR100+' 化纤';IF INBLOCK('机械')=1 THEN VAR100:=VAR100+' 机械';IF INBLOCK('建材')=1 THEN VAR100:=VAR100+' 建材';IF INBLOCK('交通工具')=1 THEN VAR100:=VAR100+' 交通工具';IF INBLOCK('交通设施')=1 THEN VAR100:=VAR100+' 交通设施';IF INBLOCK('教育传媒')=1 THEN VAR100:=VAR100+' 教育传媒';IF INBLOCK('金融')=1 THEN VAR100:=VAR100+' 金融';IF INBLOCK('旅游酒店')=1 THEN VAR100:=VAR100+' 旅游酒店';IF INBLOCK('煤炭石油')=1 THEN VAR100:=VAR100+' 煤炭石油';IF INBLOCK('酿酒食品')=1 THEN VAR100:=VAR100+' 酿酒食品';IF INBLOCK('农林牧渔')=1 THEN VAR100:=VAR100+' 农林牧渔';IF INBLOCK('其他行业')=1 THEN VAR100:=VAR100+' 其他行业';IF INBLOCK('汽车')=1 THEN VAR100:=VAR100+' 汽车';IF INBLOCK('汽配')=1 THEN VAR100:=VAR100+' 汽配';IF INBLOCK('商业连锁')=1 THEN VAR100:=VAR100+' 商业连锁';IF INBLOCK('石化')=1 THEN VAR100:=VAR100+' 石化';IF INBLOCK('通信')=1 THEN VAR100:=VAR100+' 通信';IF INBLOCK('外贸')=1 THEN VAR100:=VAR100+' 外贸';IF INBLOCK('医药')=1 THEN VAR100:=VAR100+' 医药';IF INBLOCK('仪电仪表')=1 THEN VAR100:=VAR100+' 仪电仪表';IF INBLOCK('有色金属')=1 THEN VAR100:=VAR100+' 有色金属';IF INBLOCK('运输物流')=1 THEN VAR100:=VAR100+' 运输物流';IF INBLOCK('造纸印刷')=1 THEN VAR100:=VAR100+' 造纸印刷';IF INBLOCK('安徽')=1 THEN VAR100:=VAR100+' 安徽';IF INBLOCK('北京')=1 THEN VAR100:=VAR100+' 北京';IF INBLOCK('福建')=1 THEN VAR100:=VAR100+' 福建';IF INBLOCK('甘肃')=1 THEN VAR100:=VAR100+' 甘肃';IF INBLOCK('广东')=1 THEN VAR100:=VAR100+' 广东';IF INBLOCK('广西')=1 THEN VAR100:=VAR100+' 广西';IF INBLOCK('贵州')=1 THEN VAR100:=VAR100+' 贵州';IF INBLOCK('海南')=1 THEN VAR100:=VAR100+' 海南';IF INBLOCK('河北')=1 THEN VAR100:=VAR100+' 河北';IF INBLOCK('河南')=1 THEN VAR100:=VAR100+' 河南';IF INBLOCK('黑龙江')=1 THEN VAR100:=VAR100+' 黑龙江';IF INBLOCK('湖北')=1 THEN VAR100:=VAR100+' 湖北';IF INBLOCK('湖南')=1 THEN VAR100:=VAR100+' 湖南';IF INBLOCK('吉林')=1 THEN VAR100:=VAR100+' 吉林';IF INBLOCK('江苏')=1 THEN VAR100:=VAR100+' 江苏';IF INBLOCK('江西')=1 THEN VAR100:=VAR100+' 江西';IF INBLOCK('辽宁')=1 THEN VAR100:=VAR100+' 辽宁';IF INBLOCK('内蒙古')=1 THEN VAR100:=VAR100+' 内蒙古';IF INBLOCK('宁夏')=1 THEN VAR100:=VAR100+' 宁夏';IF INBLOCK('青海')=1 THEN VAR100:=VAR100+' 青海';IF INBLOCK('山东')=1 THEN VAR100:=VAR100+' 山东';IF INBLOCK('山西')=1 THEN VAR100:=VAR100+' 山西';IF INBLOCK('陕西')=1 THEN VAR100:=VAR100+' 陕西';IF INBLOCK('上海')=1 THEN VAR100:=VAR100+' 上海';IF INBLOCK('深圳')=1 THEN VAR100:=VAR100+' 深圳';IF INBLOCK('四川')=1 THEN VAR100:=VAR100+' 四川';IF INBLOCK('天津')=1 THEN VAR100:=VAR100+' 天津';IF INBLOCK('***')=1 THEN VAR100:=VAR100+' ***';IF INBLOCK('新疆')=1 THEN VAR100:=VAR100+' 新疆';IF INBLOCK('云南')=1 THEN VAR100:=VAR100+' 云南';IF INBLOCK('浙江')=1 THEN VAR100:=VAR100+' 浙江';IF INBLOCK('重庆')=1 THEN VAR100:=VAR100+' 重庆';IF INBLOCK('3G')=1 THEN VAR100:=VAR100+' 3G';IF INBLOCK('H股')=1 THEN VAR100:=VAR100+' H股';IF INBLOCK('QFII持股')=1 THEN VAR100:=VAR100+' QFII持股';IF INBLOCK('ST')=1 THEN VAR100:=VAR100+' ST';IF INBLOCK('奥运')=1 THEN VAR100:=VAR100+' 奥运';IF INBLOCK('创投')=1 THEN VAR100:=VAR100+' 创投';IF INBLOCK('次新股')=1 THEN VAR100:=VAR100+' 次新股';IF INBLOCK('大盘')=1 THEN VAR100:=VAR100+' 大盘';IF INBLOCK('股权改革')=1 THEN VAR100:=VAR100+' 股权改革';IF INBLOCK('股权投资')=1 THEN VAR100:=VAR100+' 股权投资';END;DD5:=FINANCE2( 35);SS5:=FINANCE2( 37);FF5:=FINANCE2(18);GG5:=FINANCE2(3);HH5:=DYNAINFO(39);DRAWTEXTREL(20,190,VAR100),COLOR00FFFF; DRAWTEXTREL(20,150,'市盈率:'+NUMTOSTRN(HH5,2)+'%'+' 每股收益:'+NUMTOSTRN(GG5,3)),COLORBBFFFF;IF C>0 AND DISPSTATUS=2 THEN DRAWTEXTREL(20,110,'总股本:'+NUMTOSTRN(DD5,0)+'万股' +' 流通A股:'+NUMTOSTRN(SS5,0)+'万股'),COLORBBFFFF;DRAWGBKLAST(C>0,STRIP(RGB(10,60,0),RGB(10,10,0),0));获利90:EMA(COST(90),5),LINETHICK0,COLORFFFFFF;A:=(3*C+L+O+H)/6;X:=WMA(A,20);RCC:=DYNAINFO(3);S2:=SMA(C,3,1);S6:=SMA(C,5,1);DK:=2*(S2-S6);STICKLINE(DK>0,RCC,RCC+DK,0,1),COLORRED;STICKLINE(DK<0,RCC,RCC+DK,0,1),COLORCYAN;主力成本:EMA(X,13),COLORFF00FF,LINETHICK0;短期底部:LLV(HIGH,30),LINETHICK2,COLORFFCC00;STICKLINE(OPEN>=CLOSE ,O,C,6,0 ),COLORBBBBBB;STICKLINE(OPEN>=CLOSE ,O,C,2.4,0 ),COLORCCCCCC;STICKLINE(OPEN>=CLOSE ,O,C,1.1,0 ),COLORDDDDDD;STICKLINE(CLOSE>OPEN,O,C,9,0 ),COLOR6666CC;STICKLINE(CLOSE>OPEN,O,C,6 ,0 ),COLOR7777DD; STICKLINE(CLOSE>OPEN,O,C,2.4 ,0 ),COLOR8888EE; STICKLINE(CLOSE>OPEN,O,C,1.1 ,0 ),COLOR9999FF;STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOR1199FF; STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOR1199FF;STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),COLORCCCCCC; STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),COLORCCCCCC;RC:RCC,COLORBROWN;MA(C,9);STICKLINE(CROSS(MA(C,1),MA(C,9)),CLOSE,OPEN,8,0),COLORRED; STICKLINE(CROSS(MA(C,1),MA(C,9)),HIGH,LOW,0.8,0),COLORRED;STICKLINE(CROSS(MA(C,1),MA(C,55)),CLOSE,OPEN,6,0),COLORRED; STICKLINE(CROSS(MA(C,1),MA(C,55)),HIGH,LOW,0.6,0),COLORRED;STICKLINE(CROSS(MA(C,1),MA(C,23.5)),CLOSE,OPEN,7,0),COLORYELLOW; STICKLINE(CROSS(MA(C,1),MA(C,23.5)),HIGH,LOW,0.7,0),COLORYELLOW;STICKLINE(CROSS(MA(C,1),MA(C,120)),CLOSE,OPEN,5,0),COLORMAGENTA; STICKLINE(CROSS(MA(C,1),MA(C,120)),HIGH,LOW,0.5,0),COLORMAGENTA;PARTLINE(MA(C,3),MA(C,3)),COLORYELLOW,LINETHICK2;PARTLINE(MA(C,9),MA(C,9)),COLORMAGENTA,LINETHICK2;PARTLINE(MA(C,23.5),MA(C,23.5)),COLORWHITE;MA5:=MA(C,5);MA10:=MA(C,10);MA30:=MA(C,30);FA:=BARSLAST(CROSS(MA10,MA5)) AND CROSS(MA5,MA10);FB:=FA AND MA5>MA30 AND MA10>MA30 AND MA10>REF(MA10,1);STICKLINE(FB,L,L-0.09,4,0),COLORRED;DRAWTEXT(FB,L-0.58,'★红牛'),COLORRED,ALIGN0;V1:=EMA(CLOSE,5);V2:=EMA(EMA(CLOSE,90)*1.01,10);DRAWTEXT(CROSS(V1,V2),V1+0.05,'牛起步'),COLOR00FF00,LINETHICK0;VAR1:=LLV(LOW,21);VAR2:=HHV(HIGH,21);AK1:=EMA((((CLOSE - VAR1) / (VAR2 - VAR1)) * 100),5);AK:=EMA((((CLOSE - VAR1) / (VAR2 - VAR1)) * 50),13);AB:=CROSS(AK1,AK);DRAWICON(CROSS(V1,V2),V2,4);DRAWTEXT((AB = 1),(LOW * 0.99),'○牛窝'),COLORYELLOW;{指数贡献值:(C-REF(MA(C,5),5))*FINANCE(1),COLORRED,LINETHICK0;}市值贡献值:CAPITAL/100*CLOSE/10000,COLORGREEN,LINETHICK0;{资金贡献值:EMA(AMOUNT,3)/FINANCE(7),COLORMAGENTA,LINETHICK0;}AA1:=AMOUNT/V;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=V<MA(V,5)*1.5;老鼠仓:BB1 AND CC1 AND DD1 AND EE1,LINETHICK0,COLOR0099FF;DRAWTEXT(老鼠仓,L*0.99,' 老鼠仓'),COLOR0099FF;STICKLINE(老鼠仓,H,L,2,0),COLOR0099FF;STICKLINE(老鼠仓,O,C,2,0),COLOR0099FF;BIAS2 := (CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;STICKLINE(BIAS2<-6,H,L,1,0),COLORGREEN;STICKLINE(BIAS2<-6,C,O,2,1),COLORGREEN;DRAWTEXTREL(10,850,'股经:选做强势股,不做无量阴跌股。弱势不追高,强势不抄底。均线角度的上下臗大小,'),COLORFFFFFF;DRAWTEXTREL(10,900,' 決定了趨勢方向及利潤空镚。连续三根阴线必杀。空心绿K线(观察大盘)超跌很准。'),COLORFFFFFF;VAR666:=REF(C,1);VAR777:=SMA(MAX(C-VAR666,0),6,1)/SMA(ABS(C-VAR666),6,1)*100;DRAWTEXT(CROSS(82,VAR777),H*1.01,'▼逃顶'),COLORYELLOW ;VVV1:=REF(C,REF(HHVBARS(V,21),0)); MMM1:=MA(CLOSE,1); AAAA:=V>1*REF(V,1) AND (C/REF(C,1)-1)*100>9.5 AND MMM1>=VVV1; DRAWICON(CROSS(A,1),L*0.98,6),COLORRED; DRAWTEXT(AAAA,L*0.93,'涨停'),LINETHICK1,COLORRED;

公式源码回答:

 A:=(3*C+L+O+H)/6;

X:=EMA(A,20);
RCC:=DYNAINFO(3);
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
DK:=2*(S2-S6);
STICKLINE(DK>0,RCC,RCC+DK,0,1),COLORRED;
STICKLINE(DK<0,RCC,RCC+DK,0,1),COLORCYAN;
主力成本:=EMA(X,13),COLORFF00FF,LINETHICK0;
短期底部:=LLV(HIGH,30),LINETHICK2,COLORFFCC00;
STICKLINE(OPEN>=CLOSE ,O,C,6,0 ),COLORBBBBBB;
STICKLINE(OPEN>=CLOSE ,O,C,2.4,0 ),COLORCCCCCC;
STICKLINE(OPEN>=CLOSE ,O,C,1.1,0 ),COLORDDDDDD;
STICKLINE(CLOSE>OPEN,O,C,9,0 ),COLOR6666CC;
STICKLINE(CLOSE>OPEN,O,C,6 ,0 ),COLOR7777DD; 
STICKLINE(CLOSE>OPEN,O,C,2.4 ,0 ),COLOR8888EE; 
STICKLINE(CLOSE>OPEN,O,C,1.1 ,0 ),COLOR9999FF;
STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOR1199FF; 
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOR1199FF;
STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),COLORCCCCCC; 
STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),COLORCCCCCC;
RC:RCC,COLORBROWN;
MA(C,9);
STICKLINE(CROSS(MA(C,1),MA(C,9)),CLOSE,OPEN,8,0),COLORRED; 
STICKLINE(CROSS(MA(C,1),MA(C,9)),HIGH,LOW,0.8,0),COLORRED;
STICKLINE(CROSS(MA(C,1),MA(C,55)),CLOSE,OPEN,6,0),COLORRED; 
STICKLINE(CROSS(MA(C,1),MA(C,55)),HIGH,LOW,0.6,0),COLORRED;
STICKLINE(CROSS(MA(C,1),MA(C,23.5)),CLOSE,OPEN,7,0),COLORYELLOW; 
STICKLINE(CROSS(MA(C,1),MA(C,23.5)),HIGH,LOW,0.7,0),COLORYELLOW;
STICKLINE(CROSS(MA(C,1),MA(C,120)),CLOSE,OPEN,5,0),COLORMAGENTA; 
STICKLINE(CROSS(MA(C,1),MA(C,120)),HIGH,LOW,0.5,0),COLORMAGENTA;
MA3:=MA(C,3),COLORYELLOW,LINETHICK2;
MA9:=MA(C,9),COLORMAGENTA,LINETHICK2;
MA23.5:=MA(C,23.5),COLORWHITE;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA30:=MA(C,30);
FA:=BARSLAST(CROSS(MA10,MA5)) AND CROSS(MA5,MA10);
FB:=FA AND MA5>MA30 AND MA10>MA30  AND MA10>REF(MA10,1);
STICKLINE(FB,L,L-0.09,4,0),COLORRED;
DRAWTEXT(FB,L-0.58,'★红牛'),COLORRED;
V1:=EMA(CLOSE,5);
V2:=EMA(EMA(CLOSE,90)*1.01,10);
DRAWTEXT(CROSS(V1,V2),V1+0.05,'牛起步'),COLOR00FF00,LINETHICK0;
VAR1:=LLV(LOW,21);
VAR2:=HHV(HIGH,21);
AK1:=EMA((((CLOSE - VAR1) / (VAR2 - VAR1)) * 100),5);
AK:=EMA((((CLOSE - VAR1) / (VAR2 - VAR1)) * 50),13);
AB:=CROSS(AK1,AK);
DRAWICON(CROSS(V1,V2),V2,4);
DRAWTEXT((AB = 1),(LOW * 0.99),'○牛窝'),COLORYELLOW;
AA1:=AMOUNT/V;
BB1:=L<AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD1:=L<MA(C,5)*0.921;
EE1:=V<MA(V,5)*1.5;
老鼠仓:BB1 AND CC1 AND DD1 AND EE1,LINETHICK0,COLOR0099FF;
DRAWTEXT(老鼠仓,L*0.99,' 老鼠仓'),COLOR0099FF;
STICKLINE(老鼠仓,H,L,2,0),COLOR0099FF;
STICKLINE(老鼠仓,O,C,2,0),COLOR0099FF;
BIAS2 := (CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
STICKLINE(BIAS2<-6,H,L,1,0),COLORGREEN;
STICKLINE(BIAS2<-6,C,O,2,1),COLORGREEN;
VAR666:=REF(C,1);
VAR777:=SMA(MAX(C-VAR666,0),6,1)/SMA(ABS(C-VAR666),6,1)*100;
DRAWTEXT(CROSS(82,VAR777),H*1.01,'▼逃顶'),COLORYELLOW ;
VVV1:=REF(C,REF(HHVBARS(V,21),0)); 
MMM1:=MA(CLOSE,1); 
AAAA:=V>1*REF(V,1) AND (C/REF(C,1)-1)*100>9.5 AND MMM1>=VVV1; 
DRAWICON(CROSS(A,1),L*0.98,6),COLORRED; 
DRAWTEXT(AAAA,L*0.93,'涨停'),LINETHICK1,COLORRED;

投股 票网 www.tou18 .cn

股市公式下载推荐
投股票网股市查询:资金行情查询 实时DDX查询 大智慧超赢 千股千评 最新提示 股票公告 投资要点 评级查询 股东查询 增发配股查询 股权结构查询
光峰科技 688007+4.17% 评股 实时DDX 大智慧 最新消息 题材分析 股权
*ST康美 600518+4.15% 评股 实时DDX 大智慧 最新消息 题材分析 股权
科瑞技术 002957+4.14% 评股 实时DDX 大智慧 最新消息 题材分析 股权
蓝特光学 688127+4.12% 评股 实时DDX 大智慧 最新消息 题材分析 股权
奥克股份 300082+4.11% 评股 实时DDX 大智慧 最新消息 题材分析 股权
南大光电 300346+4.09% 评股 实时DDX 大智慧 最新消息 题材分析 股权
号百控股 600640+4.09% 评股 实时DDX 大智慧 最新消息 题材分析 股权
中航沈飞 600760+4.04% 评股 实时DDX 大智慧 最新消息 题材分析 股权
大洋电机 002249+4.04% 评股 实时DDX 大智慧 最新消息 题材分析 股权
*ST中华A 000017+4.04% 评股 实时DDX 大智慧 最新消息 题材分析 股权
联系我们:nmsy8@hotmail.com 友情链接 要求相关的财经股票网站 今日股市行情在线查询
本站不推荐任何股票,站内广告不代表投股票网的观点,由此引起的一切法律责任均与本站无关,请网民自行判断真假,谨防网上股票预测诈骗!
本站所有内容仅供参考,不构成投资建议,据此操作,风险自担。本站不为所提供数据的错误或因依此信息所采取的任何行为负责。
手机版(手机访问当前页面) | 手机APP下载 | 电脑端(适合电脑或大屏用户) | 备案号:沪ICP备2024045114号-120