通达信低位资金入场指标公式副图 源码
B:=SUM(A,1)/SUM(VOL,1);
资金:=(B-B1)*100/B;
DEA : EMA(DIFF,9);
STICKLINE(MacD>=0,MACD,0,4,1),COLORF00FF0;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,3,0 ),COLOR00AAFF;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1.8,0 ),COLOR00CCFF;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0.9,0 ),COLOR00EEFF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,4 ,0 ),COLOR0000AA;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.2,0 ),COLOR0022CC;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.1 ,0 ),COLOR0044EE;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,4,0 ),COLORAA00BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2.2,0 ),COLORCC22BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1.1,0 ),COLOREE44BB;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,4,0 ),COLORFFAA00;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2.2,0 ),COLORFFCC22;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1.1 ,0 ),COLORFFEE44;
IF(DIFF<0,DIFF,0),COLORRED,LINETHICK1;
IF(DIFF<DEA,DIFF,DEA),COLOR00FF00,LINETHICK1;
低位金叉:=crOSS(DIFF,DEA) AND DIFF<-0.1;
DRAWTEXT(低位金叉,-4,' 低位金叉'),COLORYELLOW;
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWICON(二次金叉,DEA*1.2,11) ;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
STICKLINE(底背离,0,2.5,3,0),COLOR00FF00;
DRAWTEXT(底背离,2,' 底背离'),COLOR00FF00;
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORFFFF00,LINETHICK2;
来函数检测结果如下:
该公式没有未来函数
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
B赋值:1的A日累和/1的成交量日累和
资金赋值:(B-B1)*100/B
DEA : DIFF的9日指数移动平均
当满足条件MACD>=0时,在MACD和0之间画柱状线
STICKLINE(MACD<1日前的MACDAND MACD>0,0,MACD,3,0 ),COLOR00AAFF
STICKLINE(MACD<1日前的MACDAND MACD>0,0,MACD,1.8,0 ),COLOR00CCFF
STICKLINE(MACD<1日前的MACDAND MACD>0,0,MACD,0.9,0 ),COLOR00EEFF
STICKLINE(MACD>=1日前的MACDAND MACD>0,0,MACD,4 ,0 ),COLOR0000AA
STICKLINE(MACD>=1日前的MACDAND MACD>0,0,MACD,2.2,0 ),COLOR0022CC
STICKLINE(MACD>=1日前的MACDAND MACD>0,0,MACD,1.1 ,0 ),COLOR0044EE
STICKLINE(MACD>1日前的MACDAND MACD<0,0,MACD,4,0 ),COLORAA00BB
STICKLINE(MACD>1日前的MACDAND MACD<0,0,MACD,2.2,0 ),COLORCC22BB
STICKLINE(MACD>1日前的MACDAND MACD<0,0,MACD,1.1,0 ),COLOREE44BB
STICKLINE(MACD<=1日前的MACDAND MACD<0,0,MACD,4,0 ),COLORFFAA00
STICKLINE(MACD<=1日前的MACDAND MACD<0,0,MACD,2.2,0 ),COLORFFCC22
STICKLINE(MACD<=1日前的MACDAND MACD<0,0,MACD,1.1 ,0 ),COLORFFEE44
如果DF<0返回DIFF否则返回0
如果DF
低位金叉赋值:DIFF上穿DEA AND DIFF<-0.1
当满足条件低位金叉时,在-4和' 低位金叉'位置书写文字
二次金叉赋值:DIFF上穿DEA AND DEA<0 AND 统计21日满足JC=2的天数=1
当满足条件二次金叉时,在DEA*1.2和11之间画图标
A1赋值:上次1日前的DIFF上穿DEA距今天数
当满足条件底背离时,在0和2.5之间画柱状线
当满足条件底背离时,在2和' 底背离'位置书写文字
顶背离赋值:A2+1日前的收盘价<收盘价 AND A2+1日前的DIFF>DIFF AND DEA上穿DIFF
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORFFFF00, 线宽为2