{公式名称: 结构背离 公式描述:
无参数
公式类型: 技术指标公式-其他类型
画线方法: 副图
公式版本: 0
显示小数: 缺省位数
坐标线位置: 自动
额外Y轴分界: 无
参数精灵:无
用法注释:无
公式源码:}
DIF:100*(EMA(CLOSE,12)-EMA(CLOSE,26));
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
X_1:=CROSS(DEA,DIF);
X_2:=BARSLAST(X_1);
X_3:=REF(BARSLAST(X_1),X_2+1);
X_4:=REF(BARSLAST(X_1),X_3+X_2+2);
X_5:=LLV(CLOSE,X_2+1);
X_6:=LLV(DIF,X_2+1);
X_7:=REF(X_5,X_2+1);
X_8:=REF(X_6,X_2+1);
X_9:=REF(X_7,X_2+1);
X_10:=REF(X_8,X_2+1);
X_11:=IF(X_8>0,INTPART(LOG(X_8))-1,INTPART(LOG(-X_8))-1);
X_12:=INTPART(X_8/POW(10,X_11));
X_13:=IF(X_10>0,INTPART(LOG(X_10))-1,INTPART(LOG(-X_10))-1);
X_14:=INTPART(X_10/POW(10,X_13));
X_15:=INTPART(DIF/POW(10,X_11));
X_16:=INTPART(DIF/POW(10,X_13));
X_17:=X_5<X_7 AND X_15>X_12 AND (MACD<0 AND REF(MACD,1)<0) AND X_15<=REF(X_15,1);
X_18:=X_5<X_9 AND X_9<X_7 AND X_16>X_14 AND (MACD<0 AND REF(MACD,1)<0) AND X_16<=REF(X_16,1);
X_19:=X_17 OR X_18;
X_20:=(X_15>REF(X_15,1))*REF(X_17,1) OR (X_16>REF(X_16,1))*REF(X_18,1);
X_21:=REF(X_17,1) AND X_6<=X_8 OR (REF(X_18,1) AND X_6<=X_10);
STICKLINE(X_19 OR X_20,DIF,DEA,8,0),COLORRED;
DRAWTEXT(X_19 AND COUNT(X_19,2)=1,DIF*1.5,'钝化'),COLORYELLOW;
DRAWTEXT(FILTER(X_20,10),DIF*1.5,'结构形成'),COLORMAGENTA;
DRAWTEXT(FILTER(X_21,10),DIF+MACD,'消失'),COLORGREEN;
STICKLINE(X_20,0,DIF+DEA,5,0),COLORRED;
X_22:=CROSS(DIF,DEA);
X_23:=BARSLAST(X_22);
X_24:=REF(BARSLAST(X_22),X_23+1);
X_25:=REF(BARSLAST(X_22),X_24+X_23+2);
X_26:=HHV(CLOSE,X_23+1);
X_27:=HHV(DIF,X_23+1);
X_28:=REF(X_26,X_23+1);
X_29:=REF(X_27,X_23+1);
X_30:=REF(X_28,X_23+1);
X_31:=REF(X_29,X_23+1);
X_32:=IF(X_29>0,INTPART(LOG(X_29))-1,INTPART(LOG(-X_29))-1);
X_33:=INTPART(X_29/POW(10,X_32));
X_34:=IF(X_31>0,INTPART(LOG(X_31))-1,INTPART(LOG(-X_31))-1);
X_35:=INTPART(X_31/POW(10,X_34));
X_36:=INTPART(DIF/POW(10,X_32));
X_37:=INTPART(DIF/POW(10,X_34));
X_38:=X_26>X_28 AND X_36<X_33 AND (MACD>0 AND REF(MACD,1)>0) AND X_36>=REF(X_36,1);
X_39:=X_26>X_30 AND X_30>X_28 AND X_37<X_35 AND (MACD>0 AND REF(MACD,1)>0) AND X_37>=REF(X_37,1);
X_40:=X_38 OR X_39;
X_41:=(X_36<REF(X_36,1))*REF(X_38,1) OR (X_37<REF(X_37,1))*REF(X_39,1);
X_42:=REF(X_38,1) AND X_27>=X_29 OR (REF(X_39,1) AND X_27>=X_31);
STICKLINE(X_41,0,DIF+DEA,5,0),COLORGREEN;
STICKLINE(X_40 OR X_41,DIF,DEA,8,0),COLORGREEN;
DRAWTEXT(FILTER(X_41,20),DIF*1.4,'371'),COLORMAGENTA;
DRAWTEXT(FILTER(X_42,20),DIF+MACD,'消失'),COLORGREEN;
底:(-50);
顶:50;
X_43:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14);
X_44:=HIGH-REF(HIGH,1);
X_45:=REF(LOW,1)-LOW;
X_46:=SUM(IF(X_44>0 AND X_44>X_45,X_44,0),14);
X_47:=SUM(IF(X_45>0 AND X_45>X_44,X_45,0),14);
X_48:=X_46*100/X_43;
X_49:=X_47*100/X_43;
X_50:=BARSLAST(REF(CROSS(MACD.DIF(12,26,9),MACD.DEA(12,26,9)),1));
X_51:=REF(CLOSE,X_50+1)>CLOSE AND REF(MACD.DIF(12,26,9),X_50+1)<MACD.DIF(12,26,9) AND CROSS(MACD.DIF(12,26,9),MACD.DEA(12,26,9));
X_52:=BARSLAST(REF(CROSS(KDJ.K(9,3,3),KDJ.D(9,3,3)),1));
X_53:=REF(CLOSE,X_52+1)>CLOSE AND REF(KDJ.K(9,3,3),X_52+1)<KDJ.K(9,3,3) AND CROSS(KDJ.K(9,3,3),KDJ.D(9,3,3));
X_54:=BARSLAST(REF(CROSS(RSI.RSI1(6,12,24),RSI.RSI2(6,12,24)),1));
X_55:=REF(CLOSE,X_54+1)>CLOSE AND REF(RSI.RSI1(6,12,24),X_54+1)<RSI.RSI1(6,12,24) AND CROSS(RSI.RSI1(6,12,24),RSI.RSI2(6,12,24));
X_56:=BARSLAST(REF(CROSS(MACD.DEA(12,26,9),MACD.DIF(12,26,9)),1));
X_57:=REF(CLOSE,X_56+1)<CLOSE AND REF(MACD.DIF(12,26,9),X_56+1)>MACD.DIF(12,26,9) AND CROSS(MACD.DEA(12,26,9),MACD.DIF(12,26,9));
X_58:=BARSLAST(REF(CROSS(KDJ.D(9,3,3),KDJ.K(9,3,3)),1));
X_59:=REF(CLOSE,X_58+1)<CLOSE AND REF(KDJ.K(9,3,3),X_58+1)>KDJ.K(9,3,3) AND CROSS(KDJ.D(9,3,3),KDJ.K(9,3,3));
X_60:=BARSLAST(REF(CROSS(RSI.RSI2(6,12,24),RSI.RSI1(6,12,24)),1));
X_61:=REF(CLOSE,X_60+1)<CLOSE AND REF(RSI.RSI1(6,12,24),X_60+1)>RSI.RSI1(6,12,24) AND CROSS(RSI.RSI2(6,12,24),RSI.RSI1(6,12,24));
X_62:=BARSLAST(REF(CROSS(X_49,X_48),1));
X_63:=REF(CLOSE,CLOSE+1)<CLOSE AND REF(X_49,X_62+1)>X_49 AND CROSS(X_49,X_48);
X_64:=BARSLAST(REF(CROSS(X_48,X_49),1));
X_65:=REF(CLOSE,X_64+1)>CLOSE AND REF(X_48,X_64+1)<X_48 AND CROSS(X_48,X_49);
DMI底背:IF(X_65>0,(-50),0),POINTDOT,COLOR0099FF;
DRAWTEXT(X_65>0,(-5),'DMI底背'),COLOR0099FF;
DMI顶背:IF(X_63>0,50,0),POINTDOT,COLORBLUE;
DRAWTEXT(X_63>0,15,'265'),COLORBLUE;
MACD底背:IF(X_51>0,(-50),0),POINTDOT,COLORRED;
DRAWTEXT(X_51>0,(-15),'266'),COLORRED;
KDJ底背:IF(X_53>0,(-50),0),POINTDOT,COLORMAGENTA;
DRAWTEXT(X_53>0,(-25),'267'),COLORMAGENTA;
RSI底背:IF(X_55>0,(-50),0),POINTDOT,COLORYELLOW;
DRAWTEXT(X_55>0,(-35),'RSI底背'),COLORYELLOW;
MACD顶背:IF(X_57>0,50,0),POINTDOT,COLORGREEN;
DRAWTEXT(X_57>0,25,'MACD顶背'),COLORGREEN;
KDJ顶背:IF(X_59>0,50,0),POINTDOT,COLORFFCC66;
DRAWTEXT(X_59>0,35,'270'),COLORFFCC66;
RSI顶背:IF(X_61>0,50,0),POINTDOT,COLORWHITE;
DRAWTEXT(X_61>0,45,'RSI背离'),COLORWHITE;
STICKLINE(X_51>0,(-50),0,0,0),COLORRED;
STICKLINE(X_53>0,(-50),0,0,0),COLORMAGENTA;
STICKLINE(X_55>0,(-50),0,0,0),COLORYELLOW;
STICKLINE(X_57>0,50,0,0,0),COLORGREEN;
STICKLINE(X_59>0,50,0,0,0),COLORFFCC66;
STICKLINE(X_61>0,50,0,0,0),COLORWHITE;
STICKLINE(X_65>0,(-50),0,0,0),COLOR0099FF;
STICKLINE(X_63>0,50,0,0,0),COLORBLUE;
MA6:MA(CLOSE,6),NODRAW,COLORYELLOW,LINETHICK2;
操作均线:EMA(CLOSE,20),NODRAW,COLORYELLOW;
红升:IF(操作均线>REF(操作均线,1),操作均线,DRAWNULL),NODRAW,COLORRED,LINETHICK4;
绿降:IF(操作均线<REF(操作均线,1),操作均线,DRAWNULL),NODRAW,COLORCYAN,LINETHICK4;
趋势线:EMA(CLOSE,50),NODRAW,COLORYELLOW,LINETHICK2;
红升2:IF(趋势线>REF(趋势线,1),趋势线,DRAWNULL),POINTDOT,COLORRED,LINETHICK4;
绿降2:IF(趋势线<REF(趋势线,1),趋势线,DRAWNULL),POINTDOT,COLORCYAN,LINETHICK4;
买:IF(MA6>REF(MA6,1),MA6,DRAWNULL),NODRAW,COLORRED,LINETHICK2;
卖:IF(MA6<REF(MA6,1),MA6,DRAWNULL),NODRAW,COLORCYAN,LINETHICK2;
X_66:=240/FROMOPEN;
X_67:=X_66;
X_68:=EMA(CLOSE,12)-EMA(CLOSE,26);
X_69:=EMA(X_68,9);
X_70:=X_68-X_69;
X_71:=IF(X_70,LLV(LOW,21),DRAWNULL);
X_72:=HHV(HIGH,80)*0.99;
X_73:=CONST(X_72);
X_74:=LLV(X_71,80);
X_75:=CONST(X_74);
X_76:=MA(CLOSE,20);
X_77:=CLOSE>MA(CLOSE,5);
X_78:=MA(CLOSE,5)>MA(CLOSE,10);
X_79:=CLOSE>MA(CLOSE,10);
X_80:=MA(CLOSE,5)>MA(CLOSE,20);
X_81:=CLOSE> |
评论内容只代表网友观点,与本站立场无关!
本网提供的公式文件说明:
* alg格式飞狐股票公式,可以用飞狐交易师或者交易师软件导入;
* fnc格式大智慧新一代公式指标,可以用大智慧股票软件使用,少部分可以用分析家股票软件引入使用;
* exp格式大智慧经典版股票公式,仅可以用大智慧经典版股票软件引入使用;
* tni和tnc格式通达信股票公式,仅可以用通达信新引入使用,例如可以用通达信股票软件引入使用;
* tne,tn6格式通达信公式,可以用通达信公式编辑器5.0版导入,推荐通达信金融终端版本;
* hxf格式同花顺股票公式,仅可以用同花顺股票软件引入使用。
以上的各种软件都可以在本网股票软件栏目找到!
* 关于股票公式时间限制,如果在引入大智慧公式,交易师公式或者飞狐公式的时候,发现公式名称栏是空白的,这时候调整电脑时间到1997年,又能出现公式名称,并且能正常显示,可能是公式使用期限已过。
* 关于还原公式源码如果你忘记了自己编写的大智慧公式,通达信公式,同花顺公式,操盘手公式,飞狐公式,博易大师公式,金字塔公式,文华公式和交易师公式等等公式的密码,本网可帮恢复源码,有.偿.服.务无意勿扰,点击在线咨询联系我。
* 关于股票公式源码编辑
本网提供的源码,一般都可以编辑成公式,如果不明白公式的编辑,在本页右侧教程录像可参考,或者找公式教程资料学习,请搜索:教程
* 如果您发现软件内容或者链接错误,请点击报告错误谢谢!
* 站内提供的所有软件包含源码均是由网上搜集,若侵犯了你的版权利益,请联系通知我们!