光跃自用主图公式 预警公式

[复制链接]
查看43 | 回复0 | 2022-7-24 06:40:19 | 显示全部楼层 |阅读模式

光跃自用主图公式

公式源码:

BARSSINCE(C>0),DRAWNULL;
 ZA1:=EMA(C,9);
 ZA2:=EMA(ZA1,3);
 ZB1:=EMA(C,27);
 ZB2:EMA(ZB1,9);

 DIFF:(ZA1+ZB2)/2;
 DEA:=(ZA2+ZB1)/2;
 {IF(DIFF>=DEA,DIFF,DRAWNULL),LINETHICK1,COLORRED;
 IF(DIFF<DEA,DIFF,DRAWNULL),LINETHICK1,COLORWHITE;}

 KA0:=(HHV(C,27)-LLV(C,27))/27;
 KA1:=SMA(C,3,1);
 KA2:SMA(C-KA0*3,3,1);
 KA3:=SMA(KA1-KA0*3,3,1);
 {IF(KA2>=KA3,KA2,DRAWNULL )COLORMAGENTA,LINETHICK1;
 IF(KA2<KA3,KA2,DRAWNULL ),LINETHICK1,COLORGREEN;}
 {条件:= CROSS(C,ZB2) AND  CROSS(DIFF,DEA) AND DIFF>ZB2;
 STICKLINE(条件=1,C,O,4,0),COLORYELLOW;
 STICKLINE(条件=1,L,H,0.4,0),COLORYELLOW;}

 STICKLINE(FILTER(COUNT(CROSS(DIFF,ZB2),3)=1 AND COUNT(CROSS(C,ZB2),3)=1,3),C,O,3,0),COLORMAGENTA;
 STICKLINE(FILTER(COUNT(CROSS(DIFF,ZB2),3)=1 AND COUNT(CROSS(C,ZB2),3)=1,3),L,H,0,0),COLORMAGENTA;
 DRAWTEXT_FIX(C>O,0.01,0.9,0,'光跃自用'),COLORRED;
 

 

650211235.png

650211235.png

 

预警公式

 

ZA1:=EMA(C,9);
 ZA2:=EMA(ZA1,3);
 ZB1:=EMA(C,27);
 ZB2:=EMA(ZB1,9);

 DIFF:=(ZA1+ZB2)/2;
 DEA:=(ZA2+ZB1)/2;
 {IF(DIFF>=DEA,DIFF,DRAWNULL),LINETHICK1,COLORRED;
 IF(DIFF<DEA,DIFF,DRAWNULL),LINETHICK1,COLORWHITE;}
 FILTER(COUNT(CROSS(DIFF,ZB2),3)=1 AND COUNT(CROSS(C,ZB2),3)=1,3);

 

 

回复

使用道具 举报

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

本版积分规则