分析家公式网,提供指标公式,股票软件 用户登录  |  用户 注册

软件名称:[B]给股票算八字,易学指标(通达信公式 副图 源码 测试图)[/B]
软件类型:国产软件
运行环境:Win10/Win9X/Win8/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:免费版
软件大小:0 Bytes
官方主页:Home Page
更新时间:2021-05-12 00:06:06
软件简介:

{给股票算八字}
{参数:高低开收,最小1 最大4 缺省4}
DRAWRECTREL(0,900,356,1000,RGB(80,80,80));
DA:=YEAR AND MONTH AND DAY;
AAA:=STRCAT(CON2STR(YEAR,0),'年');
AAB:=STRCAT(CON2STR(MONTH,0),'月');
AA33:=STRCAT(CON2STR(DAY,0),'日');
AA4:=STRCAT('【',IF(WEEKDAY=1,'星期一',IF(WEEKDAY=2,'星期二',IF(WEEKDAY=3,'星期三',IF(WEEKDAY=4,'星期四',IF(WEEKDAY=5,'星期五',IF(WEEKDAY=6,'六','日')))))));
AA:=STRCAT(STRCAT(STRCAT(AAA,AAB),STRCAT(AA33,AA4)),'】');
DRAWTEXT_FIX(DA,0.21,0.97,0,AA),COLORRED;
K1:=MOD(DATETODAY(DATE),10);{1990年12月19日是戊午日,纳甲序数55,再过6天就是甲子,减掉的数值越大,前面的盲区越远,如果不想留下盲区可以不减,只是从K=0开始,第一位就是戊午了}
K2:=MOD(DATETODAY(DATE),12);{1990年12月19日是戊午日,纳甲序数55,再过6天就是甲子,减掉的数值越大,前面的盲区越远,如果不想留下盲区可以不减,只是从K=0开始,第一位就是戊午了}
TXT1:=IF(K1=0,'戊',IF(K1=1,'己',IF(K1=2,'庚',IF(K1=3,'辛',IF(K1=4,'壬',IF(K1=5,'癸',IF(K1=6,'甲',IF(K1=7,'乙',IF(K1=8,'丙',IF(K1=9,'丁',''))))))))));
TXT2:=IF(K2=0,'午日',IF(K2=1,'未日',IF(K2=2,'申日',IF(K2=3,'酉日',IF(K2=4,'戌日',IF(K2=5,'亥日',IF(K2=6,'子日',IF(K2=7,'丑日',IF(K2=8,'寅日',IF(K2=9,'卯日',IF(K2=10,'辰日',IF(K2=11,'巳日',''))))))))))));
{算八字原理:干支从1开始,从1970到1900天数25567+1 ,通达信数据是从1990.12.19开始,到1900的天数33224+1,0.375是收盘修正}
距日:=DATETODAY(DATE)+33225-0.375+1,NODRAW;
流年:=INTPART(DATE/10000),NODRAW;
流月:=(MOD(INTPART(DATE/100),100)-1)*2,NODRAW;
积日:=365.242*流年+6.15+15.2226*流月-1.9*SIN(0.262*流月),NODRAW;
立春:=365.242*流年+6.15+15.2226*2-1.9*SIN(0.262*2),NODRAW;
年干:MOD(流年-(距日<立春)+6,10)+1,NODRAW;
年支:MOD(流年-(距日<立春)+12,12)+1,NODRAW;
月干:MOD(流年*12+MOD(INTPART(DATE/100),100)-(距日<积日)+2,10)+1,NODRAW;
月支:MOD(流年*12+MOD(INTPART(DATE/100),100)-(距日<积日),12)+1,NODRAW;
TXT3:=IF(月干=5,'戊',IF(月干=6,'己',IF(月干=7,'庚',IF(月干=8,'辛',IF(月干=9,'壬',IF(月干=10,'癸',IF(月干=1,'甲',IF(月干=2,'乙',IF(月干=3,'丙',IF(月干=4,'丁',''))))))))));
TXT4:=IF(月支=7,'午月',IF(月支=8,'未月',IF(月支=9,'申月',IF(月支=10,'酉月',IF(月支=11,'戌月',IF(月支=12,'亥月',IF(月支=1,'子月',IF(月支=2,'丑月',IF(月支=3,'寅月',IF(月支=4,'卯月',IF(月支=5,'辰月',IF(月支=6,'巳月',''))))))))))));
TXT5:=IF(年干=5,'戊',IF(年干=6,'己',IF(年干=7,'庚',IF(年干=8,'辛',IF(年干=9,'壬',IF(年干=10,'癸',IF(年干=1,'甲',IF(年干=2,'乙',IF(年干=3,'丙',IF(年干=4,'丁',''))))))))));
TXT6:=IF(年支=7,'午年',IF(年支=8,'未年',IF(年支=9,'申年',IF(年支=10,'酉年',IF(年支=11,'戌年',IF(年支=12,'亥年',IF(年支=1,'子年',IF(年支=2,'丑年',IF(年支=3,'寅年',IF(年支=4,'卯年',IF(年支=5,'辰年',IF(年支=6,'巳年',''))))))))))));
{旬空}
KK:=MOD(DATETODAY(DATE)-6,60);
X:=INTPART(KK/10);
旬空:=IF(X=0,11,IF(X=1,9,IF(X=2,7,IF(X=3,5,IF(X=4,3,IF(X=5,1,DRAWNULL)))))),NODRAW;
TXT7:=IF(X=0,'戌亥空',IF(X=1,'申酉空',IF(X=2,'午未空',IF(X=3,'辰巳空',IF(X=4,'寅卯空',IF(X=5,'子丑空',''))))));
BZ:=STRCAT(STRCAT(STRCAT(STRCAT(TXT5,TXT6),', '),STRCAT(STRCAT(STRCAT(TXT3,TXT4),'; '),STRCAT(STRCAT(TXT1,TXT2),', '))),TXT7);
DRAWTEXT_FIX(ISLASTBAR,0.03,0.97,0,BZ),COLORYELLOW;
 
{本指标价咯计算没有解决大盘指数末尾为0的情况,还需要细化修正,并且引用的是即时行情数据而不是成交列表数值,一定要注意。比如:2017年5月11日收盘3061.50点应该是天水讼却变成天山遁,动爻也不对。}
 
JG:=IF(高低开收=1,H,IF(高低开收=2,L,IF(高低开收=3,O,IF(高低开收=4,C,DRAWNULL))));
位数上:=IF(JG>=10000,INTPART(JG/100),IF(JG>=1000 AND JG<10000,INTPART(JG/10),IF(JG>=100 AND JG<1000,INTPART(JG/10),IF(JG>=10 AND JG<100,INTPART(JG),IF(JG>=10 AND JG<100,INTPART(JG),IF(JG<10,INTPART(JG),DRAWNULL))))));
位数下:=IF(JG>=10000,FRACPART(JG/100)*10000,IF(JG>=1000 AND JG<10000,FRACPART(JG/10)*1000,IF(JG>=100 AND JG<1000,FRACPART(JG/10)*1000,IF(JG>=10 AND JG<100,FRACPART(JG)*100,IF(JG<10,FRACPART(JG)*100,DRAWNULL)))));
W1:=IF(位数上>=1000,INTPART(位数上/1000)+(INTPART(位数上/100)-INTPART(位数上/1000)*10)+(INTPART(位数上/10)-INTPART(位数上/100)*10)+(位数上-INTPART(位数上/10)*10),IF(位数上>=100 AND 位数上<1000,INTPART(位数上/100)+(INTPART(位数上/10)-INTPART(位数上/100)*10)+(位数上-INTPART(位数上/10)*10),IF(位数上>=10 AND 位数上<100,INTPART(位数上/10)+(位数上-INTPART(位数上/10)*10),IF(位数上<10,位数上,DRAWNULL))));
W2:=IF(位数下>=1000,INTPART(位数下/1000)+(INTPART(位数下/100)-INTPART(位数下/1000)*10)+(INTPART(位数下/10)-INTPART(位数下/100)*10)+(位数下-INTPART(位数下/10)*10),IF(位数下>=100 AND 位数下<1000,INTPART(位数下/100)+(INTPART(位数下/10)-INTPART(位数下/100)*10)+(位数下-INTPART(位数下/10)*10),IF(位数下>=10 AND 位数下<100,INTPART(位数下/10)+(位数下-INTPART(位数下/10)*10),IF(位数下<10,位数下,DRAWNULL))));
上卦:IF(MOD(W1,8)=0,8,MOD(W1,8))COLORWHITE,NODRAW;
下卦:IF(MOD(W2,8)=0,8,MOD(W2,8))COLORWHITE,NODRAW;
动爻:IF(MOD(W1+W2,6)=0,6,MOD(W1+W2,6)),COLORCYAN,NODRAW;{指标编写重点在于把前面一位数乘以10,然后去掉。只有这种起卦方法才与传统梅花易数的方法接近。本指标适合万点级别指数显示。}
{图片保存的格式必须是:BMP或者PNG,单引号加图片名称是一种引用格式,如果是通过内部计算得数的变量就要把单引号去掉。定点文字也是同样的逻辑。但是他们的缺点就是只有最后一个数据有效};
DRAWGBK(ISLASTBAR,0,0,0,CON2STR(INTPART(上卦*100+下卦*10+动爻),0),0);
{六神:青龙、白虎、朱雀、玄武、勾陈、腾蛇}
{DRAWTEXT_FIX(K1=0,0.39,0.90,0,'勾陈'),COLORYELLOW;}
DRAWRECTREL(357,210,386,880,RGB(50,60,60));
TXTA:=IF(K1=0,'勾陈',IF(K1=1,'腾蛇',IF(K1=2 OR K1=3,'白虎',IF(K1=4 OR K1=5,'玄武',IF(K1=6 OR K1=7,'青龙',IF(K1=8 OR K1=9,'朱雀',''))))));
DRAWTEXT_FIX(ISLASTBAR,0.36,0.78,0,TXTA),COLORGREEN;{必须与TXTA同时出现才行};
TXTB:=IF(K1=0,'腾蛇',IF(K1=1,'白虎',IF(K1=2 OR K1=3,'玄武',IF(K1=4 OR K1=5,'青龙',IF(K1=6 OR K1=7,'朱雀',IF(K1=8 OR K1=9,'勾陈',''))))));
DRAWTEXT_FIX(ISLASTBAR,0.36,0.67,0,TXTB),COLORMAGENTA;{必须与TXTB同时出现才行};
TXTC:=IF(K1=0,'白虎',IF(K1=1,'玄武',IF(K1=2 OR K1=3,'青龙',IF(K1=4 OR K1=5,'朱雀',IF(K1=6 OR K1=7,'勾陈',IF(K1=8 OR K1=9,'腾蛇',''))))));
DRAWTEXT_FIX(ISLASTBAR,0.36,0.56,0,TXTC),COLORYELLOW;{必须与TXTC同时出现才行};
TXTD:=IF(K1=0,'玄武',IF(K1=1,'青龙',IF(K1=2 OR K1=3,'朱雀',IF(K1=4 OR K1=5,'勾陈',IF(K1=6 OR K1=7,'腾蛇',IF(K1=8 OR K1=9,'白虎',''))))));
DRAWTEXT_FIX(ISLASTBAR,0.36,0.45,0,TXTD),COLORCYAN;{必须与TXTD同时出现才行};
TXTE:=IF(K1=0,'青龙',IF(K1=1,'朱雀',IF(K1=2 OR K1=3,'勾陈',IF(K1=4 OR K1=5,'腾蛇',IF(K1=6 OR K1=7,'白虎',IF(K1=8 OR K1=9,'玄武',''))))));
DRAWTEXT_FIX(ISLASTBAR,0.36,0.34,0,TXTE),COLORWHITE;{必须与TXTE同时出现才行};
TXTF:=IF(K1=0,'朱雀',IF(K1=1,'勾陈',IF(K1=2 OR K1=3,'腾蛇',IF(K1=4 OR K1=5,'白虎',IF(K1=6 OR K1=7,'玄武',IF(K1=8 OR K1=9,'青龙',''))))));
DRAWTEXT_FIX(ISLASTBAR,0.36,0.23,0,TXTF),COLORBLUE;{必须与TXTF同时出现才行};
{===表格竖线===分析家公式网 WWW.70822.com}
DRAWRECTREL(388,0,999,990,RGB(50,100,140));{充当“表格底色”}
{DRAWRECTREL(73,0,131,990,RGB(50,50,50));
DRAWRECTREL(189,0,247,990,RGB(50,50,50));
DRAWRECTREL(305,0,388,990,RGB(50,50,50));}
DRAWRECTREL(388,0,471,990,RGB(50,50,50));
DRAWRECTREL(471,0,529,990,RGB(50,78,250));
DRAWRECTREL(587,0,645,990,RGB(250,78,50));
DRAWRECTREL(703,0,761,990,RGB(50,78,50));
DRAWRECTREL(817,0,867,990,RGB(250,100,140));
DRAWRECTREL(916,0,960,990,RGB(50,100,250));
{==表格横线
[url=http://www.70822.com/soft/sort013/sort05/down-155835.html]给股票算八字,易学指标(通达信公式 副图 源码 测试图)[/url]

关于本站 | 网站帮助 | 广告合作 | 声明 | 友情连接 | 网站地图 |
分析家公式网声明:本站所有股票公式软件资料均网上公开收集,如侵权请联系删帖。站内所有广告,均与本站无关!
Copyright © 2003-2024 70822.Com. All Rights Reserved .
页面执行时间:78.12500 毫秒