根据周易理论编制的《五行生旺》有点神奇(有图有代码)

[复制链接]
查看55 | 回复0 | 2022-7-24 07:48:52 | 显示全部楼层 |阅读模式

根据周易理论编制的《五行生旺》有点神奇(有图有代码)

说明:中国有一个非常神奇的传统文化——《周易》;
其中有一个五行生旺的理论:它是按12种状态不断反复循环的;
它的顺序是:胎、养、长生、沐浴、冠带、临官、帝旺、衰、病、死、墓、绝;
又回到胎,我想,股票也和这个差不多,所以就编制了这个指标。
也可以选股:
养:CROSS(A1,A2);
 

 

源码:

A1:MA(C,3);
A2:MA(C,8);
DRAWBAND(A1,180,A2,RGB(39,139,39));
A3:MA(C,24);
A4:MA(C,72);
A5:=MA(C,216);
胎:=A1<A2 AND A1>REF(A1,1);
养:=CROSS(A1,A2);
长生:=A1>A2 AND A1>REF(A1,1) AND A1/A2<1.01;
沐浴:=A1>A2 AND A1>REF(A1,1) AND A1/A2<1.02 AND A1/A2>1.01;
冠带:=A1>A2 AND A1>REF(A1,1) AND A1/A2<1.03 AND A1/A2>1.02;
临官:=A1>A2 AND A1>REF(A1,1) AND A1/A2<1.05 AND A1/A2>1.03;
帝旺:=A1>A2 AND A1>REF(A1,1) AND A1/A2<1.30 AND A1/A2>1.05;
衰:=A1>A2 AND A1<=REF(A1,1) AND A1/A2<1.09;
病:=A1<A2 AND A1<=REF(A1,1) AND A1/A2<1.05 AND A1/A2>1;
死:=A1<A2 AND A1<=REF(A1,1) AND A1/A2<1 AND A1/A2>0.98;
墓:=A1<A2 AND A1<=REF(A1,1) AND A1/A2<0.98 AND A1/A2>0.96;
绝:=A1<A2 AND A1<=REF(A1,1) AND A1/A2<0.96 AND A1/A2>0.85;
DRAWTEXT(胎,A1,'胎'),COLORWHITE;
DRAWTEXT(养,A1*0.99,'养'),COLORWHITE;
DRAWTEXT(长生,A1,'长生'),COLORYELLOW;
DRAWTEXT(沐浴,A1,'沐浴'),COLORYELLOW;
DRAWTEXT(冠带,A1,'冠带'),COLORYELLOW;
DRAWTEXT(临官,A1,'临官'),COLORYELLOW;
DRAWTEXT(帝旺,A1,'帝旺'),COLORYELLOW;
DRAWTEXT(衰,A1,'衰'),COLORGREEN;
DRAWTEXT(病,A1,'病'),COLORGREEN;
DRAWTEXT(死,A1,'死'),COLORGREEN;
DRAWTEXT(墓,A1,'墓'),COLORGREEN;
DRAWTEXT(绝,A1,'绝'),COLORGREEN;

049177641.jpg

049177641.jpg

 

049277094.jpg

049277094.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则