磊哥包含主图,缠论K线指标(通达信公式 主图 源码 测试图)

[复制链接]
查看75 | 回复0 | 2022-6-27 16:19:14 | 显示全部楼层 |阅读模式

磊哥包含主图
其实原理就那么几句挺简单的,k线共分5类:1---2、3---4、5、6---7、8---9,分别代表k线的力度:极弱---弱---中---强---极强

{公式名称: 磊哥包含主图
公式描述: 缠论K线包含处理(加入笔中枢划线)无源K线
参数数量: 1
参数1: B, 最小: 0, 最大: 1, 缺省: 1
公式源码:}
 
DRAWRECTREL(0,965,130,999,RGB(0,0,1)),LINETHICK9;
DRAWTEXT_FIX(1,0,1,0,137),COLOR999999;
DD1:DRAWLINE(HIGH>=HHV(HIGH,55),HIGH,LOW<=LLV(LOW,55),LOW,0),COLORFF8000;
DD2:DRAWLINE(LOW<=LLV(LOW,55),LOW,HIGH>=HHV(HIGH,55),HIGH,0),COLORFF8000;
X_1:=DRAWLINE(LOW<=LLV(LOW,13),LOW,HIGH>=HHV(HIGH,13),HIGH,0);
X_2:=DRAWLINE(HIGH>=HHV(HIGH,13),HIGH,LOW<=LLV(LOW,13),LOW,0);
IF(B=1,X_1,DRAWNULL),DOTLINE,COLORYELLOW;
IF(B=1,X_2,DRAWNULL),DOTLINE,COLORYELLOW;
X_3:=IF(HIGH>REF(HIGH,1),1,IF(HIGH=REF(HIGH,1),0,IF(HIGH<REF(HIGH,1),(-1),0)));
X_4:=IF(LOW>REF(LOW,1),1,IF(LOW=REF(LOW,1),0,IF(LOW<REF(LOW,1),(-1),0)));
X_5:=X_3+X_4;
X_6:=REF(X_5,1);
上:STICKLINE(X_5=2,HIGH,LOW,1.8,0),COLOR000080;
下:STICKLINE(X_5=(-2),HIGH,LOW,1.8,0),COLORLICYAN;
包:STICKLINE(RANGE(X_5,(-2),2),HIGH,LOW,2.5,0),COLOREEEEEE;
平上:STICKLINE(X_5=1,HIGH,LOW,2.5,1),COLOREEEEEE;
平下:STICKLINE(X_5=(-1),HIGH,LOW,2.5,1),COLOREEEEEE;
平包:STICKLINE(X_5=0 AND HIGH=REF(HIGH,1) AND LOW=REF(LOW,1),HIGH,LOW,2.5,1),COLOREEEEEE;
X_7:=IF(X_6=2 AND REF(HIGH,1),REF(HIGH,1),DRAWNULL);
X_8:=IF(X_6=2 AND REF(LOW,1),REF(LOW,1),DRAWNULL);
X_9:=IF(X_6=(-2) AND REF(HIGH,1),REF(HIGH,1),DRAWNULL);
X_10:=IF(X_6=(-2) AND REF(LOW,1),REF(LOW,1),DRAWNULL);
X_11:=RANGE(X_5,(-2),2);
X_12:=IF(X_11 AND X_6=2 AND X_7=REF(HIGH,1) AND X_8=REF(LOW,1) AND X_7>=REF(HIGH,2),HHV(HIGH,2),DRAWNULL);
X_13:=IF(X_11 AND X_6=2 AND X_7=REF(HIGH,1) AND X_8=REF(LOW,1) AND X_7>=REF(HIGH,2),HHV(LOW,2),DRAWNULL);
包K1上:STICKLINE(X_6=2 AND X_12 AND X_13,X_12,X_13,1,0),COLORFF24FF;
X_14:=IF(X_11 AND X_6=(-2) AND X_9=REF(HIGH,1) AND X_10=REF(LOW,1) AND X_10<=REF(LOW,2),LLV(HIGH,2),DRAWNULL);
X_15:=IF(X_11 AND X_6=(-2) AND X_9=REF(HIGH,1) AND X_10=REF(LOW,1) AND X_10<=REF(LOW,2),LLV(LOW,2),DRAWNULL);
包K1下:STICKLINE(X_6=(-2) AND X_14 AND X_15,X_14,X_15,1,0),COLORGREEN;
X_16:=REF(X_5,3);
X_17:=X_16=(-2) OR X_16=2;
X_18:=REF(X_5,2);
X_19:=RANGE(X_18,(-2),2);
X_20:=RANGE(X_6,(-2),2) AND X_11 AND HIGH>=REF(X_14,1) AND LOW<=REF(X_15,1);
X_21:=RANGE(X_6,(-2),2) AND X_11 AND HIGH<=REF(X_14,1) AND LOW>=REF(X_15,1);
X_22:=X_20 OR X_21;
双下包外:STICKLINE(X_20 AND X_17 AND REF(X_14,1)<=REF(HIGH,3),REF(X_14,1),LOW,1,0),COLORFF1E1E;
双下包内:STICKLINE(X_21 AND X_17 AND REF(X_14,1)<=REF(HIGH,3),HIGH,REF(X_15,1),1,0),COLORFF1E1E;
三下包外:STICKLINE(X_20 AND X_19 AND REF(X_14,1)<=REF(X_14,2),REF(X_14,1),LOW,1,0),COLORBLUE;
三下包内:STICKLINE(X_21 AND X_19 AND REF(X_14,1)<=REF(X_14,2),HIGH,REF(X_15,1),1,0),COLORBLUE;
X_23:=RANGE(X_6,(-2),2) AND X_11 AND HIGH>=REF(X_12,1) AND LOW<=REF(X_13,1);
X_24:=RANGE(X_6,(-2),2) AND X_11 AND HIGH<=REF(X_12,1) AND LOW>=REF(X_13,1);
X_25:=X_23 OR X_24;
双上包外K2:STICKLINE(X_23 AND X_17 AND REF(X_12,1)>=REF(HIGH,3),HIGH,REF(X_13,1),1,0),COLORFF33FF;
双上包内K02:STICKLINE(X_24 AND X_17 AND REF(X_12,1)>=REF(X_12,2),REF(X_12,1),LOW,1,0),COLORFF33FF;
三上包外K2:STICKLINE(X_23 AND X_19 AND REF(X_12,1)>=REF(X_12,2),HIGH,REF(X_13,1),1,0),COLORMAGENTA;
三上包内K02:STICKLINE(X_24 AND X_19 AND REF(X_12,1)>=REF(X_12,2),REF(X_12,1),LOW,1,0),COLORMAGENTA;
 

202112109211223363.png

202112109211223363.png
 

202112109204773585.rar

4.61 KB, 下载次数: 0

售价: 4 金钱  [记录]  [购买]

202112109204773585.rar

回复

使用道具 举报

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

本版积分规则