通达信量学画线主图指标公式

[复制链接]
查看168 | 回复0 | 2021-8-20 21:02:28 | 显示全部楼层 |阅读模式

均线数:=0;
画线虚实:=1;
显3121刻度:=0;
显买卖点:=1;
半分位:=(O+C)/2;
峰边距:=5;
回踩误差千分之:=2;
画将1黄2元3全4:=2;
精准计数周期:=240;
低1开2收3高4:=1;
基准点前N天:=0;
昨半分位:=REF(半分位,1);
STICKLINE(ISLASTBAR,昨半分位,昨半分位,10,0);
DRAWTEXT(ISLASTBAR,昨半分位,' 昨半分位');{原文链接:HTTP://55188.COM/THREAD-4885579-1-1.HTML};
X_1:=1991015;
X_2:=TESTSKIP(DATE>X_1);
STICKLINE(REF(LOW,1)>HIGH,HIGH,REF(LOW,1),5,0),COLORGRAY;
STICKLINE(REF(HIGH,1)<LOW,LOW,REF(HIGH,1),5,0),COLORGRAY;
DRAWTEXT_FIX(ISLASTBAR,0,0,0,HYBLOCK);
DRAWTEXT_FIX(ISLASTBAR,0.05,0,0,DYBLOCK);
DRAWTEXT_FIX(ISLASTBAR,0.1,0,0,GNBLOCK);
DRAWTEXT_FIX(ISLASTBAR,0,0.045,0,FGBLOCK),COLORGREEN;
X_3:=240;
X_4:=CONST(HHV(REF(HIGH,1),X_3));
X_5:=CONST(LLV(REF(LOW,1),X_3));
X_6:=X_4-X_5;
X_7:=LOW-X_6*0.03;
X_8:=HIGH+X_6*0.03;
X_9:=CLOSE>500;
X_10:=MAX(CLOSE,OPEN);
X_11:=MIN(CLOSE,OPEN);
X_12:=基准点前N天;
X_13:=画线虚实;
X_14:=IF(X_9,HIGH,X_10);
X_15:=IF(X_9,LOW,X_11);
X_16:=IF(CLOSE>OPEN,IF(X_13=0,LOW,X_15),IF(X_13=0,HIGH,X_14));
X_17:=回踩误差千分之/1000;
X_18:=CURRBARSCOUNT;
X_19:=精准计数周期;
X_20:=X_18<=X_19;
X_21:=IF(低1开2收3高4=1,LOW,IF(低1开2收3高4=2,OPEN,IF(低1开2收3高4=3,CLOSE,HIGH)));
X_22:=IF(基准点前N天=0,X_21,REF(X_21,基准点前N天));
WEN98编_基准价:IF(X_20,CONST(X_22),DRAWNULL),DOTLINE,COLORLIGRAY;
X_23:=WEN98编_基准价;
X_24:=X_23*X_17;
X_25:=ABS(LOW-X_23)<=X_24;
X_26:=ABS(OPEN-X_23)<=X_24;
X_27:=ABS(CLOSE-X_23)<=X_24;
X_28:=ABS(HIGH-X_23)<=X_24;
X_29:=X_25 OR X_26 OR X_27 OR X_28 AND X_20 AND X_18!=基准点前N天+1;
X_30:=COUNT(X_29,X_19);
精准点个数:IF(X_30>0,X_30+1,0),NODRAW,COLORMAGENTA;
X_31:=峰边距;
X_32:=REF(HIGH,X_31)=HHV(HIGH,2*X_31+1);
X_33:=FILTER(X_32,X_31);
X_34:=BACKSET(X_33,X_31+1);
X_35:=FILTER(X_34,X_31);
X_36:=REF(HIGH,BARSLAST(X_35));
X_37:=REF(MAX(CLOSE,OPEN),X_31)=HHV(MAX(CLOSE,OPEN),2*X_31+1);
X_38:=FILTER(X_37,X_31);
X_39:=BACKSET(X_38,X_31+1);
X_40:=FILTER(X_39,X_31);
X_41:=REF(MAX(CLOSE,OPEN),BARSLAST(X_40));
X_42:=REF(LOW,X_31)=LLV(LOW,2*X_31+1);
X_43:=FILTER(X_42,X_31);
X_44:=BACKSET(X_43,X_31+1);
X_45:=FILTER(X_44,X_31);
X_46:=REF(LOW,BARSLAST(X_45));
X_47:=REF(MIN(CLOSE,OPEN),X_31)=LLV(MIN(CLOSE,OPEN),2*X_31+1);
X_48:=FILTER(X_47,X_31);
X_49:=BACKSET(X_48,X_31+1);
X_50:=FILTER(X_49,X_31);
X_51:=REF(MIN(CLOSE,OPEN),BARSLAST(X_50));
X_52:=IF(画线虚实=0,X_36,X_41);
X_53:=IF(画线虚实=0,X_46,X_51);
STICKLINE(X_52=REF(X_52,1) AND 峰边距>0,X_52,X_52,5,0),COLOR990099;
STICKLINE(X_53=REF(X_53,1) AND 峰边距>0,X_53,X_53,5,0),COLOR009900;
K中:(HIGH+LOW)/2,NODRAW,COLORYELLOW;
X_54:=MA(CLOSE,5);
MA5角度:ATAN((X_54/REF(X_54,1)-1)*100)*180/3.1416,NODRAW;
X_55:=均线数;
年线250:IF(X_55>=6 AND X_55<7,MA(CLOSE,250),DRAWNULL),COLORBLUE;
趋势120:IF(X_55>=5 AND X_55<7,MA(CLOSE,120),DRAWNULL),COLORGRAY;
决策60:IF(X_55>=4 AND X_55<7,MA(CLOSE,60),DRAWNULL),COLORGREEN;
生命20:IF(X_55>=3 AND X_55<7,MA(CLOSE,20),DRAWNULL),COLORLIRED;
IF(X_55>=3 AND 生命20>=REF(生命20,1),生命20,DRAWNULL),COLORLIMAGENTA;
操盘10:IF(X_55>=2 AND X_55<7,MA(CLOSE,10),DRAWNULL),COLORBROWN;
攻击5:IF(X_55>=1 AND X_55<7,MA(CLOSE,5),DRAWNULL),COLORWHITE;
IF(攻击5>REF(攻击5,1),攻击5,DRAWNULL),COLORMAGENTA;
IF(操盘10>REF(操盘10,1),操盘10,DRAWNULL),COLORYELLOW;
X_56:=FILTER(CROSS(KDJ.J,0) OR CROSS(KDJ.J,10),3);
DRAWICON(显买卖点=1 AND X_56 AND CLOSE>REF(CLOSE,1),X_7-X_6*0.03,1);
DRAWICON(显买卖点=1 AND CROSS(RSI.RSI1,20),X_7,1);
X_57:=REF(HHV(IF(X_13=1,X_10,HIGH),2),1);
X_58:=FILTER(CLOSE>X_57,1);
X_59:=REF(LLV(IF(X_13=1,X_11,LOW),2),1);
X_60:=FILTER(CLOSE<X_59,1);
X_61:=X_58 AND COUNT(X_58,BARSLAST(X_60))=1 AND 显买卖点=1;
X_62:=X_60 AND COUNT(X_60,BARSLAST(X_58))=1 AND 显买卖点=1;
STICKLINE(X_62,X_59,X_59,18,(-1)),COLORGREEN;
DRAWICON(X_62,X_8,39);
STICKLINE(X_61,X_57,X_57,18,(-1)),COLORMAGENTA;
DRAWICON(X_61,X_7,38);
X_63:=1.01;
X_64:=IF(X_13=1,MIN(CLOSE,OPEN),LOW);
X_65:=VOL=REFX(HHV(VOL,8),3);
X_66:=X_65 AND BETWEEN(VOL/REF(VOL,1),1.01,5);
X_67:=VOL>REF(VOL,1);
X_68:=CLOSE/REF(CLOSE,1)>=1.03 OR CLOSE/OPEN>=1.03;
X_69:=CLOSE>OPEN OR CLOSE>REF(CLOSE,1);
X_70:=CLOSE>REF(MAX(CLOSE,OPEN),1);
X_71:=X_68;
X_72:=RANGE(VOL/REF(VOL,1),0.966,1.034) AND BARSCOUNT(VOL)>=2;
X_73:=X_70 AND REFX(X_72 AND COUNT(CLOSE>OPEN,2)=2,1);
X_74:=BETWEEN(VOL/REF(VOL,1),1.01,4.99) AND X_69;
X_75:=X_67 AND X_70;
X_76:=REFX(COUNT(VOL>=REF(VOL,1) AND X_69,2)=2,2);
X_77:=REFX(COUNT(BETWEEN(CLOSE/REF(CLOSE,1),1.001,1.04),2)=2,2);
X_78:=X_66 OR X_71 OR X_73 OR X_74 OR X_75 OR X_76 OR X_77;
X_79:=FILTER(X_69 AND X_78,0);
X_80:=LLV(CLOSE,3)>=REF(MIN(CLOSE,OPEN),3);
X_81:=1*(X_79 AND REFX(X_80,3));
X_82:=EMA(VOL,3)<=REF(VOL,3)*1.03;
X_83:=(EMA(VOL,3)-REF(VOL,3))/REF(VOL,3)<=(EMA(CLOSE,3)-REF(CLOSE,3))/REF(CLOSE,3);
X_84:=X_82 OR X_83;
X_85:=REFX(MIN(EMA(CLOSE,3),CLOSE),3)>=CLOSE;
X_86:=1*(X_81 AND REFX(X_84,3) AND X_85);
X_87:=COUNT(VOL<=REF(VOL,1),3)=3;
X_88:=COUNT(CLOSE>=REF(CLOSE,1),3)=3;
X_89:=COUNT(CLOSE>OPEN,4)=4;
X_90:=X_87 AND X_88 AND X_89;
X_91:=REFX(X_90,3);
X_92:=MIN(CLOSE,OPEN)>REF(MAX(CLOSE,OPEN),1);
X_93:=1*(X_69 AND REFX(X_86,1) AND MAX(CLOSE,OPEN)<REFX(OPEN,1));
X_94:=画将1黄2元3全4;
X_95:=BARSLAST(X_81 AND REF(X_81=0,1));
X_96:=REF(X_64,X_95);
X_97:=X_94=1 OR X_94=4;
STICKLINE(X_97,X_96,X_96,3,0),COLORWHITE;
X_98:=BARSLAST(X_86 AND REF(X_86=0,1));
X_99:=REF(X_64,X_98);
X_100:=X_94=2 OR X_94=4 OR X_94=5;
STICKLINE(X_100,X_99,X_99,3,0),COLORYELLOW;
X_101:=REF(LLV(X_64,3),X_98-3);
STICKLINE(X_94=5,X_101,X_101,21,(-1)),COLORYELLOW;
X_102:=BARSLAST(X_93 AND REF(X_93=0,1));
X_103:=REF(MAX(CLOSE,OPEN),X_102);
X_104:=X_94=3 OR X_94=4;
STICKLINE(X_104,X_103,X_103,3,0),COLORLIRED;
X_105:=ABS(X_36-X_23)<=X_24;
X_106:=ABS(X_41-X_23)<=X_24;
X_107:=FILTER(X_105 OR X_106,480) AND X_20;
X_108:=ABS(X_46-X_23)<=X_24;
X_109:=ABS(X_51-X_23)<=X_24;
X_110:=FILTER(X_108 OR X_109,480) AND X_20;
X_111:=COUNT(X_110,X_19) AND COUNT(X_107,X_19) AND X_18=15;
DRAWLINE(X_107 AND 峰边距>0,X_23,1,X_23,0),COLORLIRED;
DRAWLINE(X_110 AND 峰边距>0,X_23,1,X_23,0),COLORGREEN;
DRAWLINE(X_111 AND 峰边距>0,X_23,1,X_23,1),COLORMAGENTA;
X_112:=ABS(X_99-X_23)<=X_24;
X_113:=ABS(X_101-X_23)<=X_24;
X_114:=ABS(X_103-X_23)<=X_24;
X_115:=FILTER(X_112 OR X_113 OR X_114,480) AND X_20;
DRAWLINE(X_115,X_23,1,X_23,0),COLORBROWN;
X_116:=REF(CLOSE,1);
X_117:=IF(CLOSE>=1,10000,100000);
X_118:=1.1*X_116-49/X_117;
X_119:=1.05*X_116-49/X_117;
X_120:=0.9*X_116+51/X_117;
X_121:=0.95*X_116+51/X_117;
X_122:=NAMELIKE(1) OR NAMELIKE(2);
X_123:=IF(X_122,CLOSE>=X_119,CLOSE>=X_118);
X_124:=IF(X_122,CLOSE<=X_121,CLOSE<=X_120);
X_125:=IF(X_122,HIGH>=X_119,HIGH>=X_118);
X_126:=IF(X_122,LOW<=X_121,LOW<=X_120);
X_127:=CLOSE>OPEN AND (CLOSE>=X_119 OR CLOSE>1.05*OPEN-51/X_117) OR (CLOSE>1000 AND CLOSE>X_116*1.024);
X_128:=CLOSE<OPEN AND (CLOSE<=X_121 OR CLOSE<0.95*OPEN+49/X_117) OR (CLOSE>1000 AND CLOSE<X_116*0.976);
X_129:=BARSLAST(FILTER(X_127,3));
X_130:=REF(X_16,X_129);
阳底:IF(显3121刻度=2 AND REF(X_127,X_129) AND X_130=REF(X_130,1),X_130,DRAWNULL),DOTLINE,COLORYELLOW;
X_131:=BARSLAST(FILTER(X_128,3));
X_132:=REF(X_16,X_131);
阴顶:IF(显3121刻度=2 AND REF(X_128,X_131) AND X_132=REF(X_132,1),X_132,DRAWNULL),DOTLINE,COLORGREEN;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(X_125,HIGH,MAX(CLOSE,OPEN),0,0),COLORMAGENTA;
STICKLINE(X_126,LOW,MIN(CLOSE,OPEN),0,0),COLORLICYAN;
STICKLINE(X_127,OPEN,CLOSE,1,0),COLOR0000BB;
STICKLINE(X_128,OPEN,CLOSE,1,0),COLORLIGREEN;
STICKLINE(X_123,OPEN,CLOSE,1,0),COLORMAGENTA;
STICKLINE(X_124,OPEN,CLOSE,1,0),COLORLICYAN;
X_133:=CLOSE>OPEN AND CLOSE<X_116;
STICKLINE(X_133,OPEN,CLOSE,0,0),COLORGREEN;
X_134:=CLOSE<OPEN AND CLOSE>X_116;
STICKLINE(X_134,OPEN,CLOSE,0,0),COLORRED;
X_135:=AMOUNT/VOL/100;
X_136:=CLOSE<OPEN AND X_135>REF(CLOSE,1) AND CLOSE<=X_116 AND X_135<=HIGH;
STICKLINE(X_136,X_135,X_135,1,0),COLORRED;
X_137:=PERIOD=5 AND NAMELIKE(10) AND (ABS(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>=0.025 OR ABS(CLOSE-OPEN)>=60);
X_138:=X_14-(X_14-X_15)/3;
X_139:=X_15+(X_14-X_15)/3;
X_140:=X_15+(X_14-X_15)/2;
X_141:=1+IF(X_9,2,4.92)/100;
X_142:=X_14/X_15>=X_141 OR CLOSE/REF(CLOSE,1)>=X_141;
X_143:=显3121刻度=1 AND X_142;
C31:IF(X_143,X_138,DRAWNULL),POINTDOT,COLORWHITE;
C21:IF(X_143,X_140,DRAWNULL),POINTDOT,COLORWHITE;
C32:IF(X_143,X_139,DRAWNULL),POINTDOT,COLORWHITE;
X_144:=1;
X_145:=显3121刻度=2 AND X_142;
STICKLINE(X_145,X_138,X_138,X_144,0),COLORYELLOW;
STICKLINE(X_145,X_140,X_140,X_144,0),COLORYELLOW;
STICKLINE(X_145,X_139,X_139,X_144,0),COLORYELLOW;
DRAWICON(X_18=基准点前N天+1,X_7,1);
STICKLINE(X_29,X_23,X_23,3,1),COLORYELLOW;
STICKLINE(X_18=基准点前N天+1,X_23,X_23,3,1),COLORYELLOW;
X_146:=IF(X_13=0,BARSLAST(X_35)>0,BARSLAST(X_40)>0) AND (ABS(LOW-X_52)<=X_52*X_17 OR ABS(X_11-X_52)<=X_52*X_17);
X_147:=IF(X_13=0,BARSLAST(X_45)>0,BARSLAST(X_50)>0) AND (ABS(LOW-X_53)<=X_53*X_17 OR ABS(X_11-X_53)<=X_53*X_17);
STICKLINE(X_146,X_52,X_52,1,1),COLORYELLOW;
STICKLINE(X_147,X_53,X_53,1,1),COLORYELLOW;

202108201410.jpg

202108201410.jpg

 

回复

使用道具 举报

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

本版积分规则