最新更新 - 网站地图 - 手机版
您的当前位置:爱购股票学习网 > 股票公式 > 公式技巧 > 把青松红牛公式改为通达信指标

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

来源:网络 点击: 时间:2018-08-19

编写要求:

发现这个指标不错,可惜自己用不了,请求老师把这个大智慧主图源码改为通达信!!谢谢!! 《青松红牛》 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:=L1.2; DD1:=L1*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);

标签:

    Copyright 2018- www.igojr.com 爱购股票学习网 版权所有 邮箱:terrylm@qq.com

    免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!

    Top