SH:=12;LO:=24;MI:=9; FIRST:=IF(PERIOD=3,1/6,1/4); DIF0:=EMA(CLOSE,SH*FIRST)-EMA(CLOSE,LO*FIRST); DEA0:=EMA(DIF0,MI*FIRST); MACD0:=(DIF0-DEA0)*2; DIF1:=EMA(CLOSE,SH)-EMA(CLOSE,LO); DEA1:=EMA(DIF1,MI); MACD1:=(DIF1-DEA1)*2; STRONGER:=MACD1>0 AND MACD1-REF(MACD1,1)>REF((MACD1-REF(MACD1,1)),1); WEAKER:=MACD1<=0 AND ABS(MACD1)-REF(ABS(MACD1),1)<REF((ABS(MACD1)-REF(ABS(MACD1),1)),1); MID:=IF(PERIOD=1,3,4); DIF2:=EMA(CLOSE,SH*MID)-EMA(CLOSE,LO*MID); DEA2:=EMA(DIF2,MI*MID); MACD2:=(DIF2-DEA2)*2; LONG:=IF(PERIOD=6,24,IF(PERIOD=5,20,IF(PERIOD=4 OR PERIOD=3 OR PERIOD=2,16,IF(PERIOD=1,12,DRAWNULL)))); DIF3:=EMA(CLOSE,SH*LONG)-EMA(CLOSE,LO*LONG); DEA3:=EMA(DIF3,MI*LONG); MACD3:=(DIF3-DEA3)*2; UP1:=REF(HHV(DEA1,MI*LONG),1); DN1:=REF(LLV(DEA1,MI*LONG),1); ZZ1:=(UP1+DN1)/2; DRAWBAND(UP1,RGB(80,80,80),ZZ1,0); DRAWBAND(ZZ1,RGB(45,45,45),DN1,0); UP0:=REF(HHV(DEA0,IF(PERIOD=3,MI*MID/3*2,MI*MID)),1); DN0:=REF(LLV(DEA0,IF(PERIOD=3,MI*MID/3*2,MI*MID)),1); ZZ0:=(UP0+DN0)/2; DRAWBAND(UP0,RGB(30,30,30),ZZ0,0); DRAWBAND(ZZ0,RGB(15,15,15),DN0,0); STICKLINE(1,0,0,0.5,0),COLORF580F5; STICKLINE(UP0>=UP1,UP1,UP1,1,0),COLOR808080; STICKLINE(DN0<=DN1,DN1,DN1,1,0),COLOR808080; STICKLINE(UP0>=UP1,UP0,UP0,1,0),COLORAAAAAA; STICKLINE(DN0<=DN1,DN0,DN0,1,0),COLORAAAAAA; DRAWBAND(DEA0,RGB(100,100,100),DEA0,0); STICKLINE(MACD1>0,DIF1,DEA1,3,1),COLORF580F5; STICKLINE(MACD1<0,DIF1,DEA1,3,1),COLORCCDD33; STICKLINE(MACD1>0 AND MACD1>REF(MACD1,1),DIF1,DEA1,1,0),COLORF580F5; STICKLINE(MACD1<=0 AND MACD1<=REF(MACD1,1),DIF1,DEA1,1,0),COLORCCDD33; STICKLINE(DIF1>0 AND MACD1>0 AND MACD1>REF(MACD1,1),DIF1,DEA1,1,0),COLORMAGENTA; STICKLINE(DIF1<=0 AND MACD1<=0 AND MACD1<=REF(MACD1,1),DIF1,DEA1,1,0),COLORBLUE; DRAWTEXT(REF(MACD1,1)>0 AND MACD1>REF(MACD1,1) AND STRONGER,DEA1,'^^'),COLORRED; DRAWTEXT(REF(MACD1,1)<=0 AND MACD1<=REF(MACD1,1) AND WEAKER,DIF1,'^^'),COLORGREEN; STICKLINE(DIF2>DEA2,DIF2,DEA2,2.5,-1),COLORRED; STICKLINE(DIF2<=DEA2,DIF2,DEA2,2.5,-1),COLORGREEN; STICKLINE(DIF2-DEA2>REF(DIF2-DEA2,1) AND DIF2>DEA2,DIF2,DEA2,2.5,1),COLORRED; STICKLINE(DIF2-DEA2<=REF(DIF2-DEA2,1) AND DIF2<=DEA2,DIF2,DEA2,2.5,1),COLORGREEN; STICKLINE(MACD1>0 AND MACD1>REF(MACD1,1) AND MACD2>0 AND MACD2>=REF(MACD2,1),DIF2,DEA2,0.5,1),COLORRED; STICKLINE(MACD1<=0 AND MACD1<=REF(MACD1,1) AND MACD2<=0 AND MACD2<=REF(MACD2,1),DIF2,DEA2,0.5,1),COLORGREEN; STICKLINE(DIF3>DEA3,DIF3,DEA3,1.5,-1),COLORRED; STICKLINE(DIF3<=DEA3,DIF3,DEA3,1.5,-1),COLORGREEN; STICKLINE(DIF3-DEA3>REF(DIF3-DEA3,1) AND DIF3>DEA3,DIF3,DEA3,1.5,0),COLORRED; STICKLINE(DIF3-DEA3<=REF(DIF3-DEA3,1) AND DIF3<=DEA3,DIF3,DEA3,1.5,0),COLORGREEN; DRAWTEXT(ISLASTBAR AND PERIOD=2,(DIF1+DEA1)/2,'←15M'),COLORWHITE; DRAWTEXT(ISLASTBAR AND PERIOD=2,(DIF2+DEA2)/2,'←60M'),COLORYELLOW; DRAWTEXT(ISLASTBAR AND PERIOD=2,(DIF3+DEA3)/2,'←DAY'),COLORMAGENTA; DRAWTEXT(ISLASTBAR AND PERIOD=3,DEA0,'←5M'),COLORWHITE; DRAWTEXT(ISLASTBAR AND PERIOD=3,(DIF1+DEA1)/2,'←30M'),COLORWHITE; DRAWTEXT(ISLASTBAR AND PERIOD=3,(DIF2+DEA2)/2,'←2HOUR'),COLORYELLOW; DRAWTEXT(ISLASTBAR AND PERIOD=3,(DIF3+DEA3)/2,'←2DAY'),COLORMAGENTA; DRAWTEXT(ISLASTBAR AND PERIOD=4,DEA0,'←15M'),COLORRED; DRAWTEXT(ISLASTBAR AND PERIOD=4,(DIF1+DEA1)/2,'←60M'),COLORWHITE; DRAWTEXT(ISLASTBAR AND PERIOD=4,(DIF2+DEA2)/2,'←DAY'),COLORYELLOW; DRAWTEXT(ISLASTBAR AND PERIOD=4,(DIF3+DEA3)/2,'←WEEK'),COLORMAGENTA; DRAWTEXT(ISLASTBAR AND PERIOD=5,DEA0,'←60M'),COLORRED; DRAWTEXT(ISLASTBAR AND PERIOD=5,(DIF1+DEA1)/2,'←DAY'),COLORWHITE; DRAWTEXT(ISLASTBAR AND PERIOD=5,(DIF2+DEA2)/2,'←WEEK'),COLORYELLOW; DRAWTEXT(ISLASTBAR AND PERIOD=5,(DIF3+DEA3)/2,'←MONTH'),COLORMAGENTA; DRAWTEXT(ISLASTBAR AND PERIOD=6,DEA0,'←DAY'),COLORRED; DRAWTEXT(ISLASTBAR AND PERIOD=6,(DIF1+DEA1)/2,'←WEEK'),COLORWHITE; DRAWTEXT(ISLASTBAR AND PERIOD=6,(DIF2+DEA2)/2,'←MONTH'),COLORYELLOW; DRAWTEXT(ISLASTBAR AND PERIOD=6,(DIF3+DEA3)/2,'←HALF_YEAR'),COLORMAGENTA; |
- 软件大小:5.00 KB
- 推荐星级:
- 更新时间:2013-01-08 02:37:20
- 软件类别: 国产软件 / 通达信公式
- 软件语言:简体中文
- 授权方式: 免费版
- 联系方式:暂无联系方式
- 官方主页: Home Page
- 点击大图: 【一键转帖到论坛】
- 插件情况:
- 运行环境:Win9X/Win2000/WinXP/Win2003/
- 相关Tags:指标公式 股票软件,公式源码
-
(0)0%(0)0%
评论内容只代表网友观点,与本站立场无关!
本网提供的公式文件说明:
* alg格式飞狐股票公式,可以用飞狐交易师或者交易师软件导入;
* fnc格式大智慧新一代公式指标,可以用大智慧股票软件使用,少部分可以用分析家股票软件引入使用;
* exp格式大智慧经典版股票公式,仅可以用大智慧经典版股票软件引入使用;
* tni和tnc格式通达信股票公式,仅可以用通达信新引入使用,例如可以用通达信股票软件引入使用;
* tne,tn6格式通达信公式,可以用通达信公式编辑器5.0版导入,推荐通达信金融终端版本;
* hxf格式同花顺股票公式,仅可以用同花顺股票软件引入使用。
以上的各种软件都可以在本网股票软件栏目找到!
* 关于股票公式时间限制,如果在引入大智慧公式,交易师公式或者飞狐公式的时候,发现公式名称栏是空白的,这时候调整电脑时间到1997年,又能出现公式名称,并且能正常显示,可能是公式使用期限已过。
* 关于还原公式源码如果你忘记了自己编写的大智慧公式,通达信公式,同花顺公式,操盘手公式,飞狐公式,博易大师公式,金字塔公式,文华公式和交易师公式等等公式的密码,本网可帮恢复源码,有.偿.服.务无意勿扰,点击在线咨询联系我。
* 关于股票公式源码编辑
本网提供的源码,一般都可以编辑成公式,如果不明白公式的编辑,在本页右侧教程录像可参考,或者找公式教程资料学习,请搜索:教程
* 如果您发现软件内容或者链接错误,请点击报告错误谢谢!
* 站内提供的所有软件包含源码均是由网上搜集,若侵犯了你的版权利益,请联系通知我们!