通达信四色主图+四量图+中期线主图副图指标源码

财富   2024-11-19 15:56   浙江  

主图

{公式名称: 四色主图

公式描述: 

参数数量: 4

参数1: M1, 最小: 1, 最大: 1000, 缺省: 5

参数2: M2, 最小: 1, 最大: 1000, 缺省: 13

参数3: M3, 最小: 1, 最大: 1000, 缺省: 34

参数4: M4, 最小: 1, 最大: 1000, 缺省: 55

公式类型: 技术指标公式-其他类型

画线方法: 主图叠加

公式版本: 0

显示小数: 缺省位数

坐标线位置: 自动

额外Y轴分界: 无


参数精灵:

请设置计算参数:

M1: Param#0 (1.00--1000.00)

M2: Param#1 (1.00--1000.00)

M3: Param#2 (1.00--1000.00)

M4: Param#3 (1.00--1000.00)

用法注释:无

公式源码:}

MA3:MA(CLOSE,M3),COLORMAGENTA,LINETHICK2;

X_1:=BARSLAST(REF(CROSS(CLOSE,MA(CLOSE,120)),1)) AND CROSS(MA(CLOSE,34),MA(CLOSE,120));

DRAWTEXT(X_1,MA(CLOSE,120),53),COLORRED,LINETHICK3;

X_2:=120;

X_3:=BARSLAST(CURRBARSCOUNT=X_2);

X_4:=CONST(IF(ISLASTBAR=1,HHV(HIGH,X_3),0));

X_5:=CONST(IF(ISLASTBAR=1,LLV(LOW,X_3),0));

X_6:=X_4-X_5;

高:IF(CURRBARSCOUNT<=X_2,X_4,DRAWNULL),POINTDOT,COLORYELLOW;

压:IF(CURRBARSCOUNT<=X_2,X_4-X_6*0.191,DRAWNULL),NODRAW,COLORMAGENTA;

平衡:IF(CURRBARSCOUNT<=X_2,X_5+X_6/2,DRAWNULL),NODRAW,COLORYELLOW;

支撑:IF(CURRBARSCOUNT<=X_2,X_5+X_6*0.191,DRAWNULL),NODRAW,COLORGREEN;

低:IF(CURRBARSCOUNT<=X_2,X_5,DRAWNULL),POINTDOT,COLORGREEN;

天:BARSLAST(LOW=X_5),NODRAW,COLORYELLOW;

STICKLINE(CURRBARSCOUNT<=X_2,平衡,平衡,3,(-1)),COLORWHITE;

STICKLINE(CURRBARSCOUNT<=X_2,压,压,3,(-1)),COLORRED;

STICKLINE(CURRBARSCOUNT<=X_2,支撑,支撑,3,(-1)),COLORGREEN;

DRAWTEXT(CURRBARSCOUNT=1,压,54),COLORRED;

DRAWTEXT(CURRBARSCOUNT=1,平衡,55),COLORWHITE;

DRAWTEXT(CURRBARSCOUNT=1,支撑,56),COLORYELLOW;

X_7:=EMA(CLOSE,8);

X_8:=X_7<REF(X_7,1);

X_9:=IF(X_8-1,X_7,DRAWNULL);

X_10:=EMA(CLOSE,3)>EMA(CLOSE,21);

X_11:=EMA(CLOSE,3)<EMA(CLOSE,21);

X_12:=EMA(CLOSE,3)>EMA(CLOSE,8);

X_13:=EMA(CLOSE,3)<EMA(CLOSE,8);

STICKLINE(X_10,LOW,HIGH,0,0),COLOR0000BB;

STICKLINE(X_10,CLOSE,OPEN,3,0),COLOR0000BB;

STICKLINE(X_10,CLOSE,OPEN,2.8,0),COLOR0000BB;

STICKLINE(X_10,CLOSE,OPEN,2.5,0),COLOR0000BB;

STICKLINE(X_10,CLOSE,OPEN,2.2,0),COLOR0000BB;

STICKLINE(X_10,CLOSE,OPEN,1.7,0),COLOR0000BB;

STICKLINE(X_10,CLOSE,OPEN,1.2,0),COLOR0000BB;

STICKLINE(X_10,CLOSE,OPEN,0.6,0),COLOR0000BB;

STICKLINE(X_10,CLOSE,OPEN,0.2,0),COLOR0000BB;

STICKLINE(X_11,HIGH,LOW,0,1),COLORGREEN;

STICKLINE(X_11,CLOSE,OPEN,3.2,0),COLOR006600;

STICKLINE(X_11,CLOSE,OPEN,2.6,0),COLOR008800;

STICKLINE(X_11,CLOSE,OPEN,1.9,0),COLOR00AA00;

STICKLINE(X_11,CLOSE,OPEN,1.1,0),COLOR00CC00;

STICKLINE(X_11,CLOSE,OPEN,0.3,0),COLORGREEN;

STICKLINE(X_11 AND X_12,HIGH,LOW,0,1),COLORFF55FF;

STICKLINE(X_11 AND X_12,CLOSE,OPEN,3.2,0),COLOR880088;

STICKLINE(X_11 AND X_12,CLOSE,OPEN,2.6,0),COLORAA00AA;

STICKLINE(X_11 AND X_12,CLOSE,OPEN,1.9,0),COLORCC00CC;

STICKLINE(X_11 AND X_12,CLOSE,OPEN,1.1,0),COLOREE00EE;

STICKLINE(X_11 AND X_12,CLOSE,OPEN,0.3,0),COLORFF44FF;

STICKLINE(X_10 AND X_13,HIGH,LOW,0,1),COLORYELLOW;

STICKLINE(X_10 AND X_13,CLOSE,OPEN,3.2,0),COLORYELLOW;

STICKLINE(X_10 AND X_13,CLOSE,OPEN,2.6,0),COLORYELLOW;

STICKLINE(X_10 AND X_13,CLOSE,OPEN,1.9,0),COLORYELLOW;

STICKLINE(X_10 AND X_13,CLOSE,OPEN,1.1,0),COLORYELLOW;

STICKLINE(X_10 AND X_13,CLOSE,OPEN,0.3,0),COLORYELLOW;

DRAWTEXT(CURRBARSCOUNT=X_2/2+9,X_4-X_6/12,57),COLORYELLOW;

DRAWTEXT(CURRBARSCOUNT=X_2/2+9,X_4-X_6/3,58),COLORGREEN;

DRAWTEXT(CURRBARSCOUNT=X_2/2+9,X_5+X_6/3,59),COLORWHITE;

DRAWTEXT(CURRBARSCOUNT=X_2/2+9,X_5+X_6/10,60),COLORCYAN;

X_14:=HHV(CLOSE,2);

X_15:=LLV(CLOSE,2);

X_16:=(3*CLOSE+LOW+OPEN+HIGH)/6;

X_17:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);

X_18:=REF(X_17,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);

X_19:=REF(X_18,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);

X_20:=REF(X_19,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);

X_21:=REF(X_20,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);

X_22:=REF(X_21,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);

X_23:=REF(X_22,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);

X_24:=REF(X_23,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);

X_25:=REF(X_24,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);

X_26:=REF(X_25,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);

X_27:=REF(X_26,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);

X_28:=REF(X_27,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);

X_29:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);

X_30:=REF(X_29,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);

X_31:=REF(X_30,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);

X_32:=REF(X_31,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);

X_33:=REF(X_32,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);

X_34:=REF(X_33,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);

X_35:=REF(X_34,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);

X_36:=REF(X_35,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);

X_37:=REF(X_36,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);

X_38:=REF(X_37,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);

X_39:=REF(X_38,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);

X_40:=REF(X_39,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);

X_41:=REF(X_29 OR X_30 OR X_31 OR X_32 OR X_33 OR X_34 OR X_35 OR X_36 OR X_37 OR X_38 OR X_39 OR X_40,1) AND X_17;

X_42:=REF(X_17 OR X_18 OR X_19 OR X_20 OR X_21 OR X_22 OR X_23 OR X_24 OR X_25 OR X_26 OR X_27 OR X_28,1) AND X_29;

短买:X_41,NODRAW,COLOR33AACC;

DRAWTEXT(短买,REF(CLOSE,1),61),COLORYELLOW;

DRAWTEXT(X_42,REF(CLOSE,1)+0.2,22),COLORYELLOW;

X_43:=IF(CLOSE>REF(CLOSE,1),88,0);

X_44:=IF(CLOSE/REF(CLOSE,1)>1.05 AND HIGH/CLOSE<1.01 AND X_43>0,91,0);

DRAWTEXT(X_44>90,LOW*0.99,62),COLORRED;

X_45:=(MA(CLOSE,5)-MA(CLOSE,30))/MA(CLOSE,5)*100;

X_46:=CLOSE>MA(CLOSE,5) AND OPEN<MA(CLOSE,5);

X_47:=CLOSE>MA(CLOSE,10) AND OPEN<MA(CLOSE,10);

X_48:=CLOSE>MA(CLOSE,30) AND OPEN<MA(CLOSE,30);

DRAWTEXT(X_46 AND X_48 AND X_47,LOW*0.96,63),COLORRED;

JL:EMA(CLOSE,18),COLORMAGENTA,LINETHICK2;

红界:IF(JL>REF(JL,1),JL,DRAWNULL),COLORRED,LINETHICK2;

黄界:IF(JL<REF(JL,1),JL,DRAWNULL),COLORYELLOW,LINETHICK2;


{公式名称: 四量副图

公式描述: 

无参数

公式类型: 技术指标公式-其他类型

画线方法: 副图

公式版本: 0

显示小数: 缺省位数

坐标线位置: 自动

额外Y轴分界: 无


参数精灵:无

用法注释:无

公式源码:}

X_1:=(3*CLOSE+LOW+OPEN+HIGH)/6;

X_2:=(20*X_1+19*REF(X_1,1)+18*REF(X_1,2)+17*REF(X_1,3)+16*REF(X_1,4)+15*REF(X_1,5)+14*REF(X_1,6)+13*REF(X_1,7)+12*REF(X_1,8)+11*REF(X_1,9)+10*REF(X_1,10)+9*REF(X_1,11)+8*REF(X_1,12)+7*REF(X_1,13)+6*REF(X_1,14)+5*REF(X_1,15)+4*REF(X_1,16)+3*REF(X_1,17)+2*REF(X_1,18)+REF(X_1,20))/210;

X_3:=MA(X_2,6);

STICKLINE(CLOSE>X_2,(-1.9),(-0.4),4,0),COLOR000099,LINETHICK2;

STICKLINE(CLOSE<X_3,(-1.9),(-0.4),4,0),COLOR017700,LINETHICK2;

STICKLINE(X_2>=CLOSE AND CLOSE>=X_3,(-1.9),(-0.4),8,0),COLOR017700,LINETHICK2;

DRAWTEXT(ISLASTBAR=1,IF(VOL>=0,(-1),(-0.4)),31),COLORWHITE;

时间:DATE+1900/0/0,NODRAW,COLORWHITE;

X_4:=(3*CLOSE+LOW+OPEN+HIGH)/6;

X_5:=(20*X_4+19*REF(X_4,1)+18*REF(X_4,2)+17*REF(X_4,3)+16*REF(X_4,4)+15*REF(X_4,5)+14*REF(X_4,6)+13*REF(X_4,7)+12*REF(X_4,8)+11*REF(X_4,9)+10*REF(X_4,10)+9*REF(X_4,11)+8*REF(X_4,12)+7*REF(X_4,13)+6*REF(X_4,14)+5*REF(X_4,15)+4*REF(X_4,16)+3*REF(X_4,17)+2*REF(X_4,18)+REF(X_4,20))/210;

X_6:=MA(X_5,3);

X_7:=CLOSE-X_5;

X_8:=VOL*100/CAPITAL;

X_9:=MA(X_8,5);

X_10:=MA(X_8,12);

X_11:=MA(X_8,34);

X_12:=MA(X_8,55);

X_13:=(X_9+X_10+X_11+X_12)/4;

X_14:=X_9-X_12;

X_15:=X_7+X_14;

STICKLINE(X_15>=0,2.5,4,4,0),COLOR000099,LINETHICK2;

STICKLINE(X_15<0,2.5,4,4,0),COLOR017700,LINETHICK2;

DRAWTEXT(ISLASTBAR=1,IF(VOL>=0,3.2,0),32),COLORWHITE;

X_16:=MAX(MA(CLOSE,60),MA(CLOSE,120));

X_17:=MIN(MA(CLOSE,60),MA(CLOSE,120));

X_18:=VOL;

X_19:=EMA(VOL,5);

X_20:=EMA(VOL,50);

X_21:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);

X_22:=EMA(X_21,5);

X_23:=EMA(X_21,50);

X_24:=(X_19-X_20)*0.00001;

X_25:=(X_22-X_23)*0.000001;

X_26:=X_24+X_25;

STICKLINE(X_26>=0,0.3,1.8,4,0),COLOR000099,LINETHICK2;

STICKLINE(X_26<0,0.3,1.8,4,0),COLOR017700,LINETHICK2;

DRAWTEXT(ISLASTBAR=1,IF(VOL>=0,1,0),33),COLORWHITE;

X_27:=MAX(MA(CLOSE,13),MA(CLOSE,34));

X_28:=MIN(MA(CLOSE,13),MA(CLOSE,34));

X_29:=(3*CLOSE+LOW+OPEN+HIGH)/6;

X_30:=(20*X_29+19*REF(X_29,1)+18*REF(X_29,2)+17*REF(X_29,3)+16*REF(X_29,4)+15*REF(X_29,5)+14*REF(X_29,6)+13*REF(X_29,7)+12*REF(X_29,8)+11*REF(X_29,9)+10*REF(X_29,10)+9*REF(X_29,11)+8*REF(X_29,12)+7*REF(X_29,13)+6*REF(X_29,14)+5*REF(X_29,15)+4*REF(X_29,16)+3*REF(X_29,17)+2*REF(X_29,18)+REF(X_29,20))/210;

X_31:=MA(X_30,6);

X_32:=(X_30-X_31)*1.2;

X_33:=(CLOSE*2+HIGH+LOW)/4*13;

X_34:=EMA(X_33,3)-EMA(X_33,34);

X_35:=EMA(X_34,3);

X_36:=2*(X_34-X_35)*5.5;

X_37:=(X_34-X_35)*0.2;

X_38:=X_32+X_37;

STICKLINE(X_38>=0,(-4.1),(-2.6),4,0),COLOR000099,LINETHICK2;

STICKLINE(X_38<0,(-4.1),(-2.6),4,0),COLOR017700,LINETHICK2;

DRAWTEXT(ISLASTBAR=1,IF(VOL>=0,(-3.4),0),34),COLORWHITE;

BQIUV:X_15,NODRAW,COLORWHITE;

BQIUSV:X_26,NODRAW,COLORYELLOW;

WWW:CLOSE-X_2,NODRAW,COLORYELLOW;

XEV:X_38,NODRAW,COLORGREEN;

{公式名称: 中期线

公式描述: 

无参数

公式类型: 技术指标公式-其他类型

画线方法: 副图

公式版本: 0

显示小数: 缺省位数

坐标线位置: 自动

额外Y轴分界: 无


参数精灵:无

用法注释:

麟中期方向线

公式源码:}

X_1:=EXPMA(CLOSE,12);

X_2:=EXPMA(CLOSE,34);

DIR:X_1-X_2,NODRAW;

DRAWBAND(DIR,RGB(190,0,0),0,RGB(0,160,0));

X_3:=EXPMA(DIR,20);

爱指标源码
指标源码的作用:在平时看盘时,提供技术面判断,所以在买卖的决定上有参考作用,尤其是组合适合自己的一套看盘模板。
 最新文章