【资料名称】:通达信缠论多空主图指标 源码 贴图介绍【资料描述】:
通达信缠论多空主图指标 源码 贴图
{公式名称: 多空通道
公式描述:
参数数量: 2
参数1: T, 最小: 0, 最大: 1000, 缺省: 25
参数2: TT, 最小: 0, 最大: 1000, 缺省: 90
公式类型: 技术指标公式-均线型
画线方法: 主图叠加
公式版本: 0
显示小数: 缺省位数
坐标线位置: 自动
额外Y轴分界: 无
参数精灵:
请设置计算参数:
T: Param#0 (0.00--1000.00)
TT: Param#1 (0.00--1000.00)
用法注释:无
公式源码:}
X_1:=STRCAT(HYBLOCK,1);
X_2:=STRCAT(X_1,DYBLOCK);
X_3:=STRCAT(X_2,1);
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(X_3,GNBLOCK)),COLORRED;
短上轨:EMA(HIGH,T),COLORRED;
短下轨:EMA(LOW,T),COLORGREEN;
NOTEXT短下轨0:IF(CLOSE>短下轨,短下轨,DRAWNULL),COLORRED;
NOTEXT短上轨0:IF(CLOSE>短上轨,短上轨,DRAWNULL),COLORRED;
NOTEXT短下轨1:IF(CLOSE<短下轨,短下轨,DRAWNULL),COLORGREEN;
NOTEXT短上轨1:IF(CLOSE<短上轨,短上轨,DRAWNULL),COLORGREEN;
STICKLINE(CLOSE>短上轨,短上轨,短下轨,0,0),COLORRED;
STICKLINE(CLOSE<短下轨,短上轨,短下轨,0,0),COLORGREEN;
X_4:=短上轨-短下轨;
长上轨:EMA(HIGH,TT),COLORMAGENTA;
长下轨:EMA(LOW,TT),COLORBLUE;
NOTEXT长上轨0:IF(CLOSE>长上轨,长上轨,DRAWNULL),COLORMAGENTA;
NOTEXT长下轨0:IF(CLOSE>长下轨,长下轨,DRAWNULL),COLORMAGENTA;
NOTEXT长下轨1:IF(CLOSE<长下轨,长下轨,DRAWNULL),COLORBLUE;
NOTEXT长上轨1:IF(CLOSE<长上轨,长上轨,DRAWNULL),COLORBLUE;
STICKLINE(CLOSE>长上轨,长上轨,长下轨,0,0),COLORMAGENTA;
STICKLINE(CLOSE<长下轨,长上轨,长下轨,0,0),COLORBLUE;
X_5:=长上轨-长下轨;
DRAWTEXT(REF(CLOSE,3)<REF(短下轨,3) OR REF(CLOSE,3)<REF(短上轨,3) AND (REF(CLOSE,2)<REF(短下轨,2) OR REF(CLOSE,2)<REF(短上轨,2)) AND (REF(CLOSE,1)<REF(短下轨,1) OR REF(CLOSE,1)<REF(短上轨,1)) AND CLOSE>短上轨 AND 短上轨<长下轨 AND COUNT(CLOSE<短下轨,6)>0,LOW*0.96,37),COLORMAGENTA;
DRAWTEXT(REF(CLOSE,3)<REF(短下轨,3) OR REF(CLOSE,3)<REF(短上轨,3) AND (REF(CLOSE,2)<REF(短下轨,2) OR REF(CLOSE,2)<REF(短上轨,2)) AND (REF(CLOSE,1)<REF(短下轨,1) OR REF(CLOSE,1)<REF(短上轨,1)) AND CLOSE>短上轨 AND CLOSE>长上轨 AND COUNT(CLOSE<短下轨,6)>0,LOW*0.96,38),COLORMAGENTA;
DRAWTEXT(REF(CLOSE,3)<REF(长下轨,3) OR REF(CLOSE,3)<REF(长上轨,3) AND (REF(CLOSE,2)<REF(长下轨,2) OR REF(CLOSE,2)<REF(长上轨,2)) AND (REF(CLOSE,1)<REF(长下轨,1) OR REF(CLOSE,1)<REF(长上轨,1)) AND CLOSE>长上轨 AND CLOSE>短上轨 AND COUNT(CLOSE<长下轨,6)>0,LOW*0.96,38),COLORMAGENTA;
DRAWTEXT(REF(CLOSE,3)>REF(短上轨,3) OR REF(CLOSE,3)>REF(短下轨,3) AND (REF(CLOSE,2)>REF(短上轨,2) OR REF(CLOSE,2)>REF(短下轨,2)) AND (REF(CLOSE,1)>REF(短上轨,1) OR REF(CLOSE,1)>REF(短下轨,1)) AND CLOSE<短下轨 AND 短上轨>长上轨 AND CLOSE>长下轨 AND COUNT(CLOSE>短上轨,6)>0,HIGH*1.04,39),COLORMAGENTA;
DRAWTEXT(REF(CLOSE,3)>REF(短上轨,3) OR REF(CLOSE,3)>REF(短下轨,3) AND (REF(CLOSE,2)>REF(短上轨,2) OR REF(CLOSE,2)>REF(短下轨,2)) AND (REF(CLOSE,1)>REF(短上轨,1) OR REF(CLOSE,1)>REF(短下轨,1)) AND CLOSE<短下轨 AND 短下轨<长下轨 AND COUNT(CLOSE>短上轨,6)>0,HIGH*1.04,40),COLORMAGENTA;
DRAWTEXT(REF(CLOSE,3)>REF(长上轨,3) OR REF(CLOSE,3)>REF(长下轨,3) AND (REF(CLOSE,2)>REF(长上轨,2) OR REF(CLOSE,2)>REF(长下轨,2)) AND (REF(CLOSE,1)>REF(长上轨,1) OR REF(CLOSE,1)>REF(长下轨,1)) AND CLOSE<长下轨 AND CLOSE<短下轨 AND COUNT(CLOSE>长上轨,6)>0,HIGH*1.04,40),COLORMAGENTA;
X_6:=CLOSE>REF(CLOSE,4);
X_7:=BARSLASTCOUNT(X_6);
X_8:=X_7=9;
X_9:=ISLASTBAR AND BETWEEN(X_7,1,8);
X_10:=(BACKSET(X_8>0,9) OR BACKSET(X_9>0,X_7))*X_7;
DRAWTEXT(X_10>0,HIGH*1.001,VAR2STR(X_10,0)),COLORWHITE;
DRAWTEXT(X_7=9,HIGH*1.001,6),COLORMAGENTA;
X_11:=CLOSE<REF(CLOSE,4);
X_12:=BARSLASTCOUNT(X_11);
X_13:=X_12=9;
X_14:=ISLASTBAR AND BETWEEN(X_12,1,8);
X_15:=(BACKSET(X_13>0,9) OR BACKSET(X_14>0,X_12))*X_12;
DRAWTEXT(X_15>0,LOW*0.998,VAR2STR(X_15,0)),COLORWHITE;
DRAWTEXT(X_12=9,LOW*0.998,6),COLORMAGENTA;
X_16:=TOPRANGE(HIGH);
X_17:=LOWRANGE(LOW);
X_18:=LLVBARS(HIGH,X_16);
X_19:=LLVBARS(LOW,X_16);
X_20:=HHVBARS(LOW,X_17);
X_21:=HHVBARS(HIGH,X_17);
X_22:=HHV(LOW,X_18+1)>LLV(HIGH,X_18+1);
X_23:=HHV(LOW,X_20+1)>LLV(HIGH,X_20+1);
X_24:=COUNT(LOW>=REF(LOW,1),X_19)>2 AND COUNT(HIGH>=REF(HIGH,1),X_18)>2;
X_25:=COUNT(HIGH<=REF(HIGH,1),X_21)>2 AND COUNT(LOW<=REF(LOW,1),X_20)>2;
X_26:=X_16 AND X_22 AND X_24 AND X_19>3;
X_27:=X_17 AND X_23 AND X_25 AND X_21>3;
X_28:=BARSLAST(X_26);
X_29:=BARSLAST(X_27);
X_30:=IF(X_28=0,X_29,X_28)>=3;
X_31:=X_26 AND X_30 AND HIGH=HHV(HIGH,BARSLAST(X_27));
X_32:=X_27 AND X_30 AND LOW=LLV(LOW,BARSLAST(X_26));
NOTEXT上笔划线:DRAWLINE(X_32,LOW,X_31,HIGH,0),DOTLINE,COLORYELLOW;
NOTEXT下笔划线:DRAWLINE(X_31,HIGH,X_32,LOW,0),DOTLINE,COLORYELLOW;
X_33:=NOTEXT上笔划线 AND NOTEXT下笔划线;
X_34:=IF(PERIOD=11,0.02,IF(PERIOD=10,0.02,IF(PERIOD=9,0.02,IF(PERIOD=8,0.001,IF(PERIOD=7,0.02,IF(PERIOD=6,0.01,IF(PERIOD=5,0.005,IF(PERIOD=4,0.002,IF(PERIOD=3,0.001,IF(PERIOD=2,0.001,IF(PERIOD=1,0.0003,IF(PERIOD=0,0.0002,0))))))))))));
涨家数:INDEXADV,NODRAW,COLOR0080FF;
跌家数:INDEXDEC,NODRAW,COLORGREEN;
X_35:=(HIGH+LOW+CLOSE)/3;
X_36:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE));
X_37:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-X_35);
X_38:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW);
X_39:=IF(HIGH=LOW,1,X_35-MIN(CLOSE,OPEN));
X_40:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
X_41:=X_36*X_40+X_37*X_40;
X_42:=X_38*X_40+X_39*X_40;
X_43:=DYNAINFO(23);
X_44:=DYNAINFO(22);
X_45:=IF(ISLASTBAR,X_42*240/FROMOPEN,X_42);
X_46:=IF(ISLASTBAR,X_41*240/FROMOPEN,X_41);
X_47:=IF(ISLASTBAR AND PERIOD=5,X_43,X_45);
X_48:=IF(ISLASTBAR AND PERIOD=5,X_44,X_46);
日净买量:X_47-X_48,NODRAW,COLORRED;
gd53081
【下载地址隐藏】: 点:回复可见地址