通达信四色主图+四量图+中期线主图副图指标源码
主图
{公式名称: 四色主图
公式描述:
参数数量: 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 X_9:=IF(X_8-1,X_7,DRAWNULL); X_10:=EMA(CLOSE,3)>EMA(CLOSE,21); X_11:=EMA(CLOSE,3) X_12:=EMA(CLOSE,3)>EMA(CLOSE,8); X_13:=EMA(CLOSE,3) 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 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 X_47:=CLOSE>MA(CLOSE,10) AND OPEN X_48:=CLOSE>MA(CLOSE,30) AND OPEN 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;