手机端
当前位置:爱约股 > 公式技巧 > 把主动买盘指标在红,黄线突破0轴线(上翘)写预警指标

把主动买盘指标在红,黄线突破0轴线(上翘)写预警指标

 网友求助:

把主动买盘指标在红,黄线突破0轴线(上翘)写个预警预警指标.

0,COLORWHITE;
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2));
主买:=主动买盘/CAPITAL;
主卖:=-主动卖盘/CAPITAL;
M1:=MA(主买,M);
M2:=MA(主卖,M);
买:100*MA(M1,N),COLORRED;
卖:100*MA(M2,N),COLORGREEN;
差:买-卖,COLORYELLOW;
差D:=MA(差,2);
关注:(1+BARSLAST(CROSS(差,差D)))*(差>差D),NODRAW;
 

 

 

解答如下:

M、N---取值未定义,帮你定义如下:
-----------------------------
M:=10;N:=5;
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2));
主买:=主动买盘/CAPITAL;
主卖:=-主动卖盘/CAPITAL;
M1:=MA(主买,M);
M2:=MA(主卖,M);
买:=100*MA(M1,N);
卖:=100*MA(M2,N);
差:=买-卖;
CROSS(差,0) AND 差>REF(差,1);

分享至:

相关推荐