解密时限:=1;
能量潮:=(SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0)/100)*解密时限 ;
周能量:=MA(能量潮,5);
月能量:=MA(能量潮,20);
季能量:=MA(能量潮,60);
主力活动仓位:能量潮*解密时限;
主力短线仓位:MA(能量潮,20)*解密时限;
主力成本仓位:MA(能量潮,60)*解密时限;
年月日:DATE;
星期:WEEKDAY;
每股收益:MGYL;
流通值:CLOSE*SHGZG;
MAOBV5 :=MA(能量潮, 5)*解密时限;
MAOBV20:=MA(能量潮,20)*解密时限;
MAOBV60:=MA(能量潮,60)*解密时限;
K:=能量潮;
D:=MAOBV60;
K20:=MAOBV20;
FILLRGN(K,D,( K>D ),colorred);
FILLRGN(K,K20,( K>K20 ),colormagenta);
FILLRGN(K,D,( K<D ),colorblue);
FILLRGN(K,K20,( K<D AND K20>D ),colorblue);
DRAWTEXT ( CROSS(K,K20) ,k20,'B '),coloryellow; /*K 向 上 交叉D20 买进 B 点*/
DRAWTEXT ( CROSS(K,K20) AND K20>D ,k20,'B '),colormagenta; /*K 向 上 交叉D20 买进 B 点*/
DRAWTEXT ( CROSS(k20,K) ,K,'S '),colorwhite; /*K 向 下 交叉 D20 为卖出 S 点*/
DRAWTEXT ( CROSS(K,D) ,D,'B '),colorred; /*K 向 上 交叉D 买进 B 点*/
DRAWTEXT ( CROSS(D,K) ,K,'S '),colorgreen; /*K 向 下 交叉 D 为卖出 S 点*/
/*重要说明: 能量潮OBV 不能使用 IF 和 ELSE 否则乱显示 */
MAD:=D*0.996;
DRAWTEXT( K>=HHV(K,20) ,MAD,'+'),colorwhite;
/*(白色 + 能量潮创20天新高 */
DRAWTEXT( K>=HHV(K,60) ,MAD,'+'),colorred;
/*(红色 + ) 能量潮创60天新高 */
/* OBV新高 深黄色和白色信号线显示 (只适合日K线,不适合周K线和其它K线) */
MA5 :=MA(CLOSE,5 );
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA40:=MA(CLOSE,40);
MA60:=MA(CLOSE,60);
MA120:=MA(CLOSE,120);
MAOBV5:=MA(能量潮,5);
MAOBV20:=MA(能量潮,20);
MAOBV40:=MA(能量潮,40);
MAOBV60:=MA(能量潮,60);
FILLRGN(MAOBV20,MAOBV5, ( MAOBV5>MAOBV20 AND MAOBV5<MAOBV60 AND MAOBV5>REF(MAOBV5,1) ),color0099FF);
FILLRGN(MAOBV20,MAOBV60,( MAOBV5>MAOBV60 AND MAOBV20<MAOBV60 AND COUNT(CROSS(MAOBV5,MAOBV20),20)>0 AND MAOBV20>REF(MAOBV20,1) ),color0099FF);
MAOBV20:=MA(能量潮,20);
MAOBV60:=MA(能量潮,60);
K:=能量潮;
D:=MAOBV60;
D20:=MAOBV20;
一天量比:=VOL/REF(VOL,1);
低55:=LLV(LOW ,55);
高55:=HHV(HIGH,55);
深黄色:= COUNT( K>D,55)>50 AND CLOSE<=OPEN AND CLOSE<REF(CLOSE,1) AND CLOSE<MA(CLOSE,60) AND VOL<MA(VOL,20)*0.9 AND COUNT ( CROSS( MA(C,20),MA(C,10)),10)< 1 AND CLOSE<MA(CLOSE,10) AND 低55<高55*0.55 AND CLOSE< 低55*1.3 AND VOL<MA(VOL,5) AND VOL<MA(VOL,10) AND 一天量比<0.7 ;
DRAWGBK( 深黄色 ),color0099ff;
DRAWTEXT( 深黄色 ,D,'◆超级主力 '),colorred;