适用于个股和大盘 黄金线阳盖阴 通达信指标 源码 贴图
2018-07-11 09:33:00来源:本站整理浏览:532
适用于个股和大盘 黄金线阳盖阴 通达信指标 源码 贴图
{基柱是倍量: 1=倍量,0=小倍量;
基柱类型: 0=长阳,1=将军柱,2=次黄金柱,3=黄金柱,4=标准黄金柱;
显示板块: 0=不显示,1=显示;
回踩误差千分之: 阳盖阴附近回踩点与黄金线的距离误差千分比;}
DRAWTEXT_FIX(显示板块 AND ISLASTBAR,0,0,0,HYBLOCK);
DRAWTEXT_FIX(显示板块 AND ISLASTBAR,0.05,0,0,DYBLOCK);
DRAWTEXT_FIX(显示板块 AND ISLASTBAR,0.1,0,0,GNBLOCK);
STICKLINE(REF(LOW,1)>HIGH,HIGH,REF(LOW,1),5,0),COLORGRAY;
STICKLINE(REF(HIGH,1)<LOW,LOW,REF(HIGH,1),5,0),COLORGRAY;
C_:CONST(CLOSE),POINTDOT,COLORLIRED;
XA_1:=MA(CLOSE,5);
MA5角度:ATAN((XA_1/REF(XA_1,1)-1)*100)*180/3.1416,NODRAW;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
XA_2:=REF(CLOSE,1);
XA_3:=IF(CLOSE>=1,10000,100000);
XA_4:=1.1*XA_2-49/XA_3;
XA_5:=1.05*XA_2-49/XA_3;
XA_6:=0.9*XA_2+51/XA_3;
XA_7:=0.95*XA_2+51/XA_3;
XA_8:=NAMELIKE(1) OR NAMELIKE(2);
XA_9:=IF(XA_8,CLOSE>=XA_5,CLOSE>=XA_4);
XA_10:=IF(XA_8,CLOSE<=XA_7,CLOSE<=XA_6);
XA_11:=IF(XA_8,HIGH>=XA_5,HIGH>=XA_4);
XA_12:=IF(XA_8,LOW<=XA_7,LOW<=XA_6);
STICKLINE(XA_11,HIGH,MAX(CLOSE,OPEN),0,0),COLORMAGENTA;
STICKLINE(XA_12,LOW,MIN(CLOSE,OPEN),0,0),COLORLICYAN;
XA_13:=CLOSE>OPEN AND (CLOSE>=XA_5 OR CLOSE>1.05*OPEN-51/XA_3) OR (CLOSE>1000 AND CLOSE>XA_2*1.024);
STICKLINE(XA_13,OPEN,CLOSE,1,0),COLOR0000BB;
XA_14:=CLOSE<OPEN AND (CLOSE<=XA_7 OR CLOSE<0.95*OPEN+49/XA_3) OR (CLOSE>1000 AND CLOSE<XA_2*0.976);
STICKLINE(XA_14,OPEN,CLOSE,1,0),COLORLIGREEN;
STICKLINE(XA_9,OPEN,CLOSE,1,0),COLORMAGENTA;
STICKLINE(XA_10,OPEN,CLOSE,1,0),COLORLICYAN;
XA_15:=CLOSE<OPEN AND CLOSE>REF(CLOSE,1);
STICKLINE(XA_15,OPEN,CLOSE,0,0),COLORRED;
XA_16:=CLOSE>OPEN AND CLOSE<REF(CLOSE,1);
STICKLINE(XA_16,OPEN,CLOSE,0,0),COLORGREEN;
XA_17:=PERIOD=5 AND NAMELIKE(3) AND (ABS(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>=0.025 OR ABS(CLOSE-OPEN)>=60);
STICKLINE(XA_17,(HIGH+LOW)/2,(HIGH+LOW)/2,2,0),COLORYELLOW;
XA_18:=MIN(CLOSE,OPEN);
XA_19:=基柱类型;
XA_20:=LLV(CLOSE,3)>=REF(XA_18,3);
XA_21:=IF(基柱是倍量=1,1.8,1.1);
XA_22:=10;
XA_23:=FILTER(BACKSET(FILTER(REF(VOL,XA_22)=HHV(VOL,2*XA_22+1),XA_22),XA_22+1),XA_22);
XA_24:=VOL>=REF(VOL,1)*XA_21 OR XA_23;
XA_25:=CLOSE/REF(CLOSE,1)>1 OR CLOSE/OPEN>1;
XA_26:=REF(XA_25,3) AND XA_20;
XA_27:=CLOSE>REF(CLOSE,1);
XA_28:=CLOSE>REF(MAX(CLOSE,OPEN),1) AND XA_25;
XA_29:=XA_24 AND XA_28;
XA_30:=REF(XA_29,3) AND XA_20;
XA_31:=MA(CLOSE,3)>=REF(CLOSE,3) AND CLOSE>=REF(CLOSE,3);
XA_32:=MA(VOL,3)<=REF(VOL,3)*1.03;
XA_33:=XA_30 AND XA_31 AND XA_32;
XA_34:=HHV(VOL,3)<=REF(VOL,3)*1.03;
XA_35:=LLV(CLOSE,3)>=REF(CLOSE,3);
XA_36:=XA_33 AND XA_35 AND XA_34;
XA_37:=COUNT(XA_27,3)=3;
XA_38:=COUNT(VOL<REF(VOL,1),3)=3;
XA_39:=XA_36 AND XA_37 AND XA_38;
基柱:IF(XA_19=1,XA_30,IF(XA_19=2,XA_33,IF(XA_19=3,XA_36,IF(XA_19=4,XA_39,XA_26)))),NODRAW;
XA_40:=BARSLAST(FILTER(基柱,3));
XA_41:=REF(LOW,XA_40+3);
XA_42:=LLV(XA_18,XA_40)>=XA_41 AND XA_41=REF(XA_41,1);
底线:IF(XA_42,XA_41,DRAWNULL),COLORYELLOW;
STICKLINE(基柱,XA_41,XA_41,25,0),COLORYELLOW;
XA_43:=LLV(LOW,XA_40);
XA_44:=LLV(XA_18,XA_40);
基柱O:REF(OPEN,XA_40+3),NODRAW;
XA_45:=REF(LLV(LOW,3),XA_40);
XA_46:=显示黄金线=1 AND XA_44>=XA_45 AND XA_45=REF(XA_45,1);
XA_47:=IF(XA_45<XA_41,XA_41,XA_45);
黄金虚线:IF(XA_46,XA_47,DRAWNULL),POINTDOT,COLORYELLOW;
STICKLINE(显示黄金线=1 AND 基柱 OR XA_46,XA_47,XA_47,17,(-1)),COLORYELLOW;
黄金实线:REF(LLV(XA_18,3),XA_40),NODRAW,COLORMAGENTA;
STICKLINE(显示黄金线=1 AND 基柱,黄金实线,黄金实线,15,1),COLORBROWN;
XA_48:=黄金实线>=XA_41;
XA_49:=XA_44>=XA_41;
XA_50:=回踩误差千分之*CLOSE/1000;
XA_51:=IF(XA_50<0.01,0.01,XA_50);
XA_52:=ABS(XA_43-XA_41)<=XA_51;
XA_53:=ABS(XA_43-基柱O)<=XA_51;
XA_54:=ABS(XA_43-黄金虚线)<=XA_51;
XA_55:=ABS(XA_43-黄金实线)<=XA_51;
XA_56:=ABS(XA_44-XA_41)<=XA_51;
XA_57:=ABS(XA_44-基柱O)<=XA_51;
XA_58:=ABS(XA_44-黄金虚线)<=XA_51;
XA_59:=ABS(XA_44-黄金实线)<=XA_51;
XA_60:=IF(回踩类型=1 OR 回踩类型=0,XA_52 OR XA_56,0);
XA_61:=IF(回踩类型=2 OR 回踩类型=0,XA_53 OR XA_57,0);
XA_62:=IF(回踩类型=3 OR 回踩类型=0,XA_54 OR XA_58,0);
XA_63:=IF(回踩类型=4 OR 回踩类型=0,XA_55 OR XA_59,0);
XA_64:=XA_60 OR XA_61 OR XA_62 OR XA_63 AND XA_48 AND XA_49;
XA_65:=LOW=XA_43 OR XA_18=XA_44;
XA_66:=BARSLAST(XA_65);
XA_67:=VOL<REF(VOL,1) AND 1;
XA_68:=REF(CLOSE<OPEN,1) AND CLOSE>OPEN AND CLOSE>REF(MAX(CLOSE,OPEN),1);
XA_69:=XA_64 AND XA_68 AND XA_40>=1 AND XA_66<=2;
XA_70:=COUNT(XA_69,1);
DRAWICON(XA_70,LOW*0.98,1);