当前位置:首页 > 通达信 > 正文

【通达信免费源码】黄金法则指标 主图 操盘控盘 买卖点 背离

2022-04-22未知 编 辑:掌上指标

30-1P512214954.png30-1P512214954-50.png

黄金法则:
本公式与撑压线为一母双胎指标;都是以缠论高点母本;
本指标是撑压线的简化指标;
与撑压线不同的是:
1.去掉撑压线划线指标;
2.增加单阳测顶与单阴测底;

本指标包含以下五大功能(废除两项):
一:黄金分割(自动判断是下跌还是上涨):
1.黄金分割有两种算法,一种用高低区间;一种用低位算法;
2.本公式采用高低区间算法,具体如下:
高位下跌:a:计算高位和前低位的区间;
b:H-区间黄金分割点;
低位上涨:a:计算低位和前高位的区间;
b:L+区间
黄金分割点;
高位下跌为浅粉红色;
低位上涨为浅姜黄色;

即下跌有;高位下跌的黄金分割;
上涨也有;低位上涨的黄金分割;

二:十等分(废除);

三:单阴测底与单阳测顶(参数写死,不能修改);
采用徐小明的算法:进行测算;
大盘采用正负3%为模;参数:X;
个股采用正负6%为模;参数:Y;
取模周期为低点5T天;参数:D;
总周期为30T, 参数:T;
参数k可以设置是否显示:1显示,0隐藏

四:高低点提示(废除):
1.灰色横线:高点压力低点支撑;
2.白色数字:高低点价格;
高低点线可以看出中枢(箱体)上下沿;

五:集成简化版九转提示:
黄点:九转“8”;
笑脸哭脸:九转“9”;

1.去除黄金分割的多余显示;即显示低位,前面显示高位的标志-竖线;
2.增加参数K;设置是否显示单阳测顶,单阴测底;
3.增加显示多转显示,默认18,即重点显示9-13-18;

公式源码:

T:=30;

K:=0;

HJ_1:=BACKSET(LLV(LOW,5)<REF(LLV(LOW,4),1),4);

HJ_2:=BACKSET(HJ_1=0 AND REF(HJ_1,1)=1,2);

HJ_3:=IF(HJ_2=1 AND REF(HJ_2,1)=0,(-1),0);

HJ_4:=BACKSET(HHV(HIGH,5)>REF(HHV(HIGH,4),1),4);

HJ_5:=BACKSET(HJ_4=0 AND REF(HJ_4,1)=1,2);

HJ_6:=IF(HJ_5=1 AND REF(HJ_5,1)=0,1,0);

HJ_7:=IF(LOW>REF(HIGH,1),1,IF(HIGH<REF(LOW,1),(-1),0));

HJ_8:=BARSLAST(HJ_6=1);

HJ_9:=BARSLAST(HJ_3=(-1));

HJ_10:=LOWRANGE(LOW);

HJ_11:=TOPRANGE(HIGH);

HJ_12:=IF(HJ_3=(-1) AND REF(HJ_8,1)>REF(HJ_9,1) AND LLV(LOW,HJ_8+1)<REF(LLV(LOW,HJ_8+1),1),(-1),0);

HJ_13:=IF(HJ_3=(-1) AND REF(HJ_8,1)<=REF(HJ_9,1) AND (HJ_8>=4 OR LLV(HJ_7,HJ_8)=(-1) OR LLV(LOW,HJ_9+2)<REF(LLV(LOW,HJ_9+1),1)),(-1),0);

HJ_14:=IF(HJ_12=(-1) OR HJ_13=(-1) AND LOW<REF(HIGH,HJ_8+1),(-1),0);

HJ_15:=IF(HJ_9<4 AND HHV(HJ_7,HJ_9)!=1 OR REF(HJ_14,HJ_9)=0,1,0);

HJ_16:=IF(HJ_6=1 AND REF(HJ_9,1)<=REF(HJ_8,1) AND HJ_15=1 AND HJ_11>REF(HJ_10,HJ_9+1) AND HJ_11>REF(HJ_10,HJ_9) AND HJ_11>REF(HJ_11,HJ_8),1,0);

HJ_17:=IF(HJ_6=1 AND REF(HJ_9,1)>REF(HJ_8,1) AND HHV(HIGH,HJ_9+1)>REF(HHV(HIGH,HJ_9+1),1),1,0);

HJ_18:=IF(HJ_6=1 AND REF(HJ_9,1)<=REF(HJ_8,1) AND REF(HJ_14,HJ_9)=(-1) AND (HJ_9>=4 OR HHV(HJ_7,HJ_9)=1),1,0);

HJ_19:=IF(HJ_17=1 OR HJ_18=1 OR HJ_16=1 AND HIGH>REF(LOW,HJ_9+1),1,0);

HJ_20:=IF(HJ_8<4 AND HHV(HJ_7,HJ_8)!=1 OR REF(HJ_19,HJ_8)=0,1,0);

HJ_21:=IF(HJ_3=(-1) AND REF(HJ_8,1)<=REF(HJ_9,1) AND HJ_20=1 AND HJ_10>REF(HJ_11,HJ_8+1) AND HJ_10>REF(HJ_11,HJ_8) AND HJ_10>REF(HJ_10,HJ_9),(-1),0);

HJ_22:=IF(HJ_3=(-1) AND REF(HJ_8,1)>REF(HJ_9,1) AND LLV(LOW,HJ_8+1)<REF(LLV(LOW,HJ_8+1),1),(-1),0);

HJ_23:=IF(HJ_3=(-1) AND REF(HJ_8,1)<=REF(HJ_9,1) AND (HJ_8>=4 OR LLV(HJ_7,HJ_8)=(-1) OR HJ_21=(-1)),(-1),0);

HJ_24:=IF(HJ_22=(-1) OR HJ_23=(-1) AND LOW<REF(HIGH,HJ_8+1),(-1),0);

HJ_25:=BARSLAST(HJ_19=1);

HJ_26:=BARSLAST(HJ_24=(-1));

HJ_27:=IF(HJ_26<4 AND HHV(HJ_7,HJ_26)!=1 OR REF(HJ_24,HJ_26)=0,1,0);

HJ_28:=IF(HJ_6=1 AND REF(HJ_26,1)<=REF(HJ_25,1) AND HJ_27=1 AND HJ_11>REF(HJ_10,HJ_26+1) AND HJ_11>REF(HJ_10,HJ_26) AND HJ_11>REF(HJ_11,HJ_25),1,0);

HJ_29:=IF(HJ_6=1 AND REF(HJ_26,1)>REF(HJ_25,1) AND HHV(HIGH,HJ_26+1)>REF(HHV(HIGH,HJ_26+1),1),1,0);

HJ_30:=IF(HJ_6=1 AND REF(HJ_26,1)<=REF(HJ_25,1) AND REF(HJ_24,HJ_26)=(-1) AND (HJ_26>=4 OR HHV(HJ_7,HJ_26)=1),1,0);

HJ_31:=IF(HJ_29=1 OR HJ_30=1 OR HJ_28=1 AND HIGH>REF(LOW,HJ_26+1),1,0);

HJ_32:=IF(HJ_25<4 AND HHV(HJ_7,HJ_25)!=1 OR REF(HJ_29,HJ_25)=0,1,0);

HJ_33:=IF(HJ_3=(-1) AND REF(HJ_25,1)<=REF(HJ_26,1) AND HJ_32=1 AND HJ_10>REF(HJ_11,HJ_25+1) AND HJ_10>REF(HJ_11,HJ_25) AND HJ_10>REF(HJ_10,HJ_26),(-1),0);

HJ_34:=IF(HJ_3=(-1) AND REF(HJ_25,1)>REF(HJ_26,1) AND LLV(LOW,HJ_25+1)<REF(LLV(LOW,HJ_25+1),1),(-1),0);

HJ_35:=IF(HJ_3=(-1) AND REF(HJ_25,1)<=REF(HJ_26,1) AND (HJ_25>=4 OR LLV(HJ_7,HJ_25)=(-1) OR HJ_33=(-1)),(-1),0);

HJ_36:=IF(HJ_34=(-1) OR HJ_35=(-1) AND LOW<REF(HIGH,HJ_25+1),(-1),0);

HJ_37:=BARSLAST(HJ_31=1);

HJ_38:=BARSLAST(HJ_36=(-1));

HJ_39:=IF(HJ_38<4 AND HHV(HJ_7,HJ_38)!=1 OR REF(HJ_36,HJ_38)=0,1,0);

HJ_40:=IF(HJ_6=1 AND REF(HJ_38,1)<=REF(HJ_37,1) AND HJ_39=1 AND HJ_11>REF(HJ_10,HJ_38+1) AND HJ_11>REF(HJ_10,HJ_38) AND HJ_11>REF(HJ_11,HJ_37),1,0);

HJ_41:=IF(HJ_6=1 AND REF(HJ_38,1)>REF(HJ_37,1) AND HHV(HIGH,HJ_38+1)>REF(HHV(HIGH,HJ_38+1),1),1,0);

HJ_42:=IF(HJ_6=1 AND REF(HJ_38,1)<=REF(HJ_37,1) AND REF(HJ_36,HJ_38)=(-1) AND (HJ_38>=4 OR HHV(HJ_7,HJ_38)=1),1,0);

HJ_43:=IF(HJ_41=1 OR HJ_42=1 OR HJ_40=1 AND HIGH>REF(LOW,HJ_38+1),1,0);

HJ_44:=IF(HJ_37<4 AND HHV(HJ_7,HJ_37)!=1 OR REF(HJ_41,HJ_37)=0,1,0);

HJ_45:=IF(HJ_3=(-1) AND REF(HJ_37,1)<=REF(HJ_38,1) AND HJ_44=1 AND HJ_10>REF(HJ_11,HJ_37+1) AND HJ_10>REF(HJ_11,HJ_37) AND HJ_10>REF(HJ_10,HJ_38),(-1),0);

HJ_46:=IF(HJ_3=(-1) AND REF(HJ_37,1)>REF(HJ_38,1) AND LLV(LOW,HJ_37+1)<REF(LLV(LOW,HJ_37+1),1),(-1),0);

HJ_47:=IF(HJ_3=(-1) AND REF(HJ_37,1)<=REF(HJ_38,1) AND (HJ_37>=4 OR LLV(HJ_7,HJ_37)=(-1) OR HJ_45=(-1)),(-1),0);

HJ_48:=IF(HJ_46=(-1) OR HJ_47=(-1) AND LOW<REF(HIGH,HJ_37+1),(-1),0);

HJ_49:=IF(HJ_43=1 AND HJ_48=(-1) AND HIGH>REF(HIGH,REF(HJ_37,1)+2),1,IF(HJ_43=1 AND HJ_48=(-1) AND LOW<REF(LOW,REF(HJ_38,1)+2),(-1),0));

HJ_50:=IF(HJ_49=0,HJ_43+HJ_48,HJ_49);

HJ_51:=IF(DATE<1161215,1,0);

HJ_52:=IF(HJ_50=(-1),LOW,IF(HJ_50=1,HIGH,DRAWNULL));

HJ_53:=DRAWLINE(HJ_50=(-1),HJ_52,HJ_50=1,HJ_52,0);

HJ_54:=DRAWLINE(HJ_50=1,HJ_52,HJ_50=(-1),HJ_52,0);

HJ_55:=HJ_53=HJ_54 AND HJ_4 AND HJ_50=1;

HJ_56:=IF(HJ_55,HIGH*HJ_51,DRAWNULL);

HJ_57:=HJ_53=HJ_54 AND HJ_1 AND HJ_50=(-1);

HJ_58:=IF(HJ_57,LOW*HJ_51,DRAWNULL);

HJ_59:=LLV(LOW,T)=HJ_58*HJ_51;

HJ_60:=BARSLAST(HJ_59);

HJ_61:=HHV(HIGH,T)=HJ_56*HJ_51;

HJ_62:=BARSLAST(HJ_61);

HJ_63:=IF(HJ_62>HJ_60,0,1);

HJ_64:=BACKSET(ISLASTBAR,HJ_62+1);

HJ_65:=BARSLAST(HJ_64=1 AND REF(HJ_64,1)=0);

HJ_66:=BACKSET(ISLASTBAR,HJ_60+1);

HJ_67:=BARSLAST(HJ_66=1 AND REF(HJ_66,1)=0);

HJ_68:=IF(HJ_65>HJ_67,0,1);

HJ_69:=IF(HJ_63=0 AND HJ_68=0,REF(HIGH,HJ_62)-REF(LOW,HJ_60),DRAWNULL);

STICKLINE(HJ_66=1 AND REF(HJ_66,1)=0 AND HJ_63=0 AND HJ_68=0,REF(LOW,HJ_60),REF(LOW,HJ_60)+HJ_69*1,0.5,(-1)),COLOR0065CA;

NOTEXT0:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;

DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT0,REF(LOW,HJ_60)),COLOR0065CA;

DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT0,0),COLOR0065CA;

NOTEXT1:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_690.191,ISLASTBAR,REF(LOW,HJ_60)+HJ_690.191,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;

DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT1,REF(LOW,HJ_60)+HJ_69*0.191),COLOR0065CA;

DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT1,0.191),COLOR0065CA;

NOTEXT3:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_690.382,ISLASTBAR,REF(LOW,HJ_60)+HJ_690.382,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;

DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT3,REF(LOW,HJ_60)+HJ_69*0.382),COLOR0065CA;

DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT3,0.382),COLOR0065CA;

NOTEXT5:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_690.5,ISLASTBAR,REF(LOW,HJ_60)+HJ_690.5,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;

DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT5,REF(LOW,HJ_60)+HJ_69*0.5),COLOR0065CA;

DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT5,0.5),COLOR0065CA;

NOTEXT6:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_690.618,ISLASTBAR,REF(LOW,HJ_60)+HJ_690.618,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;

DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT6,REF(LOW,HJ_60)+HJ_69*0.618),COLOR0065CA;

DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT6,0.618),COLOR0065CA;

NOTEXT8:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_690.809,ISLASTBAR,REF(LOW,HJ_60)+HJ_690.809,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;

DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT8,REF(LOW,HJ_60)+HJ_69*0.809),COLOR0065CA;

DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT8,0.809),COLOR0065CA;

NOTEXT2:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,REF(HIGH,HJ_62),ISLASTBAR,REF(LOW,HJ_60)+HJ_69*1,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;

DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT2,REF(LOW,HJ_60)+HJ_69*1),COLOR0065CA;

DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT2,1),COLOR0065CA;

HJ_70:=IF(HJ_63=1 AND HJ_68=1,REF(HIGH,HJ_62)-REF(LOW,HJ_60),DRAWNULL);

STICKLINE(HJ_64=1 AND REF(HJ_64,1)=0 AND HJ_63=1 AND HJ_68=1,REF(HIGH,HJ_62),REF(HIGH,HJ_62)-HJ_70*1,0.5,(-1)),COLORC080FF;

NOTEXTH0:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0,(-1)),DRAWNULL),DOTLINE,COLORC080FF;

DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH0,REF(HIGH,HJ_62)),COLORC080FF;

DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH0,0),COLORC080FF;

NOTEXTH1:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_700.191,ISLASTBAR,REF(HIGH,HJ_62)-HJ_700.191,(-1)),DRAWNULL),DOTLINE,COLORC080FF;

DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH1,REF(HIGH,HJ_62)-HJ_70*0.191),COLORC080FF;

DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH1,0.191),COLORC080FF;

NOTEXTH3:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_700.382,ISLASTBAR,REF(HIGH,HJ_62)-HJ_700.382,(-1)),DRAWNULL),DOTLINE,COLORC080FF;

DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH3,REF(HIGH,HJ_62)-HJ_70*0.382),COLORC080FF;

DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH3,0.382),COLORC080FF;

NOTEXTH5:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_700.5,ISLASTBAR,REF(HIGH,HJ_62)-HJ_700.5,(-1)),DRAWNULL),DOTLINE,COLORC080FF;

DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH5,REF(HIGH,HJ_62)-HJ_70*0.5),COLORC080FF;

DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH5,0.5),COLORC080FF;

NOTEXTH6:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_700.618,ISLASTBAR,REF(HIGH,HJ_62)-HJ_700.618,(-1)),DRAWNULL),DOTLINE,COLORC080FF;

DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH6,REF(HIGH,HJ_62)-HJ_70*0.618),COLORC080FF;

DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH6,0.618),COLORC080FF;

NOTEXTH8:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_700.809,ISLASTBAR,REF(HIGH,HJ_62)-HJ_700.809,(-1)),DRAWNULL),DOTLINE,COLORC080FF;

DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH8,REF(HIGH,HJ_62)-HJ_70*0.809),COLORC080FF;

DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH8,0.809),COLORC080FF;

NOTEXTH2:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,REF(HIGH,HJ_62)-HJ_701,ISLASTBAR,REF(HIGH,HJ_62)-HJ_701,(-1)),DRAWNULL),DOTLINE,COLORC080FF;

DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH2,REF(HIGH,HJ_62)-HJ_70*1),COLORC080FF;

DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH2,1),COLORC080FF;

HJ_71:=3;

HJ_72:=3;

HJ_73:=5;

HJ_74:=IF(CLOSE>500,HJ_71,HJ_72);

HJ_75:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;

HJ_76:=IF(HJ_60<=HJ_73,HHV(HJ_75,HJ_60+1),DRAWNULL);

HJ_77:=IF(HJ_60<=HJ_73,HHVBARS(HJ_75,HJ_60+1),DRAWNULL);

HJ_78:=IF(REF(HJ_75,HJ_77)>=HJ_74,REF(CLOSE,HJ_77)*REF(CLOSE,HJ_77)/REF(CLOSE,HJ_77+1)/0.9,DRAWNULL);

HJ_79:=BACKSET(REF(HJ_75,HJ_77)>=HJ_74 AND HJ_60<=HJ_73,HJ_77+1);

HJ_80:=BARSLAST(HJ_79=1 AND REF(HJ_79,1)=0);

HJ_81:=BACKSET(ISLASTBAR,HJ_80+1);

STICKLINE(HJ_81=1 AND REF(HJ_81,1)=0 AND K=1,HIGH,HJ_78,0.5,(-1)),COLORYELLOW;

NOTEXT测顶:IF(K=1,DRAWLINE(HJ_81=1 AND REF(HJ_81,1)=0,HJ_78,ISLASTBAR,REF(CLOSE,HJ_80)*REF(CLOSE,HJ_80)/REF(CLOSE,HJ_80+1)/0.9,(-2)),DRAWNULL),DOTLINE,COLORYELLOW;

DRAWNUMBER(HJ_81=1 AND REF(HJ_81,1)=0 AND K=1,HJ_78,HJ_78),COLORYELLOW;

HJ_82:=IF(HJ_62<=HJ_73,LLV(HJ_75,HJ_62+1),DRAWNULL);

HJ_83:=IF(HJ_62<=HJ_73,LLVBARS(HJ_75,HJ_62+1),DRAWNULL);

HJ_84:=IF(REF(HJ_75,HJ_83)<=(-HJ_74),REF(CLOSE,HJ_83)*REF(CLOSE,HJ_83)/REF(CLOSE,HJ_83+1)/1.1,DRAWNULL);

HJ_85:=BACKSET(REF(HJ_75,HJ_83)<=(-HJ_74) AND HJ_62<=HJ_73,HJ_83+1);

HJ_86:=BARSLAST(HJ_85=1 AND REF(HJ_85,1)=0);

HJ_87:=BACKSET(ISLASTBAR,HJ_86+1);

STICKLINE(HJ_87=1 AND REF(HJ_87,1)=0 AND K=1,LOW,HJ_84,0.5,(-1)),COLORCYAN;

NOTEXT测底:IF(K=1,DRAWLINE(HJ_87=1 AND REF(HJ_87,1)=0,HJ_84,ISLASTBAR,REF(CLOSE,HJ_86)*REF(CLOSE,HJ_86)/REF(CLOSE,HJ_86+1)/1.1,(-2)),DRAWNULL),DOTLINE,COLORCYAN;

DRAWNUMBER(HJ_87=1 AND REF(HJ_87,1)=0 AND K=1,HJ_84,HJ_84),COLORCYAN;

HJ_88:=CLOSE>REF(CLOSE,4);

HJ_89:=BARSLASTCOUNT(HJ_88);

HJ_90:=HJ_89=18;

HJ_91:=ISLASTBAR AND BETWEEN(HJ_89,1,17);

HJ_92:=(BACKSET(HJ_90>0,18) OR BACKSET(HJ_91>0,HJ_89))*HJ_89;

DRAWNUMBER(HJ_92>0,HIGH*1.02,HJ_92),COLORMAGENTA;

DRAWNUMBER(HJ_89=9,HIGH*1.02,9),COLORGREEN;

DRAWNUMBER(HJ_89=13,HIGH*1.02,13),COLORYELLOW;

DRAWNUMBER(HJ_89=18,HIGH*1.02,18),COLORYELLOW;

HJ_93:=CLOSE<REF(CLOSE,4);

HJ_94:=BARSLASTCOUNT(HJ_93);

HJ_95:=HJ_94=18;

HJ_96:=ISLASTBAR AND BETWEEN(HJ_94,1,17);

HJ_97:=(BACKSET(HJ_95>0,18) OR BACKSET(HJ_96>0,HJ_94))*HJ_94;

DRAWNUMBER(HJ_97>0,LOW*0.98,HJ_97),COLORMAGENTA;

DRAWNUMBER(HJ_94=9,LOW*0.98,9),COLORGREEN;

DRAWNUMBER(HJ_94=13,LOW*0.98,13),COLORYELLOW;

DRAWNUMBER(HJ_94=18,LOW*0.98,18),COLORYELLOW;

DRAWKLINE(HIGH,OPEN,LOW,CLOSE);

HJ_98:=IF(HJ_51=1,HIGH=HHV(HIGH,60),0);

HJ_99:=IF(HJ_51=1,LOW=LLV(LOW,60),0);

HJ_100:=BARSLAST(HJ_98);

HJ_101:=BARSLAST(HJ_99);

HJ_102:=BACKSET(ISLASTBAR,HJ_100+1);

HJ_103:=BACKSET(ISLASTBAR,HJ_101+1);

HJ_104:=BARSSINCE(HJ_102)+1;

HJ_105:=BARSSINCE(HJ_103)+1;

HJ_106:=IF(BACKSET(HJ_102,HJ_104+1),1,DRAWNULL);

HJ_107:=IF(BACKSET(HJ_103,HJ_105+1),1,DRAWNULL);

HJ_108:=HJ_107SUM(HIGHVOL,HJ_105)/SUM(VOL,HJ_105);

HJ_109:=HJ_106SUM(LOWVOL,HJ_104)/SUM(VOL,HJ_104);

HJ_110:=HJ_107SUM(LOWVOL,HJ_105)/SUM(VOL,HJ_105);

HJ_111:=HJ_106SUM(HIGHVOL,HJ_104)/SUM(VOL,HJ_104);

NOTEXT点金_支:IF(REF(HIGH,HJ_104)>REF(HIGH,HJ_104+1) AND REF(HIGH,HJ_104)>REF(HIGH,HJ_104-1),HJ_108,HJ_109),COLOR00FF7F;

NOTEXT点金_支1:IF(REF(HIGH,HJ_104)>REF(HIGH,HJ_104+1) AND REF(HIGH,HJ_104)>REF(HIGH,HJ_104-1),HJ_110,HJ_111),COLORGREEN,LINETHICK2;

NOTEXT点金_压:IF(REF(HIGH,HJ_105)>REF(HIGH,HJ_105+1) AND REF(HIGH,HJ_105)>REF(HIGH,HJ_105-1),HJ_109,HJ_108),COLORLIMAGENTA;

NOTEXT点金_压1:IF(REF(HIGH,HJ_105)>REF(HIGH,HJ_105+1) AND REF(HIGH,HJ_105)>REF(HIGH,HJ_105-1),HJ_111,HJ_110),COLORRED,LINETHICK2;

DRAWNUMBER(ISLASTBAR,NOTEXT点金压*1,CONST(NOTEXT点金压)),COLORRED;

DRAWNUMBER(ISLASTBAR,NOTEXT点金支*1,CONST(NOTEXT点金支)),COLORGREEN;

DRAWNUMBER(ISLASTBAR,NOTEXT点金压1*1,CONST(NOTEXT点金压1)),COLORLIMAGENTA;

DRAWNUMBER(ISLASTBAR,NOTEXT点金支1*1,CONST(NOTEXT点金支1)),COLOR00FF7F;

DRAWTEXT_FIX(C>O,0.01,0.9,0,'微信公众号:爱公式'),COLOR556699;

大家都爱看
查看更多热点新闻
点击进入掌上指标资源网-下载各类指标